DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for 10 Vim Plugins for Writing
Tomas Fernandez
Tomas Fernandez

Posted on • Updated on • Originally published at tomfern.com

10 Vim Plugins for Writing

A text editor is so much more than mere software.

I still remember the first time I came in contact with Vim; it was during my very first job. It was a part-time gig in a government office. A few months in, they decided to go 100% open-source. Out the window went Windows and in came Linux. At the time, I was doing PHP development, and I was sorry to have to let go of my dear Dreamweaver.

I decided that if I had to work on Linux, I would go all the way, no compromises for me. That meant getting used to working on the console and learning Vim.

When one of the resident Linux gurus walked by my seat and saw my screen, he said, β€œAre you using Vi? Maybe you’re not so useless after all.” (Funny story, I came across him on facebook the other day. Now that he’s bald, he doesn’t look intimidating at all).

Lately, I’ve been writing a lot. I found that armed with the right plugins, Vim is a great tool writing:

  • vim-pencil: my favorite writing plugin. Vim-pencil brings a ton of nice things like navigation aids, smarter undo based on punctuation, and proper soft wrapping.
  • vim-ditto: ditto highlights repeated words in a paragraph, just what I need to avoid repeating words all the time.
  • vim-goyo: a Writeroom lookalike for Vim, goyo removes all distracting elements like modeline and line numbers.
  • vim-colors-pencil: an elegant, low contrast colorscheme geared towards writing.
  • vim-litecorrect: litecorrect automatically corrects common typing errors like β€œteh” instead of β€œthe”.
  • vim-lexical: combined spellchecker and thesaurus. Vim-lexical lets me navigate between spell errors with ]s, [s and quickly find synonyms with <leader> t
  • vim-textobj-sentence: a plugin for better sentence navigation. I can move between sentences with ( and ), I can cut a sentence with dis. Depends on vim-textobj-user.
  • vim-textobj-quote: this plugin smartly creates β€œquotes” so I don’t have to.
  • ALE: the Asynchronous Lint Engine is a polyglot analysis tool that is not limited to code. It supports a bunch of style checkers like proselint and LanguageTool.
  • vim-orgmode: I’ll admit that, before I saw the errors of my ways, I communed with the one that should not be named. During the time I used Emacs, I never fully switched away from Vim, that alone should have told me something.

For my labors, I gained something invaluable: I found Org mode. For me, Org-mode is the most intuitive and straightforward way of interacting with text. This filetype plugin only implements a subset of all its features, but even so, it’s good enough for my purposes.

While not Vim-related, I also find these tools irreplaceable in my workflow:

  • pandoc: a command-line markup converter. Supports dozens of formats, including Org-mode and markdown. I usually write in Org and then export to the target type.
  • TitleCase.pl: John Gruber’s title case Perl script. I haven’t found a good native Title Case plugin for Vim, so I just use a !TitleCase.pl filter.
  • grip: view local Markdown files with GitHub renderer. I use it to preview how my files will look before pushing them.

My complete Vim config can be found in my dotfiles.

GitHub logo TomFern / dotfiles

My dotfiles

My dotfiles

  1. Install gnu stow.

  2. Clone the repository on $HOME

git clone git@github.com:TomFern/dotfiles.git
  1. Install links
cd ~/dotfiles
stow .



Happy writing!

Tomas

Top comments (4)

Collapse
 
foodogsquared profile image
Gabriel Arazas

Nice to see some writing-related content.
99% of the time I use Vim for writing as well so thanks a lot for writing this post.

Have you looked into using snippets such as UltiSnips.
It's especially useful for writing templates (especially with LaTeX) and macros.
I got most of my setup inspired from this blog post.

Collapse
 
tomfern profile image
Tomas Fernandez

Yes, I use UltiSnips occasionally, it's not a big part of my writing workflow though.

LaTeX looks so cool, I should take the time to learn a bit more about it. The only time I had to work with it, I cheated using LyX πŸ˜…

Collapse
 
ghost profile image
Ghost • Edited on

Nice reminder on the awesomeness of Vim, we can forget that is not just for coding, with Pandoc and/or LaTeX you can say goodbye to word processors, I did it and I'm happier because of it. And after you see a document made with LaTeX, everything else looks ugly.

If I may add one, for the RestructuredText crowd, 'gu-fan/riv.vim' has a lot of useful goodies.

And also note that the spellcheck of Vim has gotten much better.

"...the one that should not be named. During the time I used Emacs..." but you named it, 7 words later! and as you may know, just to name it you need 1GB of free space and that's just for the "Ema", the "c" and "s" require extra packages :D

Collapse
 
tomfern profile image
Tomas Fernandez

β™₯️ Nice, thanks for the suggestions. I love trying new plugins.

I gave Emacs a decent try, but I bounced back to Vim. I tried vanilla Emacs, and the Spacemacs and Doom distributions, they are both really good.

We want your help! Become a Tag Moderator.
Fill out this survey and help us moderate our community by becoming a tag moderator here at DEV.