My Code Extensions

Last updated: January 2020

I’ve previously written about my Sublime Text packages, but I’ve since switched to the excellent VS Code editor.

If you’ve already disregarded this editor based on the Visual Studio prefix in its name, please don’t. There really is no relation to Visual Studio, and I suspect that the marketing team at Microsoft were entirely responsible for the naming prefix.

Unlike Atom, Code really is fast. If you’re used to the speed of ST3 then you won’t be disappointed. It feels like a lightweight editor with a few useful IDE features included, such as Git support, debugging integration, and intelligent code completion.

Here are the extensions I use:

  • Alignment: Align characters (such as equals or colons) in a multiple line selection.
  • Autocomplete WordPress Hooks: Autocomplete provider for WordPress action and filter names.
  • Bracket Pair Colorizer 2: Allows matching brackets to be identified with colours.
  • DashDash documentation integration.
  • GitHub Pull Requests: Allows you to review and manage GitHub pull requests in Code. 
  • Incrementor: Advanced increment / decrement actions for just about anything.
  • Open in GitHub: Jump to a source code line on GitHub, Bitbucket, Visualstudio.com, and GitLab.
  • Peacock: Subtly change the workspace colour of your workspace.
  • PHP Debug: The Xdebug client for VS Code.
  • PHP DocBlocker: More easily create docblocks for your PHP code.
  • PHP Intelephense: A high performance and feature rich PHP language server that provides intellisense, code completion, full symbol search, and a bunch more. (I’ve found this to be much more performant and more reliable than the more popular PHP Intellisense extension.)
  • phpcs (shevaua fork): Hooks up the phpcs sniffer to VS Code.
  • Rainbow CSV: Highlight columns in CSV files in different colours.
  • Remote – SSH: Lets you use any remote machine with a SSH server as your development environment.
  • Sort JSON Objects: Alphabetically sorts the keys in selected JSON objects.
  • Sublime Text Keymap: Imports keybindings (and settings) from Sublime Text to VS Code.
  • Trailing Spaces: Highlight and delete trailing spaces in files.

I also use several linter extensions and a bunch of language extensions. There’s plenty of them.

If you’re a stickler for Sublime Text I’d definitely recommend giving Code a try, along with the Sublime Text Keymap extension.

6 replies on “My Code Extensions”

  1. Hi there, I also checked out VSCode, but went back to ST due to not being able to work out how to include external packages (like the WordPress Code, for example) for code completion, without creating a project file for each of my projects.

    Any chance you also tried this and got it to work?

    1. Yeah I use the relatively new functionality in Code which allows you to add multiple folders to a workspace. I drag the WordPress folder into an existing workspace, then you get all the completion, code navigation, etc. I think the functionality was added in June so it might not have been there when you tried it.

      1. Wow that was fast ;)
        I think I tried that, but always really liked ST’s capability to do stuff like this without the need of creating a workspace. I put my core files to a folder outside of all my projects and sniffed that one with SublimeCodeIntel:

        {
          /*
             Defines a configuration for each language.
          */
          "codeintel_language_settings": {
              "PHP": {
                  "codeintel_scan_extra_dir": [
                    "/Users/name/my/path/to/wp/core",
                    "/Users/name/my/path/to/wp/plugins",
                  ]
              }
          }
        }
          1. …turns out, you can define additional workspace folders relative to the .code-workspace file (in my case inside a WordPress theme folder):

            {
            "folders": [
            {
            "path": "."
            },
            {
            "path": "../../../core"
            },
            {
            "path": "../../plugins"
            }
            ],
            "settings": {}
            }

            So, no need to change those settings ever again, Yejjh ;)

Comments are closed.