← Back to context

Comment by chubot

6 months ago

> `[` in one context is an index, in another it’s test. vim can match both, but it can’t decide which meaning is active unless the outer mode is remembered. and that’s the gap

ysh.vim solves exactly that problem.

The [ in command mode (test) is not highlighted.

In contrast, the [ within expressions like a[i] is highlighted (currently Normal, but you can make it any color - https://github.com/oils-for-unix/oils.vim/blob/main/syntax/l... )

Again I recommend trying it. Verify what you think the bugs are. I think you have some preconceptions based on using other Vim plugins.

Vim's model is powerful enough to write good plugins, or bad plugins. That is one of the main points of this article.