Explorar o código

Move text left and right with alt h/l

Andrew Swistak %!s(int64=8) %!d(string=hai) anos
pai
achega
c7c7bf9e44
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      vimrc

+ 7 - 0
vimrc

@@ -127,6 +127,13 @@ nnoremap <silent> <A-k> :m-2<CR>==
 vnoremap <silent> <A-j> :m '>+1<CR>gv=gv
 vnoremap <silent> <A-k> :m '<-2<CR>gv=gv
 
+" Move text left/right via alt+[hl]
+nnoremap <silent> <A-l> "mx"mp
+nnoremap <silent> <A-h> "mxhh"mp
+" TODO: Maintain selection
+vnoremap <silent> <A-l> "mx"mp
+vnoremap <silent> <A-h> "mxhh"mp
+
 " Clear searches so there aren't underlined words.
 nnoremap <silent> <C-i> :nohlsearch<CR>