From: Samir Benmendil Date: Fri, 18 Oct 2013 04:40:50 +0000 (+0200) Subject: switch and in smarttab X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/be41ad77073a424ccf4d795cb01cf7af784f7d39?ds=sidebyside switch and in smarttab --- diff --git a/vimrc b/vimrc index ceab90e..94c32a8 100644 --- a/vimrc +++ b/vimrc @@ -107,6 +107,18 @@ set nrformats=hex " number formats recognized for CTRL-A and CTRL- " whether to use a popup menu for Insert mode completion set completeopt=longest,menuone,preview +" Indent if we're at the beginning of a line. Else, do completion. +function! InsertTabWrapper() + let col = col('.') - 1 + if !col || getline('.')[col - 1] !~ '\k' + return "\" + else + return "\" +endif +endfunction +inoremap =InsertTabWrapper() +inoremap + " fix legacy vi inconsistency map Y y$ @@ -227,15 +239,3 @@ if !exists(":DiffOrig") command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis \ | wincmd p | diffthis endif - -" Indent if we're at the beginning of a line. Else, do completion0. -function! InsertTabWrapper() - let col = col('.') - 1 - if !col || getline('.')[col - 1] !~ '\k' - return "\" - else - return "\" -endif -endfunction -inoremap =InsertTabWrapper() -inoremap