Tag: Vim

On Vim’s being institutionally outdated

I adore Vim, I use it every day, and I wouldn’t dream of switch­ing to any­thing else, but every once in a while I’m remind­ed of anoth­er thing about it that is just unequiv­o­cal­ly bad and inde­fen­si­ble.

I was read­ing about the “CoC” plu­g­in (“Con­queror of Com­ple­tion”) this morn­ing when I thought, “Wait, can’t Omni com­ple­tion do some of that?” So I opened up Vim with a min­i­mal .vimrc and typed:


<C-x><C-o> opens Vim’s native Omni com­ple­tion func­tion, which I would expect to be at least some­what cur­rent on JavaScript meth­ods in 2020. Instead, noth­ing came up.

I had a look at the source of the JavaScript com­ple­tion func­tion in Vim, and found this: a file that was last updat­ed three years ago, but that hasn’t been mean­ing­ful­ly updat­ed since 2006.

So how have Vim users been get­ting by?

Con­tin­ue →

HTML indent settings in Vim

Despite not agree­ing with all of it, “Just Use Sub­lime Text” (an invec­tive against Vim — or, more accu­rate­ly, against rec­om­mend­ing Vim to any­one who isn’t already indoc­tri­nat­ed by it) by Andrew Ray is an inter­est­ing read. The sec­tion deal­ing with indent­ing in par­tic­u­lar struck a chord with me:

Paste this into an emp­ty buffer:


:set ft=html and then gg=G. Let me know what you get. In all seri­ous­ness, nev­er, ever tell me what you get.

As I said in a tweet, what I got did­n’t offend me too much. But many peo­ple would argue that the <span> tag should be indent­ed inside the <p> tag. I’d prob­a­bly do this myself, actu­al­ly — and there have been aspects of Vim’s indent­ing that irk me. So I set about find­ing a solu­tion.

Con­tin­ue →