Tutorial by Examples

:g/Hello/d Will delete every line containing the text "Hello". Important note: This is not the normal mode command d, this is the ex command :d. You can use the global command to apply normal mode keystrokes instead of ex commands by prepending normal or norm to the command. For exampl...
The command :g/apples/y A will yank all lines containing the word apples into the a register, which can be pasted with "ap. Any regular expression can be used. Note the space before the A, and the capitalization of the register letter. If a capital letter is used as the yank register, matc...
a simple yet very useful command: :g/ending/m$ moves lines containing ending to the end of the buffer. m means move $ means end of buffer, while 0 means beginning of buffer.

Page 1 of 1