Neovim Terminal PR Merged

The pull request to add a terminal emulator to Neovim has been merged into master. That means you can now use a terminal from within Neovim!

nvim terminal

There are several ways to start a "terminal buffer", one is to open a file that starts with term://. For example, :e term://zsh. You can send input to the terminal by entering Insert mode -- Neovim just forwards key presses to the terminal process.

Read More →

Script Roundup: vim-showspaces, ColumnTags.vim

vim-showspaces

If you've got a colleague who just can't stop messing up whitespace, then you may want to politely suggest (or surreptitiously install) Laurent Georget's ShowSpaces (GitHub: guiniol/vim-showspaces) plugin.

It's a small albeit focused plugin that shows whitespace at the beginning of lines. You can change the highlight colour and turn it off -- the full details are in the readme and bundled documentation.

ColumnTags.vim

ColumnTags (GitHub: kbairak/ColumnTags.vim) by Konstantinos Bairaktaris is a plugin that uses ctags with split windows to allow you to navigate code.

Read More →

vi-mode for oh-my-zsh

Here's a debate with no right answer: should you use default keybindings or highly customised ones that you prefer? I have tmux set up to use vi-like keybindings, and I have a few vi-inspired tweaks for zsh as well. Now whenever I switch to a colleague's machine that uses tmux I struggle for a few minutes to get used to the standard shortcuts.

If, like me, you like to customise everything, then you might be interested new oh-my-zsh vi-mode changes. There are pull requests for these changes on GitHub, in case you want to help test.

I've summarised the recent changes below:

Read More →

Vim is on GitHub

Google Code is shutting down, so Vim is finally moving to GitHub! You can find it at vim/vim.

I found this through the vim dev group. Given that almost every Vim script that I write about is hosted on GitHub, is seems clear that the community at large prefers GitHub. So why was Vim so slow to follow everyone else? Bram Moolenaar said the following on the vim dev mailing list:

This is not without disadvantages, since it means moving from Mercurial to git. Some may like this, some not. Will take some getting used to. I personally prefer the Mercurial commands, they are more obvious to use.

Read More →

Script Roundup: vim-http-client, gulp-vim

vim-http-client

vim-http-client (GitHub: aquach/vim-http-client) is a simple HTTP client for Vim. You can specify requests using plain text, and the script will generate a request that is managed by a Python script.

The result will be displayed in a separate window, so can switch back and edit your original request.

The plugin is invoked by selecting a block of text and then typing a mapping. You can also call the main function directly with :call HTTPClientDoRequest().

Read More →

A Static Analysis of the Vim Source

I saw an article posted by Christian Brabandt to the vim_dev group about a static analysis of the Vim source:

For each compiler call, we added an analyzer call into the make-file … Then we built the project in the usual way through the make command

Its code proved to be of a very high quality and I found no obvious bugs in it (though the coding style is somewhat arguable in certain places, but I think it has to do with the project age). Nevertheless, I still found a few fragments that should be reviewed.

Read More →

The dllup Markup Language

I find myself using technologies that are easy to write in plain text. This is partly so I can use Vim, but also because I find it less distracting. I write my blog posts in Markdown with Vim for example, and much prefer this approach to web-based blog engines.

Markdown doesn't work so well for books, however, particularly if you want things like figures and equations. I stumbled onto a Show HN about a new markup language called dllup, created by Daniel Lawrence Lu. This markup language solves the problems of Markdown for academic writing, and has a pretty sensible philosophy:

  • The raw text file must be fast to type up
  • The output must be semantically correct HTML5
  • It should be simple, consistent, correct

The documentation is here: http://www.dllu.net/programming/dllup/, and there are examples for article headers, code, equations, tables, and more. It definitely feels like a compelling combination of LaTeX and Markdown. It even supports compilation to LaTeX, so you can use the standard LaTeX-based tools for generating PDFs.

Read More →

Silver Searcher Plugin

Vim Ags

There's a new Silver Searcher plugin (GitHub: gabesoft/vim-ags) by Gabriel Adomnicai that aims to improve search result navigation. The basic usage is :Ags, and it also has :AgsAdd for adding matches to the current set of search results.

Once you're in a search result window you can use some mappings for navigation. Pressing p navigates file paths forward, a displays the file path for the current results, and c copies the current path to the clipboard. There are also commands for opening a file above the results window (oa), and opening to the left (ol). There are many more mappings: press u to see them or view the full documentation.

Read More →

Writing Erlang with Vim

If you're an Erlang fan, how do you configure Vim? Adam Rutkowski sent me Writing Erlang with Vim, which includes his favourite plugins for tmux integration, Erlang code navigation, and documentation lookups.

Did you know that there's a suite of vim plugins dedicated to Erlang development making it, hands down, the best Erlang/OTP development environment? Let me break it down for you.

He's included videos for each plugin so you can see how it's supposed to work.

Read More →

Neovim: Reviewers Wanted

Eliseo Martínez posted an issue to the Neovim project that called for more reviewers:

Having more people merging code, or trying to cope with PR's in a more FIFO way, as it's been suggested in #2056, could help, but, IMO, that's not the real bottleneck. The crux of the problem, to my understanding, is reviewing. To state it clearly: We need more reviewers.

I think we could try a simple approach to make reviewing more attractive: Let's credit reviewers by setting them as authors of review commits.

Read More →