Explorar o código

Fix nvim warning for alt key on mac

Andrew Swistak %!s(int64=6) %!d(string=hai) anos
pai
achega
9c05a02b43
Modificáronse 1 ficheiros con 8 adicións e 6 borrados
  1. 8 6
      vimrc

+ 8 - 6
vimrc

@@ -359,12 +359,14 @@ au BufWrite * :call DeleteTrailingWS()
 au FileType go let b:noStrip=1
 
 " Allow the use of ALT as a function key.
-let c='a'
-while c <= 'z'
-  exec "set <A-".c.">=\e".c
-  exec "imap \e".c." <A-".c.">"
-  let c = nr2char(1+char2nr(c))
-endw
+if !has('nvim')
+  let c='a'
+  while c <= 'z'
+    exec "set <A-".c.">=\e".c
+    exec "imap \e".c." <A-".c.">"
+    let c = nr2char(1+char2nr(c))
+  endw
+endif
 
 " Smart indent when entering insert mode with i on empty lines
 function! IndentWithI()