Skip to content

Commit

Permalink
Visual mapping for moving columns
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Jul 20, 2011
1 parent 4cb1029 commit 1d37b2e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions modules/mapping.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ function TrimWhiteSpace()
map <Leader>o :call TrimWhiteSpace()<CR>
"Moving lines
nnoremap <C-j> :m+<CR>==
nnoremap <C-k> :m-2<CR>==
inoremap <C-j> <Esc>:m+<CR>==gi
inoremap <C-k> <Esc>:m-2<CR>==gi
vnoremap <C-j> :m'>+<CR>gv=gv
vnoremap <C-k> :m-2<CR>gv=gv
noremap <C-j> :m+<CR>==
noremap <C-k> :m-2<CR>==
noremap <C-j> <Esc>:m+<CR>==gi
noremap <C-k> <Esc>:m-2<CR>==gi
noremap <C-j> :m'>+<CR>gv=gv
noremap <C-k> :m-2<CR>gv=gv
vnoremap <C-l> xp
vnoremap <C-h> x<left>P
"Rope stuffs
autocmd FileType python map <C-g> :RopeGotoDefinition<CR>
Expand Down

0 comments on commit 1d37b2e

Please sign in to comment.