The Living Thing / Notebooks :

Visual Studio Code

Atom for finite time

A text editor.

VS Code is Microsoft’s competitor to Atom, with a similar technology stack, but somewhat cleaner and faster.

I am not clear on its relationship to the flabby Visual Studio. Just some shared branding without any particular shared code? IDK, don’t care enough to ever find out.

Anyway, VS Code is pretty good, it turns out.

Needful extensions

Previewing markdown

It comes with a built-in markdown preview, but you want mathematics support, no? Yeah you do.

You can augment native markdown preview with math support or replace the whole preview setup with the revamped Markdown Preview Enhanced, which is very luxurious but hangs sometimes and is a bit messier. The augmented-native solution “feels” nicer, and faster, but sadly, I need math macro support because writing math without macros is a deal-breaker for various colleagues of mine, and that needs Mathjax-based rendering, which needs Markdown Preview Enhanced. UPDATE: mdmath supports macros although a little quirkily.

spelling

Spellright seems to be the best one, in terms of being fast and well-integrated into the OS.

However, it’s too aggressive with spellchecking latex math in markdown documents. Here is a workaround.

    "spellright.ignoreRegExpsByClass": {
        "markdown": [
            "/\\\\[^\\\\ {]*/g"
        ]
    }

Various config one needs

You config is in a JSON file, which is quaintly retro but does mean that 3rd party config is at least not purely abysmal. The path location is the following:

hover/tooltip/hint completions things are too intrusive

There are a lot of features which huddle under the opaque umbrella of intellisense, because they let someone in marketing get too near the product. Now it’s alls confusing. First, which is hover, which is hints etc?

The thing that appears when you mouse over a character is hover. It probably does something useful in statically-typed languages, but ends up just being annoying in, e.g. javascript/python

You want

    "editor.hover.delay": 3000,

so it activates after 3 seconds instead of RIGHT NOW LOOK AT ME OH SORRY WERE YOU TRYING TO READ SOMETHING ON THE SCREEN

Possibly also

    "editor.hover.sticky": false,

The hints are probably also being annoying, right? because instead of letting you finish a line it wants to to insert some wacky argument?

    "editor.acceptSuggestionOnEnter": false,

That can be toned down by language for e.g. markdown.

How about bracket closing? (brrrrr) If you are like me and you are offended by every implemetntion of bracket closing you have yet seen, you want, in your config

    "editor.autoClosingBrackets": false,

Aaaaahhhh that’s better.

Outline is mostly imports

If you are using the (deprecated) code outline extension, Alex Gvozden’s solution:

    "symbolOutline.topLevel": [ "Class", "Module", "Constructor", "Function", "Method" ]

AFAICT the built-in one doesn’t do this.

Which language is that file?

Want to associate file types to certain languages?

    "files.associations": {
        "*.thor": "ruby",
        "*.jsx": "javascript"
    }

Privacy

Want to disable reporting your habits to Microsoft?

    "telemetry.enableTelemetry": false

Bonus gotchas

Command line not working

You want it to work from the command line for fish on OSX?

set -U fish_user_paths "/Applications/Visual Studio Code.app/Contents/Resources/app/bin" $fish_user_paths

Go to symbol doesn’t work

Go to definition? go to symbol? idk; there are a lot of similar features here for code navigation It turns out go to symbol is somewhat broken generally, and totally arsed for python.