Friday, February 28, 2014

VIM got fork: Neovim reports (German) that VIM has got a fork. The name of the new fork is Neovim. The site at the moment has only two things: link to donation site and link to Github repo.

I do not approve of redundant forks. But IMHO VIM source code is in dire need of clean up.

Bram doesn't approve. Discussion on the vim_dev group.

In the end, we'll see in couple of years whether the people behind Neovim have what it takes.

Saturday, February 15, 2014

A trick for keywordprg

Scouting web for what's possible with git aliases, I have found a cool trick on how to combine/chain calls to several tools when the program allows to configure only one. The trick turned out to be not new, but more of the old, forgotten ones: define one-shot shell function.

Example. How to make perl's keyword program to look into both functions and module helps.

Old one, looking only for function's help:

au BufReadPost *.pl set keywordprg=perldoc\ -f

The trick in action:

au BufReadPost *.pl set keywordprg=f(){\ perldoc\ -f\ $*\|\|perldoc\ $*;};f

Deescaped command looks like that: f(){ perldoc -f $* || perldoc $*; }; f

VIM would append the word to search for at the end and run it. Shell would see pretty normal function definition and immediately after a call to it.

The trick obviously works only on the platforms which have Bourne shell.