Created
April 5, 2012 03:26
-
-
Save skalnik/2307726 to your computer and use it in GitHub Desktop.
<Leader>al to move down a line and insert delta of spaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map <Leader>al :call MoveDownLine()<CR> | |
function! MoveDownLine() | |
let cols=col('.') | |
execute "normal! j" | |
let next_cols=col('.') | |
let delta_cols=cols-next_cols | |
if(delta_cols > 0) | |
if(next_cols==1) | |
let delta_cols += 1 | |
endif | |
execute "normal! " . delta_cols . "A " | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slightly more fancy?