Tips, Tricks & More

Keyboard Shortcuts

iTerm

You might be familiar with shortcuts to skip a word (βŒ₯) or go to start/end of the line (⌘). iTerm is not set up to work with these shortcuts by default but here’s how you set them up:

Open up iTerm2 preferences (⌘ + ,) -> Keys -> Key Bindungs -> Click on + icon (add new Keyboard shortcut). [Source]

ShortcutExplanationActionInput
βŒ˜β†Moving to the beginning of the lineSend Escape SequenceOH
βŒ˜β†’Moving to the end of the lineSend Escape SequenceOF
βŒ₯←Moving to the start of a wordSend Escape Sequenceb
βŒ₯β†’Moving to the end of a wordSend Escape Sequencef
βŒ₯←DeleteDeleting a wordSend Hex Code0x17
βŒ˜β†DeleteDeleting a lineSend Hex Code0x15

1Password

Fill Login on current web page: (⌘ + $)

Aliases

Tips & Tricks

VS Code

To be able to select the whole PHP variable remove the $ symbol from the editor.wordSeparators directive. [Source]

To have the same terminal setup in VS Code as in iTerm, set the setting terminal.integrated.shell.osx to /bin/zsh.

Setup GitHub Co-Pilot for code suggestions.

Recommended extensions:

Terminal completion

Oh My Zsh

Oh My Zsh has several plugins which provide completion as well as aliases for frequent commands.

To enable them, add/extend the plugins setting in ~/.zshrc. Example:

plugins=(git npm wp-cli composer ssh-agent assh)Code language: Bash (bash)

To install the assh plugin, use the following command:

git clone git@gist.github.com:31371768e6b6f47e06feb3ba34906361.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/asshCode language: JavaScript (javascript)

Fig

IDE-style autocomplete to your existing terminal. Install using brew install fig