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 →

EnhancedDiff

Default and patience

The EnhancedDiff plugin (GitHub: chrisbra/vim-diff-enhanced, License: Vim) by Christian Brabandt is a plugin for showing diffs with the patience algorithm. You can see this by running git diff --patience, and you might find it useful for cases where the standard diff algorithm fails to match lines after large changes:

Under those circumstances a diff algorithm can occasionally become 'misaligned' in that it matches long sections of curly brackets together, but it winds up correlating the curly brackets of functions in one version with the curly brackets of the next later function in the other version.

Read More →

Emacs in Neovim

There's a pull request on the neovim / neovim project that adds libvterm. This library is a C implementation of a terminal emulator that provides callbacks for drawing, so Thiago de Arruda has hooked into it and displays the output from within Neovim.

That means you can get a full terminal by typing :terminal. It's even capable of running Emacs. There's even a video of this on YouTube: take a look at Emacs running in Neovim by Justin M. Keyes.

I found this on reddit/r/vim under Emacs running in Neovim. Besides the obvious Emacs/Vim jokes, people seemed genuinely impressed. If this ships in Neovim it'll mean we have to completely rewrite all of our "Vim as an IDE" posts!

Read More →

gVim to xcolors

gvim-to-xcolors (GitHub: 97-109-107/gvim-to-xcolors) is a Python script for extracting colours from Vim themes and outputting colours in the X resources convention.

It does this by parsing highlight groups and their priority. The normal group is processed separately to determine the foreground and background colour.

The author has been using it to generate i3wm colour schemes with Charles Leifer's themer. I think this would be cool if you've got a favourite Vim colour scheme but can't quite get your window manager to look right.

Read More →