Auto indent pasted text in vim

'=' is to indent, '`]' is to do it until the end of the pasted text,
and '<C-o>' brings the cursor back to the start of the pasted text.
This commit is contained in:
Victor Mours 2015-07-17 10:49:44 +02:00
parent e5b3c4cbeb
commit f38019e044

4
vimrc
View File

@ -65,6 +65,10 @@ set softtabstop=2
set tabstop=2
set expandtab
" Auto indent pasted text
nnoremap p p=`]<C-o>
nnoremap P P=`]<C-o>
filetype plugin on
filetype indent on