Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


indent lines after moving #23

gilligan opened this Issue · 1 comment

2 participants


It would be nice if lines would be indented (=) after moving. For single lines it should(?) be as trivial as:

function! s:Move(cmd, count, map) abort
  normal! m`
  exe 'move'.a:cmd.a:count
  norm! ``
  normal! =$
  silent! call repeat#set("\<Plug>unimpairedMove".a:map, a:count)

For the xnoremap up movement it would need something like

exe = . v:count1 . j

but i don't quite grasp the mapping as it is. In either case: i think it would be very useful and there's little chance of this having a negative impact for anyone unless i'm missing something right now.


You can't really count on =. It'll fuck shit up bad in a whitespace sensitive language like Python or Haml, and even in normal languages, indenting algorithms have bugs. The right solution would be to shift the entire block left or right based on the first line, like ]p does, but that's more than a bit harder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.