Reed Esau's Writing Plugins

I've used Vim to write most of the prose I've ever written, and I use my default programmer-oriented configuration for writing. There's now a growing collection of plugins designed to help prose writers who favour Vim, so I've got an alternate "writing mode" vimrc.

Reed Esau has created some great writing plugins for Vim. One is vim-pencil. It adds better support for text formats like Markdown, soft line wrap versus hard line breaks, and wrap mode autodetection based on the modeline. Another cool feature is Pencil creates undo points when certain punctuation characters are used in Insert mode. This is important because writing prose doesn't lend itself to switching out of Insert mode as much as programming.

Other writer-focused plugins by Reed include vim-lexical, which improves thesaurus and dictionary completion, vim-textobj-quote for coping with typographic quote characters, and vim-textobj-sentence, which makes the native sentence detection better.

Read More →

Hardy: Arduino Support for Vim

That Arduino IDE isn't too bad, but you'd probably prefer to use Vim for Arduino development. Hardy (GitHub: 4Evergreen4/vim-hardy) provides Arduino support for Vim. With it, you can type :ArduinoVerify to check an Arduino file, and :ArduinoUpload to compile and upload it. You'll still need to have installed the Arduino IDE for this to work, because it comes with the tools required for compilation.

Hardy also includes an Arduino syntax file. The name "Hardy" comes from the fact "Arduino" means "hardy friend" in Italian, and this script is a friend of Arduino (or a friend of yours if you're not a fan of the IDE).

Read More →

ShellCheck

ShellCheck is a static analysis tool for shell scripts. Shell scripting isn't necessarily difficult, but the syntax is hard to get the hang of, particularly if you rarely write shell scripts. ShellCheck is a Haskell program that runs through your scripts and provides warnings and suggestions for improvements. It will help if you're a beginner, but it also catches more subtle issues that even more advanced users may miss.

ShellCheck

I ran it on a script I use for updating usevim images, and it noticed I was using cat where a redirection would have sufficed.

Read More →

dotenv.vim

Yesterday Tim Pope published a new plugin called dotenv.vim (GitHub: tpope/vim-dotenv, License: Vim). It reads variables from a .env or Procfile and sets the corresponding variables in Vim.

This is useful if you have Procfiles for web applications and want to trigger the same commands for local development. Tim notes that you can use dotenv.vim with projectionist.vim and dispatch.vim to get a default :Start of foreman start for projects with a Procfile, which is ideal if you're working on lots of Heroku projects.

Read More →

VimAwesome Plugin Completion

If, like me, you install lots of Vim plugins regularly, then why not autocomplete plugin names based on VimAwesome? Junegunn Choi posted a gist to do this, and it's on Hacker News if you want to upvote it.

VimAwesome

It actually uses a Ruby scrip to download and parse the JSON from vimawesome.com, so you could use the same principle to add all kinds of web-based completion for services like GitHub, npm, RubyGems.org, and so on.

Read More →

Vim Builds in Visual Studio 2015

There have been a few patches to vim's master branch that ensure Vim builds in Visual Studio 2015. Visual Studio has a free "Community" edition that was introduced last year, and one of the main reasons people are excited about the 2015 RC is Microsoft's continued efforts to support cross-platform development.

I'm not really a Windows developer, but I'd prefer to be able to build Vim in Visual Studio rather than having to install GCC for Windows. Builds initially failed under the 2015 RC, but it looks like the main issue was fairly minor. If you're trying out a free RC you should at least be able to get Vim to build again now.

Read More →

Colortuner

Colortuner by Zefei Xuan is a colour scheme editor that allows you to alter the scheme with sliders. There's a slider for brightness, contrast, saturation, and hue. You can also invert the scheme to see the dark/light version.

The interface also allows you to switch between themes, and you can specify a list of themes with g:colortuner_preferred_schemes.

Read More →

Neovim.app: Multiple Windows

Neovim.app windows

The Neovim.app project for Mac OS X has recently got multiple window support. It's starting to feel closer to MacVim, although you'll still need to build it yourself.

I tried sourcing my .vimrc in it, and it worked pretty well without many changes. That's really Neovim doing the hard work, but I wondered about GUI glitches from my colour scheme, syntax highlighting, and plugins.

Read More →

Neovim Client Library for Clojure

Jeb Beich has created a Neovim client library for Clojure: jebberjeb/neovim-client. That means you can use Neovim's inter-process messaging library for scripting Neovim from a Clojure process.

There's a sample plugin that creates a horizontal split and then sets some text in a buffer:

(ns sample-plugin.core
  (:require [neovim-client.nvim :as nvim])
  (:gen-class))

(defn -main
  [& args]
  (nvim/connect!)
  (nvim/hsplit!)
  (let [cur-buf (nvim/get-current-buffer)]
    (nvim/buffer-set-text! cur-buf "Sample plugin was here!")))

You can also open a Clojure REPL and send commands to an instance of Neovim -- see the readme for instructions on how to do this. It might be fun to combine this with Neovim's built-in terminal emulator.

Read More →