]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vim/vimrc: move helper functions to the top
authorSimon Ruderich <simon@ruderich.org>
Sun, 17 Jun 2018 06:19:41 +0000 (08:19 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 17 Jun 2018 06:19:41 +0000 (08:19 +0200)
vim/vimrc

index bb555358dbf914d69c73cc8ef7d75782648d3507..84768422aa07d5ad0f2492b782d26e5ae8c6d5f9 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
 " along with this file.  If not, see <http://www.gnu.org/licenses/>.
 
 
 " along with this file.  If not, see <http://www.gnu.org/licenses/>.
 
 
+" HELPER FUNCTIONS
+
+if has('eval')
+" Check if the given syntax group is available. Thanks to bairui in #vim on
+" Freenode (2012-02-19 01:15 CET) for the try/catch silent highlight idea.
+    function! s:HasSyntaxGroup(group)
+        try
+            execute 'silent highlight ' . a:group
+        " \a = [A-Za-z]
+        catch /^Vim\%((\a\+)\)\=:E411/ " 'highlight group not found'
+            return 0
+        endtry
+        return 1
+    endfunction
+
+" Check if the given Vim version and patch is available.
+    function! s:HasVersionAndPatch(version, patch)
+        return v:version > a:version
+            \ || (v:version == a:version && has('patch' . a:patch))
+    endfunction
+endif
+
+
 " EDITOR SETTINGS
 
 " Save 'runtimepath' in case it was changed by the system's configuration
 " EDITOR SETTINGS
 
 " Save 'runtimepath' in case it was changed by the system's configuration
@@ -127,29 +150,6 @@ if has('autocmd')
 endif
 
 
 endif
 
 
-" HELPER FUNCTIONS
-
-if has('eval')
-" Check if the given syntax group is available. Thanks to bairui in #vim on
-" Freenode (2012-02-19 01:15 CET) for the try/catch silent highlight idea.
-    function! s:HasSyntaxGroup(group)
-        try
-            execute 'silent highlight ' . a:group
-        " \a = [A-Za-z]
-        catch /^Vim\%((\a\+)\)\=:E411/ " 'highlight group not found'
-            return 0
-        endtry
-        return 1
-    endfunction
-
-" Check if the given Vim version and patch is available.
-    function! s:HasVersionAndPatch(version, patch)
-        return v:version > a:version
-            \ || (v:version == a:version && has('patch' . a:patch))
-    endfunction
-endif
-
-
 " TERMINAL SETTINGS
 
 " Also enable fast terminal mode in GNU screen and tmux, but not for SSH
 " TERMINAL SETTINGS
 
 " Also enable fast terminal mode in GNU screen and tmux, but not for SSH