Sublime Forum

What are some (semi-)important things Sublime can do, and VSCode cannot?

#1

I can start with some examples. I could be wrong about some, possibly all, of these (ie wrong that they are unique to sublime), but hopefully I can provoke someone to correct me.

(built-in) semantic highlighting

which I personally find really convenient esp. when you have a preference to use terse variable names

https://www.sublimetext.com/docs/3/color_schemes.html#hashed_syntax_highlighting

a lot of regex features I use all the time that are simply not supported in vscode

VS Code does support regular expression searches, however, backreferences, lookaround, and multiline matches are not supported. This is because VS Code depends on the search tool ripgrep, which, while extremely fast, doesn’t support these advanced regex features.

possiblity of GUI automation

This one is somewhat esoteric, but on Windows, because Sublime is a native app rather than Electron based, you can use external programs to send WM_COMMAND messages to Sublime for every commands that has an entry in its menus. This, plus the fact that you can edit the menus (I added an extra menu that has a lot of my commands), means it’s very easy to control sublime externally, and means a lot more customization possibilities. For example, if you want to use capslock as some dedicated modifier for some special class of operations (without mapping it to be ctrl, which can be done at the OS level), or if you want to make the shift key on the right do something different from the one on the left, you can’t do this in sublime’s keyboard preferences file, because capslock is not recognized as a modifier, and the two shift keys are not distinguished. (You can’t do this in VSCode’s either). Of course, you can always create a new shortcut corresponding to the command in question, and map, say “capslock + k” to “ctrl + alt + shift + F12”, but this is a level of indirection, a lot messier and can lead to tons of bugs. It’s much nicer to be able to directly execute an editor command externally, and it’s trivial to do that when you can send WM_COMMAND messages.

better completion (?)

This one I’m not 100% certain is not unfixable, but every time I switch to Code I run into cases where I’m typing a part of some var name expecting the full name to show up in completion, but then nothing happens. Most of these cases are ones where the var name has just been declared in the line immediately above.

0 Likes

#2

about interaction from external programs, Sublime also lets you execute commands using the subl console application, which works on all supported OSes

0 Likes

#3

That’s right, although if I need to run a command very frequently (e.g. move a tab to the left/right, select subword under caret, etc) I find the delay somewhat affecting user experience, whereas windows messages are instantaneous

0 Likes