0% found this document useful (0 votes)
11 views10 pages

5 Tools For Senior Engineers (Code Without Your Mouse)

The document provides an overview of various tools and commands related to text editing and window management, focusing on vi, Vimium, Neovim, and TMux. It includes key commands for navigating and editing in vi, browser navigation with Vimium, and session management in TMux. Additionally, it discusses shell configuration files for setting up aliases and functions to enhance productivity in terminal environments.

Uploaded by

loopspell1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

5 Tools For Senior Engineers (Code Without Your Mouse)

The document provides an overview of various tools and commands related to text editing and window management, focusing on vi, Vimium, Neovim, and TMux. It includes key commands for navigating and editing in vi, browser navigation with Vimium, and session management in TMux. Additionally, it discusses shell configuration files for setting up aliases and functions to enhance productivity in terminal environments.

Uploaded by

loopspell1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

7/8/24, 11:58 PM DailyCode

Introduction

https://projects.100xdevs.com/pdf/senior/se-1 1/10
7/8/24, 11:58 PM DailyCode

vi
vi is a terminal based editor

Normal mode
1. h → left, l → right , j → down, k → up, (हंसते लोग लगातार रास्ते जाम देख कर उदास होते हैं)

2. 0, $

3. e, b

4. gg, G

5. p ⇒ paste

Visual mode
1. h → left, l → right , j → down, k → up

2. 0, $

3. e, b

4. gg, G

5. y ⇒ copy

6. d ⇒ cut

Insert mode
Type away!
https://projects.100xdevs.com/pdf/senior/se-1 2/10
7/8/24, 11:58 PM DailyCode

Extra commands
1. Exiting out of vi

1. :q

2. :q!

3. :wq!

2. Undo redo

1. u - undo

2. ctrl + r - redo

3. Search

1. / + what_to_search

2. :line_number - go to line

vimium

Vimium lets you navigate the browser with just your keyboard
https://projects.100xdevs.com/pdf/senior/se-1 3/10
7/8/24, 11:58 PM DailyCode

Chrome link -
https://chromewebstore.google.com/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb

Helpful keymaps
1. ? - help

2. d, u

3. j, k

4. r to reload

5. f, F to see links (F opens it in a new tab)

6. Tab management

1. J → Left tab

2. K → Right tab

3. g0, g$ → First tab, Last tab

Neovim

https://projects.100xdevs.com/pdf/senior/se-1 4/10
7/8/24, 11:58 PM DailyCode

nvim is a fork of vim. It provides you a rich plugin system that lets you create plugins in
vimscript or lua

Ref - https://neovim.io/

Easiest way to get started is to use some default configurations

1. nvchad - https://nvchad.com/

2. lazyvim - https://www.lazyvim.org/

Vim in VSCode

https://projects.100xdevs.com/pdf/senior/se-1 5/10
7/8/24, 11:58 PM DailyCode

The vim plugin in VSCode lets you use vim keymaps inside VSCode to start a slow migration
towards vi

Window managers

https://projects.100xdevs.com/pdf/senior/se-1 6/10
7/8/24, 11:58 PM DailyCode

Window managers let you move around and position windows on your machine

1. i3 (linux)

2. Rectangle (mac)

1. ctrl + optoin +

1. left arrow key

2. right arrow key

TMux 3. enter

4. U

5. I

6. J

7. K

https://projects.100xdevs.com/pdf/senior/se-1 7/10
7/8/24, 11:58 PM DailyCode

Ref - https://github.com/tmux/tmux/wiki
TMux stands for terminal multiplexer

It let’s you create multiple

1. Sessions

2. Windows

3. Panes

💡 I have an alias for t to point to tmux


alias t=tmux

Common commands

1. tmux

2. ctrl + b + d - Detach from the session

3. tmux ls

4. tmux a -t 0

5. tmux new -s aws

6. tmux kill-session -t aws

7. Pane management
https://projects.100xdevs.com/pdf/senior/se-1 8/10
7/8/24, 11:58 PM DailyCode

1. ctrl + b + % - split vertically

2. ctrl + b + “ - split horizontally

3. ctrl + b + arrow key - move around

4. ctrl + b + q - see index of pane

8. Window management

1. ctrl + b + c - create new window in the same session

2. ctrl + b + w - List of sesions + windows

3. ctrl + b + , - Rename the window

4. ctrl + b + n - Move around sequentally

5. ctrl + b + number - Move to window number number

Shell config files


6. ctrl + b + x or ctrl + b + &- kill pane

7. ctrl + b + w followed by ctrl + b + x - kill window


Shell config files let you run some code when the shell starts. You can use this to add aliases and
functions
.bashrc or .zshrc
1. aliases

2. complex functions

export ZSH="$HOME/.oh-my-zsh" Copy


ZSH_THEME="robbyrussell"
source $ZSH/oh-my-zsh.sh

export NVM_DIR="/Users/harkiratsingh/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

export PATH="$PATH:/Users/harkiratsingh/nvim-macos/bin"
alias gc=git commit -m
alias gh git push origin HEAD
alias gs='git status'
alias gaa='git add --all'
alias gd='git diff'

alias .4='cd ../../../../'


alias .5='cd ../../../../..'

alias t=tmux
https://projects.100xdevs.com/pdf/senior/se-1 9/10
7/8/24, 11:58 PM DailyCode

function hg() {
history | grep "$1";
}

https://projects.100xdevs.com/pdf/senior/se-1 10/10

You might also like