Neovim and Windows

One of the reasons I started using Vim for serious work was cross-platform support. It felt weird investing time learning editors that were only available for Windows or Mac OS. Recently some strong arguments in support of Neovim have made me use it more regularly in Unix, but I never even considered Windows and just assumed it would work there too.

Well, apparently it doesn't. Regulars at the neovim Google Group have been trying to get it running, but it still has some issues. Rui Abreu Ferreira has a branch called tb-win32-any which has fixes for Windows, and there are gists with build instructions in the main discussion.

It sounds like it only builds on MSVC 2013 update 2, but MSVC 2015 might be needed.

Read More →

Refactor Templates with vim-partial

Partial

If you're a web developer one chore you might be familiar with is extracting reusable chunks from big templates into smaller files. The vim-partial (GitHub: jbgutierrez/vim-partial) plugin by Javier Blanco GutiƩrrez automates the process by creating a new file based on a selection and inserting the necessary include line.

Some existing plugins do this, but they're typically tied to a specific language or framework. This project is more generic and configurable -- it understands how to extract things like ejs, stylus, erb, and haml, but you can extend it by setting g:partial_templates. You can also change where the output files are stored with g:partial_templates_roots, and you can even make it show the new file in a split window.

Read More →

PacVim

PacVim

You're a green cursor that must highlight words whilst avoiding red G characters. Welcome to PacVim, a game for learning Vim by Jamal Moon.

The readme has detailed installation instructions, which is great for beginners, and is launched by running pacvim rather than from within Vim itself.

Read More →

Script Roundup: vim-lastplace

vim-lastplace (GitHub: dietsche/vim-lastplace, License: MIT) records the last line you were on when you reopen a file. It can ignore certain files, which means you won't get issues when making Git commits. The ignored files are configurable with g:lastplace_ignore.

This plugin is based around BufReadPost, which allows a command to be added whenever a file is opened. It then positions the cursor using g with a backtick and ", which moves the cursor at the last known position in the file. So it's essentially an intelligent repackaging of a built-in Vim feature, which appealed to me. It goes to show that useful plugins don't need a huge amount of code!

Read More →

Geoff Greer on NeoVim vs. Vim

Geoff Greer has been writing about Vim and the issues with its codebase, and how NeoVim aims to fix everything. He wrote Floobits for Vim, which is a collaborative editing plugin. During the development of Floobits, Geoff ran into several issues that were caused by Vim's scripting API. He now claims, in Why Neovim is Better than Vim, that the only good thing about Vim is the interface:

Every other aspect of Vim is irredeemable. The codebase is atrocious. The plugin API is cumbersome and restrictive. The dev community is apathetic. The benevolent dictator is averse to change. There is no chance of fixing these problems.

His complaints directly relate to the motivations behind the NeoVim project:

Read More →

qutebrowser: A Vim-Inspired Browser

qutebrowser

I've tried a lot of Vim browser plugins before -- whether in Chrome or Firefox there are a lot of choices now. One project that's new to me is qutebrowser, which is actually a browser rather than a browser extension.

It's got a keybinding cheatsheet, so you can see how similar to Vim it is. It's based on PyQt5 and QtWebKit, and has a minimal GUI that wouldn't look out of place on a tiling window manager. In fact, it was inspired by dwb, which is influenced by Vimperator.

Read More →

DidYouMean.vim

DidYouMean.vim (GitHub: EinfachToll/DidYouMean, License: MIT) by Daniel Schemala is a small plugin that prompts for the correct filename instead of opening a new file. It's ideal if you often type a partial filename, press tab, then accidentally open a new file because multiple filenames matched.

One reason I liked the plugin is the source is relatively easy to follow. If you're trying to learn Vim script then you might want to look through DidYouMean.vim to see how it works.

Read More →

Vopher: A New Plugin Manager

Vopher

Vopher is a new plugin manager for Vim. It's written by Mathias Gumz in the Go programming language, and allows you to search, install, and update plugins. It has its own file format for listing plugins, which is basically a list of URLs or comments.

If you're already using a plugin manager you might wonder what problem Vopher solves. One appealing feature is it doesn't download the entire Git repository of each plugin. Instead it gets the relevant release, which means it uses less storage space. Also, because it's written in Go it should be fairly easy to build it on your Linux server or desktop.

Read More →

Haskell Vim IDE

Frogtor, from Learn You a Haskell

Over the last few years there has been an increasing amount of accessible documentation for Haskell. For example, the Learn You a Haskell book has introduced a new audience to the language, without over-simplifying the functional concepts required to write proper Haskell.

I found the Haskell Vim IDE project through Hacker News -- it only has one HN upvote but I think it's worth looking at if you're interested in working with Haskell. The author, Joe Nelson, recommends installing it with curl, so if you decide to do that make sure you check the script is safe first. Once you've got it installed, you get bindings for types, autocomplete, linting, Hoogle, the GHCI repl (in tmux), Git, commenting, aligning, and even tags so you can jump around Haskell programs more easily.

Read More →