The flexibility of text editors is their biggest advantage over VS Code and other coding-centric counterparts, making them useful to anyone even remotely interested in computing. With its efficient nature, intuitive macros, and support for most operating systems under the sun, Vim has gathered a lot of followers over the years. Plus, Vim’s barebones nature lets you modify every aspect of this text editor via community-created plugins.
And I don’t mean a few hundred plugins, either. With the highly talented FOSS community concocting new creations every day, you’ve got thousands of cool plugins to check out. But if all you want is a replacement for VS Code, these Vim plugins should be more than enough for your programming needs.
Indent Guides and surround.vim
Make your coding documents easier to read
Code readability is quite important when you’ve got hundreds of lines stacked up inside your programming environment. After all, haphazardly-written code can make the annoying task of troubleshooting even more aggravating. Following proper syntax formatting rules makes things a lot easier for your future self, with certain languages like YAML outright mandating the use of proper indentation.
By highlighting different indent levels with alternating colors, the Indent Guides plugin makes it easy to code with the correct spacing. It can also recognize indents created by tab and space standards, so you can use both in a document if you so desire. The surround.vim plugin is also worth mentioning, as it lets you use parentheses, quotes, and even XML tags as a paired set. That way, you don’t have to scramble around for the missing brackets you could’ve sworn you created at the start of a chain of nested functions.
Syntastic
To identify silly syntax errors
While we’re on the subject of troubleshooting, going through each line of code to check for errors can get rather exhausting. Even with Indent Guides making your document less chaotic, syntax errors can be particularly irritating to debug, as you’d have to keep an eye out for missed punctuation, typos, and other minor errors.
That’s where Syntastic comes in handy. As a syntax checker, it skims over your code blocks to spot typos, so you don’t have to compile your project just to check for errors. It’s compatible with most of the popular languages, including Python, SQL, PHP, the C family, and the nightmares called CSS and JavaScript. Heck, you can even use Syntastic with Ansible playbooks, Dockerfiles, and typical YAML config documents.
YouCompleteMe
A solid autocomplete utility
Typing out long variable and function names multiple times can make them prone to typos, especially if you tend to fat-finger your inputs as much as I do. Plus, manually entering the same variable name throughout your coding document can get rather tedious, and I say that as someone who uses weird naming schemes when coding to make things easier to remember.
That’s why popular IDEs and code editors ship with an autocomplete feature, and YouCompleteMe can bring this neat functionality to Vim. While it does require some extra Python libraries and packages to run, being able to type a single letter and choose from multiple suggestions is what makes YouCompleteMe a worthy addition to any Vim user’s plugin kit.
fugitive.vim
For the Git veterans out there
Whether it’s keeping your painstakingly-crafted code safe from your own experiments or forking the ingenious creations of other developers, Git is easily the most useful version control platform for programmers. By default, Vim doesn’t support Git commands, but you can change that via the fugitive.vim plugin.
This Git wrapper lets you run pretty much all file versioning operations from your Vim document, so you don’t have to go to the terminal every time you want to push a file to your repo or view your commit history.
NERDTree
Browse files from your text editor
When you’re working with complex projects spanning multiple folders, you’ll have to modify the files at some point. A barebones Vim instance can help you create and edit files, but you’ll have to switch back to your terminal app/emulator to perform complex file operations. Well, either that, or you can arm your Vim setup with NERDTree.
This neat addition to Vim lets you access a hierarchical file layout within the text editor, allowing you to quickly switch files as you see fit. You can also enable netrw in your plugins config file to open files on SCP, FTP, and other network shares from your NERDTree interface. NERDTree also pairs well with vim-devicons, nerdtree-git-plugin, and a host of other plugins to further simplify file management.
vim-docker-tools and dockerfile.vim
With a shout-out to vikube.vim
Despite a plethora of GUI platforms in the self-hosted ecosystem, good ol’ CLI commands are perfect for managing your Docker containers. With vim-docker-tools in your Vim arsenal, you can execute essential Docker commands within the text editor. Combine that with Nerdtree, and you can easily create and deploy containers without leaving Vim’s UI.
There’s also vikube.vim, which lets you control full-fledged Kubernetes clusters from the comfort of your Vim instance. For folks who spend a lot of time working with Dockerfiles, the dockerfile.vim plugin can add syntax highlighting to your Docker blueprints.
