GNU/Linux screen-256color bash 1341 views

Moving all SQL DROP statements in a file to the top using a Vim macro.

The macro is recorded using:

qq      # Start recording.
/create # Skip top drop statements by searching for the first create statement.
/drop   # Find the next drop statement.
ddggp   # Move it to the top.
q       # Stop recording.

It can then be run many times over using the normal mode command @q.

More recordings by n2liquid

Browse all

pw-text 0:26

by n2liquid

untitled 1:33

by n2liquid

untitled 1:32

by n2liquid