I have just started using vim and am using an existing .vimrc and .gvimrc. It works great, except the Tab key doesn't tab...it brings up a code completion plug-in. I don't know where to start as I am brand new to vim. How can I make the Tab key generate a tab???
Bind Tab+Ctrl+Ansi (or non-ANSI equivalent) to \E[27;5;9~ . In your . vimrc add your bindings in the form of: nnoremap <C-Tab> :tabn<CR> and nnoremap <C-S-Tab> :tabp<CR>
All the above works for new files. To convert tabs to spaces in the currently opened file in Vim, enter the Normal mode by pressing Esc key. Now use the retab command by pressing the ':' (colon) character and Vim will convert the existing tabs to spaces.
Within Vim, type a colon and then "set tabstop=4" which will set the tabs to display as four spaces. Hit colon again and type "set expandtab" which will insert spaces for tabs. You can put these settings in a . vimrc (or _vimrc on Windows) in your home directory, so you only have to type them once.
First, find out which script or plugin changed the meaning of your key:
:verbose imap <Tab>
Then disable the offending plugin by removing it from your ~/.vim/plugins.
If all you want to do is disable the tab mapping just do:
:iunmap <Tab>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With