After years of using IntelliJ, I decided to give VS Code a try. There are some of the extensions and commands I used to ease the transition.
Commands (MacOS)
- Guide to shortcuts: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf?WT.mc_id=code-online-jopapa
- Select column: Command + Option + Shift and then use the arrow keys to move the cursors
- Select instances of some text in a file: Select text the command + shift + L
- Duplicate line: Shift + Option + down arrow
- Open terminal: Ctrl +` or Command + J
- In VS Code, if you have a file open, and switch branches, the code doesn’t change to match what is in the new branch.
- When a project/directory/folder from the File menu, I wanted it to open in a new window by default. You can get this to happen by going to File > Preferences > Settings > Window > New Window > Open Folders in New Window and selecting “on”
- Turn off file preview (when you click on a file, it opens in the browser, but doesn’t really open): Settings > Workbench › Editor: Enable Preview
- How do I auto generate comments for functions that have params, etc. from them? Preferences > Settings > Text Editor > Files > Trim Trailing Whitespace
- When I close a file, explorer scrolls to a different place: change the setting for “Explorer: Auto reveal” to focusNoScroll
- How to comment out multiple lines at one time: command + /
Extensions
- Show eslint issues in the editor: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint (I had to restart vscode and give it click through a dialogue for it to work)
- Add colors to matching brackets, etc.:
- Auto close tags: https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag
- Auto rename tags: https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag
- Add colors to comments: https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
- Copy Relative Path: https://marketplace.visualstudio.com/items?itemName=alexdima.copy-relative-path
- Open a file in a browser: https://marketplace.visualstudio.com/items?itemName=igordvlpr.open-in-browser
- Open the file in VS Code, Command + Shift + P, Command: Open in Browser
- Running PHP unit tests: (required installing composer to install phpunit, etc.) https://marketplace.visualstudio.com/items?itemName=emallin.phpunit&ssr=false#overview. (Open up the phpunit.xml config file, hit command + shift + p, type unit test and go from there
- Show a vertical line indicating where your indentations are: https://marketplace.visualstudio.com/items?itemName=SirTori.indenticator
- Material theme: https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme
- Spell check: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker