How to map keys in vim

2010.01.18 01:26
I want to map <Ctrl + S> as Save command in Vim.
Becuase <Ctrl+s> stops the output in the terminal, it's important to change the shortcut first using stty command.



># stty stop ^K



In the terminal, <Ctrl+S> command is stop printing inputs

># vim .vimrc
map <C-S> :w<CR>                 'command mode
map! <C-S> <Esc>:w<CR>       'insert mode

References
1. How to map keys in vim, http://how-to.wikia.com/wiki/How_to_map_keys_in_vim
2. Mapping keys in Vim - Tutorial, http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_1%29
3. Mapping Keys, http://newbiedoc.sourceforge.net/tutorials/vim/mapping-vim.html.en
저작자 표시
신고

'linux > vim' 카테고리의 다른 글

Tag List on the side Windows in Vim.  (0) 2010.12.03
Indenting XML in vi editor  (0) 2010.04.01
How to map keys in vim  (1) 2010.01.18
Vim Tips  (0) 2010.01.06
To Comment/Un-Comment single/multiple lines of code for different source file  (0) 2009.12.16
Switch to next/previous file in VIM  (0) 2009.11.07

Frank kenshin579 linux/vim ,

  1. 이것좀 퍼갈께요 ~~ 와 유용하네요^^