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

untitled 0:50

by n2liquid

untitled 0:15

by n2liquid

untitled 0:24

by n2liquid

untitled 11:14

by n2liquid