diff rc/vimrc @ 418:c0ac21407903

Disable features on vim basic.
author Edho Arief <edho@myconan.net>
date Wed, 05 Dec 2012 02:33:47 -0800
parents 7ceec4404caf
children f4a29755dd01
line wrap: on
line diff
--- a/rc/vimrc	Wed Nov 28 23:03:16 2012 +0700
+++ b/rc/vimrc	Wed Dec 05 02:33:47 2012 -0800
@@ -48,16 +48,18 @@
   autocmd BufRead,BufNewFile *.coffee :set ft=coffee
 endif
 
-"Restore cursor position
-set viminfo='10,\"100,:20,%,n~/.viminfo
-function! ResCur()
-  if line("'\"") <= line("$")
-    normal! g`"
-    return 1
-  endif
-endfunction
+if has('function!')
+  "Restore cursor position
+  set viminfo='10,\"100,:20,%,n~/.viminfo
+  function! ResCur()
+    if line("'\"") <= line("$")
+      normal! g`"
+      return 1
+    endif
+  endfunction
 
-augroup resCur
-  autocmd!
-  autocmd BufWinEnter * call ResCur()
-augroup END
+  augroup resCur
+    autocmd!
+    autocmd BufWinEnter * call ResCur()
+  augroup END
+endif