
What are your favourite keyboard hacks or shortcuts when coding? - asamshah
Newbie dev here. I&#x27;m trying to improve my workflow but trying to not use my mouse at all if possible. Just wanted to see if you guys had any cool keyboard shortcuts or hacks that speed your workflow.
======
jolmg
Use i3, and switch the default keybindings from using j/k/l/; for movement to
using h/j/k/l like vim. Increase the amount you can move floating windows with
the keyboard from 10px to 100px per shortcut keypress. Same thing with the
window resizing shortcuts.

Make CapsLock be another Escape. That key is more useful that way.

You can have bash or zsh use vi-keybindings with a simple `set -o vi`.

You can have all REPLs that use readline use vi-keybindings with a simple `set
editing-mode vi` in ~/.inputrc.

If you use either urxvt or tmux, you can setup a mode that allows you to
control the cursor in the terminal buffer and copy things. This is
tremendously useful for when you executed a command and you want to copy piece
of the output to use in a new command. You can do it in a few keypresses.
Guess what? In both of these you can setup vi keybindings for the cursor
movement.

Now that everything's been set to use vi keybindings, get good at using them
effectively.

Get creative making keyboard shortcuts. I have a shortcut that toggles the
placement of all floating windows in the current workspace to another new
workspace. So I can just hit that to hide all floating windows, work on the
tiling windows below, and then call the floating windows back when I need
them.

You can browse quickly in Firefox using only the keyboard without needing
extensions like Vimperator. When you want to click a link, just Ctrl-f and
type some unique text from the link, hit Enter until you focus the link you
wanted, then Escape and Enter (or Ctrl-Enter if you want a new tab). If you
want to use text near the link because the link's text is too common or is an
image, then do it and then use Tab or Shift-Tab to select the link you want.

Now, you can put the mouse in your drawer.

Just joking, there'll be annoying sites that instead of using <a> tags for
things, they decided to put a click event listener, so you'll have no choice
other than refusing to use those sites.

------
chewz
Ctrl-A - beginning

Ctrl-E - end of line

Ctrl-W - delete word before cursor

Ctrl-K - cut from cursor to end of line

Ctrl-X Ctrl-E - edit line in VIM

Ctrl-D - show choices (git Ctrl-D)

Ctrl-X Ctrl-I - choose selection

Alt-T - transpose words

Alt-F - jump to next space

Alt-B - jump back to previous space

Alt-Backspace - delete previous word

zsh-autocomplete and fzf Ctrl-R for history.

and many more in VIM but that another whole story

