Tuesday, March 20, 2012

VIM quickies

Just discovered a quick and easy way in vim to convert a multi-line command (saperated by a \) into 1 line.


In normal mode, type:
$xj0y$k$pjdd

This will convert

eval --some-very-long-long \
--command "that spans two lines"


into


eval --some-very-long-long --command "that spans two lines"