In doing anything for extended periods of time, you pick up a few tips and tricks. You can judge me all you want for what I may have learned too late, or that the way I do things isn’t actually the best. I don’t care.
Listed below are tips, tricks, and settings. Everything is subjective (but you can still be wrong). Most of my settings and keybindings can be found in my dotfiles repo.
VSCode
Alt
and using arrow keys on current line or selected lines can move things around.Ctrl + p
is your best friend. Just use it.- Find files.
- Run commands (
>
). - Use the
@
in the command palette to search for symbols quickly. This is for one file.#
for all the code. :
just like Vim will get you to a line.
- Click +
Alt
will let you have multiple cursors.Ctrl + Alt
and arrows will let you extend adjacent lines. - Select code and do
Ctrl + /
to comment and uncomment. Ctrl + x
cuts a line.Ctrl + `
opens the integrated terminal. I hate this binding with a passion. I have it bound toCtrl + \
. I have the split editor rebound toShift + \
since my Tmux config also has vertical split bound to<leader> Shift + \
.- Use
Ctrl
and left-right arrows to go between parts of the text faster to fix mistakes.
- Use
- VSCode can rename symbols. Use
Find All References
then rename. Use with caution.
Neovim
- Building a config from scratch or building a config is up to you. Personally, I found myself coming back to LazyVim a lot. Has stuff I use anyways:
- I’m lazy, so I use LazyGit.
- I don’t really change any keybindings for NVIM. I probably should but haven’t found a case to make changes yet.
Tmux
- A couple of must have lines in your
.tmux.conf
:set-option -sa terminal-overrides ",xterm*:Tc"
for fixing colours.set -g mouse on
is handy for copying. Let’s be real, do you really want vim style copying for large terminal output? No.set -g base-index 1
,set -g pane-base-index 1
,set-window-option -g pane-base-index 1
, andset-option -g renumber-windows on
are used together to have numbers not start at 0. Keeps things linear on the keyboard since I don’t use a numpad.- If you use the default
<leader>
keys you are a psychopath. I rebind mine toCtrl + s
withset -g prefix C-s
. - Rebind the pane navigation keys with
setw -g mode-keys vi
andbind-key KEY select-pane DIRECTION
. - I know some people might complain that my pane splitting keybindings are not ideal, and to them I say to step on a Lego. I use
Shift + \
andShift + -
to split vertically and horizontally. Additionally, I specify that the new pane should have the same path as the one I’m splitting from. I firstubind KEY
and thenbind-key KEY split-window DIRECTION -c "#{pane_current_path}"
and replaceKEY
andDIRECTION
with the necessary values.
- TPM is a necessity. Use it. I try to keep my stuff minimal so the plugins I use are Tmux-Yank and the Catppuccin or Nord theme (depending on what I am feeling). There are many other amazing plugins that may be handy situationally.
- I don’t really use windows at all. I have found that the pane-only workflow seems to work best for me.
- If you work on a server, just use Tmux. Disconnecting from the server doesn’t quit your session.