Some easy-to-forget vim tricks.
| Command | Description |
|---|---|
| :set rnu | set relative numbers |
| :set number | set line numbering |
| :e[dit] | open |
| :Explore | open dir |
| :Sexplore | open dir in hortizontal split (:sp) |
| :Vexplore | open dir in Vertical split (:vs) |
| :g/{pattern}/d | delete lines matching {pattern} |
| :g!/{pattern}/d | delete lines not matching {pattern} |
| :v/{pattern}/d | delete lines not matching {pattern} |
| :w !sudo tee % | open currently edited file with sudo |
Comments