Skip to content

Instantly share code, notes, and snippets.

@skalnik
Created April 5, 2012 03:26
Show Gist options
  • Select an option

  • Save skalnik/2307726 to your computer and use it in GitHub Desktop.

Select an option

Save skalnik/2307726 to your computer and use it in GitHub Desktop.
<Leader>al to move down a line and insert delta of spaces
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
@skalnik
Copy link
Copy Markdown
Author

skalnik commented Apr 5, 2012

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment