Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gvim tab key doesn't work

Tags:

vim

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???

like image 837
CocoB Avatar asked Jul 26 '10 15:07

CocoB


People also ask

How do I map Ctrl tab in Vim?

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>

How do I set tabs in Vim?

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.

How do I indent to 4 spaces in Vim?

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.


2 Answers

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.

like image 170
Marius Gedminas Avatar answered Sep 19 '22 11:09

Marius Gedminas


If all you want to do is disable the tab mapping just do:

:iunmap <Tab>
like image 36
JSBձոգչ Avatar answered Sep 17 '22 11:09

JSBձոգչ