Some VIM Tips
I have been using VIM for several years. Throughout the years I find new ideas for VIM customization by crawling through other developers’ vimrc. In this post, I selected some configurations from my vimrc that I think other developers may find useful.
Allow backspacing over everything in insert mode
set backspace=indent,eol,start
Improve up/down movement on wrapped lines
nnoremap j gj
nnoremap k gk
nnoremap <down> gj
nnoremap <up> gk
Reselect visual block after indent/outdent
vnoremap < <gv
vnoremap > >gv
Allow for cursor beyond last character
set virtualedit=onemore
Keep search pattern at the center of the screen
nnoremap n nzz
nnoremap N Nzz
Maintain column position after paste and other operations
set nostartofline
Use system clipboard
if has("unnamedplus")
set clipboard=unnamedplus
else
set clipboard=unnamed
endif