Managing text editor plug-ins

A thriving ecosystem of third-party plug-ins is the result of an empowered open-source community with access to smarter tools with pluggable architecture, and distributed version control systems. Taking advantage of this, both Sublime Text and Vim support optional plug-in management. Sublime Text offers Package Control, while Vim has several, of which I like Vim Plug.

Package Control

It grew out of one enthusiast’s need to distribute his package to become the official package manager for Sublime Text. Today it maintains a catalogue of a vast array of packages (or plug-ins) that supplement and enhance the functionality of Sublime Text. In a class of its own, Package Control offers a couple of ways end-users can install and use plug-ins, viz., (a) from the official index list, which requires developers to make an effort to submit theirs, or (b) it allows a package repository to be added directly to Sublime Text without the need to go via the method (a) route. Both these methods are described in Usage. Here is a demonstration of how-to install packages covering both these methods.1

Ways to install packages (plug-ins) in Sublime Text.

Updating packages is manual and for good reasons. Package Control: Upgrade Package option from the Command Palette shows all packages that have been updated, and one can select packages to be updated.

The two packages sacs_st and usfos_st got developed because I needed syntax highlighting for my model files. I took the time to have them listed, thinking these could readily be useful to others too. Whereas for latex-snippets-st, my other package, I decided not, since Sublime Text is pre-bundled with a good LaTeX package already; my above package supplements it with personalised triggers and snippets. Still if one is interested, they can be just as easily installed. See the video from 36s onward on how-to.

Vim Plug

Vim Plug is another class act. A one line installer followed by a super-simple block within .vimrc to download and install the plug-ins of choice is all it takes to get the required Vim plug-in(s) working. Here is an example using my latex-snippets-vim plug-in.

call plug#begin('~/.vim/plugged')
Plug 'sirver/ultisnips'
Plug 'ckunte/latex-snippets-vim'
call plug#end()

Plug calls GitHub repositories by default. Then all one needs is reload .vimrc and :PlugInstall to install plug-ins. Plug-ins can be updated with :PlugUpdate. Removing plug-ins is also as easy as removing Plug lines from .vimrc, reload, and running :PlugClean from within Vim. See a demo below.2

Updating plug-ins via Vim Plug.

  1. Each method has its benefits. Method (a) offers greater visibility to end-users, while method (b) enables greater control and access to packages that may not be available from Package Control’s global list. 

  2. See also Nick’s video commentary regarding Vim Plug.