- Works even under the most spartan conditions (in a simple remote shell window such as xterm, putty), with syntax highlighting, function folding, tabs, buffers, and all that lightning fast
- Delete lines matching pattern:
g/pattern/d
- Delete lines not matching pattern:
g!/pattern/d
- Sort buffer:
:%sort
- Filter buffer through command
:%!sort -u
- Delete from current line until end of file (try with a large file!)
- Increment numeric values:
C-a
,C-x
- Complete line pattern
C-x C-l
- Convert a DOS file (with CRLF line endings) to UNIX:
:set ff=unix
(and then save it) - Multiple marks, with
m
+ register name, for examplema
. Jump to a mark using'
+ register name, for example'a
- Macros: record keystrokes, assign them to a particular key on the keyboard, and then play them back one or more times later. (With certain macros, the
C-a
trick above also comes in handy!) - Edit binary files (with a little help from
xxd
)
Last active
December 24, 2016 04:15
-
-
Save janosgyerik/8556496 to your computer and use it in GitHub Desktop.
Things only Vim can do easily
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment