Quellcode durchsuchen

Move text left and right with alt h/l

Andrew Swistak vor 8 Jahren
Ursprung
Commit
c7c7bf9e44
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  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>