Skip to content

Commit

Permalink
Adding mappings for moving lines up and down.
Browse files Browse the repository at this point in the history
  • Loading branch information
reu committed Feb 20, 2013
1 parent 219bd7f commit 492cbd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" key mapping for moving lines up and down
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
" NERDTree
silent! nmap <silent> <Leader>p :NERDTreeToggle<CR>
nnoremap <silent> <C-f> :call FindInNERDTree()<CR>
Expand Down

0 comments on commit 492cbd7

Please sign in to comment.