Skip to content

Instantly share code, notes, and snippets.

@nisaacson
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save nisaacson/4e17cb6abc4345833416 to your computer and use it in GitHub Desktop.

Select an option

Save nisaacson/4e17cb6abc4345833416 to your computer and use it in GitHub Desktop.

Revisions

  1. nisaacson renamed this gist Jun 3, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. nisaacson created this gist Jun 3, 2014.
    10 changes: 10 additions & 0 deletions align
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Bundle 'junegunn/vim-easy-align'
    map <Leader>r :call EnterAlign()<cr>

    function! EnterAlign()
    let save_cursor = getpos(".")
    let l:win_view = winsaveview()
    :execute "normal vip\<Enter>="
    call winrestview(l:win_view)
    call setpos('.', save_cursor)
    endfunction