Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim mapping key does not work

Tags:

vim

I have been trying to map ctrl s to save during insert mode in vim. It never seem to work

http://vim.wikia.com/wiki/Map_Ctrl-S_to_save_current_or_new_files (and many other tutorials) does not seem to work

I am using iterm, vim 7, and I have .vimrc file under my current user. I have reloaded my .vimrc with :source $MYVIMRC

Did I do something wrong?

Same thing with mapping any other key. mapping just does not seem to work.

like image 773
dvliman Avatar asked Oct 23 '11 08:10

dvliman


1 Answers

Many keys cannot be intercepted on terminal, because they are interpreted by the terminal and not passed to vim at all. Ctrl-S is one of those keys, meaning "suspend" to most terminals. Either use the GUI version of vim, or select key combinations that work on your terminal.

like image 170
Jan Hudec Avatar answered Nov 11 '22 12:11

Jan Hudec