## Make vim act like nano

I just fell in love with vim ("the editor") after working for a very long time with nano. I love the way it highlights syntax, indents and copies/cuts/pastes visual blocks and stuff. But I don't like that it takes four+ key presses to save and quit a file. That has been the reason for not switching to it for me.
Now I added some key mapping to reflect nano's behaviour. If someone likes it, feel free to use it, too.

Put this in your /etc/vim/vimrc or ~/.vimrc:

" Make vim act like nano
map <C-O> <Esc>:w<CR>
imap <C-O> <Esc>:w<CR>
map <C-X> <Esc>:q<CR>
imap <C-X> <Esc>:q<CR>
map <C-X><C-X> <Esc>:q!<CR>
imap <C-X><C-X> <Esc>:q!<CR>
map <C-K> <Esc>dd
imap <C-K> <Esc>dd<Esc>i
map <C-U> <Esc>p
imap <C-U> <Esc>p<Esc>i


Save the file with ^O, leave it with ^X (leave it with ^X^X if you modified the file) and some other nice key mappings (^K for cut, ^U for uncut). Works quite well for me.
Have fun!

Just as a side note: I had to escape the HTML tags to show you this code block. http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php is a nice choice for this.