Tag Archives: emacs

Readline

Just a quick post but the readline library keybindings are very interesting –
you just don’t need the home|end keys anymore. For the uninformed, here’s the
excerpt I’m talking about (man readline):

Emacs Mode
Emacs Standard bindings

“C-@” set-mark
“C-A” beginning-of-line
“C-B” backward-char
“C-D” delete-char
“C-E” end-of-line
“C-F” forward-char
“C-G” abort
“C-H” backward-delete-char
“C-I” complete
“C-J” accept-line
“C-K” kill-line
“C-L” clear-screen
“C-M” accept-line
“C-N” next-history
“C-P” previous-history
“C-Q” quoted-insert
“C-R” reverse-search-history
“C-S” forward-search-history
“C-T” transpose-chars
“C-U” unix-line-discard
“C-V” quoted-insert
“C-W” unix-word-rubout
“C-Y” yank
“C-]” character-search
“C-_” undo
” ” to “/” self-insert
“0” to “9” self-insert
“:” to “~” self-insert
“C-?” backward-delete-char

Advertisements

Time Saving Vim Movement Tips

I must admit, even though I’ve been learning how to use Emacs, I’m still learning new tricks for Vim.

When I browse through the Vim help documents, I _always_ learn something new.

Today I will show you some time saving tips for moving around in Vim.

Basic

w - move forward by a word
Jack!  R_e_member that you have an appointment tomorrow.
w
Jack!  Remembe_r_ that you have an appointment tomorrow.

b - move backward by a word
Jack!  Remembe_r_ that you have an appointment tomorrow.
b
Jack!  _R_emember that you have an appointment tomorrow.

fx - search forward for the character x
Jack!  Reme_m_ber that you have an appointment tomorrow.
fo
Jack!  Remember that y_o_u have an appointment tomorrow.

tx - search to the character x
Jack!  Reme_m_ber that you have an appointment tomorrow.
to
Jack!  Remember that _y_ou have an appointment tomorrow.

Fx - search backward to the charater x
Jack!  Remember that _y_ou have an appointment tomorrow.
FR
Jack!  _R_emember that you have an appointment tomorrow.

Tx - search backward to the character x
Jack!  Remember that you have an _a_ppointment tomorrow.
Tc
Jac_k_!  Remember that you have an appointment tomorrow.

; - repeat command
, - repeat command in the opposite direction

% - move to matching paren, e.g. [{()}]
[_[_ -e ~/.xinitrc ]]
%
[[ -e ~/.xinitrc _]_]

Ctrl-U - move the window up a screenful
Ctrl-D - move the window down a screenful
Ctrl-E - move the window up a line (keep the cursor in the same place)
Ctrl-Y - move the window down a line (keep the cursor in the same place)
zt - move the window so the cursor is at the top of the screen
zb - move the window so the cursor is at the bottom of the screen