diff --git a/.vimrc b/.vimrc index d3d4c98..0753037 100644 --- a/.vimrc +++ b/.vimrc @@ -115,6 +115,16 @@ augroup DisableAutoComment autocmd BufEnter * setlocal formatoptions-=o augroup END +" https://vim.fandom.com/wiki/Autocomplete_with_TAB_when_typing_words +function! TabOrComplete() + if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w' + return "\" + else + return "\" + endif +endfunction +inoremap =TabOrComplete() + " }}} " GUI {{{