4158 shaares
128 private links
128 private links
Comment inverser des lignes sous vim ?
:g/^/m0
: start command-line mode.
g means you'll take an action on any lines where a regular expression matches
/ begins the regular expression (could have used any valid delimiter)
^ matches the start of a line (which matches all lines in the buffer)
the second / ends the regular expression; the rest is an Ex command to execute on all matched lines (i.e. all lines in buffer)
m means move (:help :move)
0 is the destination line (beginning of buffer)