vim: move text

This commit is contained in:
Michael Grote 2021-09-19 13:02:37 +02:00
parent 1700a009d1
commit 57209b4ff2

9
.vimrc
View file

@ -113,7 +113,14 @@ nmap <C-t> :tabnew<CR>
" leader-key
:let mapleader = ","
" vim.fugitiv in neuem tab
nmap <C-g> :tab G
nmap <C-g> :tab G
" markiere text im visual mode; suche dann danach mit // im visual-mode
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
" bewege text
" aufruf mit //
" https://www.reddit.com/r/vim/comments/pqiynv/moving_text_one_of_my_favorite_mappings
nnoremap <M-K> <CMD>m .-2<CR>
nnoremap <M-J> <CMD>m .+1<CR>
nnoremap <M-H> <<
nnoremap <M-L> >>