Improving VIM skills

I decided to study VIM more to master it better. I just started watching https://www.youtube.com/watch?v=SkdrYWhh-8s and Ben made a great point already in the first 6mins.

Map saving to Ctrl+s

# ~/.vimrc
nnoremap <c-s> :w<CR>
inoremap <c-s> <Esc>:w<CR>
vnoremap <c-s> <Esc>:w<CR>

I switched to Z shell so:

# ~/.zshrc
vim() STTY=-ixon command vim "$@"
alias vi="vim"

More info at
https://stackoverflow.com/questions/3446320/in-vim-how-to-map-save-to-ctrl-s
https://unix.stackexchange.com/questions/59770/saving-with-ctrl-s-in-vim

Advertisements

About Michal Zuber

Biker and rollerblader. Owner and developer at http://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in vim and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s