Tag Archives: vi/vim

Vim: Yank to a specific buffer

Why do I have such a hard time yanking to a specific buffer…

I’m writing this to have some notesĀ  to go back to.

To yank (copy) to a specific buffer, do the following:

  • Press ESC to get to command mode
  • Press v to get a visual view of the selected text, move around as per usual to mark more lines, word, paragraphs, etc
  • Press “a to choose buffer a to hold the yanked text (That’s double quote, followed by an a. Replace a with b to yank to buffer b, etc…)
Posted in Linux | Tagged , , , , , | Leave a comment

Bash hot-keys

Just a quick mentioning of some Bash hot-keys to make your life easier.

I use Vi/Vim as my editor, but prefer the Emacs hot-keys which is default in the Bash shell.

You can actually shift between Vi and Emacs hot-keys by executing:

set -o vi


set -o emacs

The following hot-keys all work in Emacs mode:

Key Effect and memory hook
ctrl-l clear the screen, lose all previous output
ctrl-c abort current line (or the running process)
ctrl-r search in history while typing
ctrl-e jump to the end of the line
Posted in Linux | Tagged , , , , , , , | 2 Comments