We edit text everyday. emails. blogs. code. documents. notes. Why not become efficient!
First, you much choose an editor. I choose ViM.
Second, you must learn techniques for becoming efficient.
Here is a list of my productivity tips
search
- forward search— in command mode, press ‘/’ (forward slash) and type the search pattern.
- reverse search — in command mode, press ‘?’ to reverse search the previous pattern.
- highlight — enable search highlighting to see all matches visible in the current window. Add ‘
set hlsearch
‘ to your .vimrc - incremental — enable incremental matching to automatically see matches as you type a pattern. Add ‘
set incsearch
‘ to your .vimrc
navigation
- breadcrumbs — keep a trail of lines you want to return to by setting marks. To set a mark, press
m<a-zA-Z>
. To return to a mark from anywhere in the file, press'<a-zA-Z>
(single tick).For example, the keystrokemc
will create a mark at location c and'c
will return!
copy/paste
- registers — copy arbitrary lines of text into registers then paste them later on. To copy text, enter visual mode
v
, usehjkl
to select the lines, then specify a register"<a-z>
and yanky
! For example, after selecting text, store it into register m with the keystrokes"my
. View the contents of all registers with:reg
.