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]
| Shortcut | Explanation | Action | Input |
|---|---|---|---|
| ββ | Moving to the beginning of the line | Send Escape Sequence | OH |
| ββ | Moving to the end of the line | Send Escape Sequence | OF |
| β₯β | Moving to the start of a word | Send Escape Sequence | b |
| β₯β | Moving to the end of a word | Send Escape Sequence | f |
| β₯βDelete | Deleting a word | Send Hex Code | 0x17 |
| ββDelete | Deleting a line | Send Hex Code | 0x15 |
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:
- EditorConfig for VS Code – Override editor settings with those found in .editorconfig files
- Live Share – Pair programming
- ESLint – Interface for ESLint (JavaScript coding standards) config
- Stylelint – Interface for Stylelint (CSS coding standards) config
- phpcs – Interface for PHP_CodeSniffer (PHP coding standards) config
- phpcbf – PHP Code Beautifier and Fixer based on PHPCS config
- PHP Intelephense – PHP code intelligence
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