vim scrivener

I have a growing affection for Vim. It might be a 20-year-old piece of software. It might have a ridiculous learning curve based on concepts, like modal editing, that seem extremely foreign in an age of touch screens, OSX 10.8, Windows 8, etc. It might not look elegant, or even usable. But, it’s seductive. And maddening. It’s customizable to the nth degree. And because of that, it’s easy to drown.

I’ve been doing most of my writing, coding, notetaking, and other work in Vim for a few months now. There has been a slow accretion of wisdom and workflow, and muscle memory. (I frequently find myself reaching for Vim keyboard shortcuts when using other text editors or word processors, and find myself frustrated when they don’t work.)

I’m going to start posting an irregular series of posts on using Vim for the kind of long-form writing historians and other humanists do. In part, I’m doing this because I learn a tool better when I write about it. (That was certainly the case with Devonthink.) In part it’s because Vim gets better with customization, and when ever I move to a new machine I forget half the things I’ve done, or how I did them. So, it’s also an exercise in personal archiving.

My favorite tool for writing has long been Scrivener. What I most like about Scrivener is the ability to split the screen and view source material as I write, and export to a variety of file formats of a finished draft from its constituent parts. I also like its file navigation and little bits like distraction-free writing mode. I’m less interested in its summarization and the many complex forms of metadata one can add to files. Another thing I don’t like about Scrivener is that the package contains full copies of all the files in one’s research folder, as opposed to symlinks. This means for a large research project you can end up with a very large file, and one that is duplicative. With a few plugins, Vim can easily handle many of the things that I like about Scrivener (if not most). There are a few bumps in the road, though.

Most of my research files, notes, etc. are text files. But, of course, as an academic, I also have tons of pdfs and legacy files in .doc or .docx. These files are, obviously, not accessible by vim. I’m working on a couple of lugins that will make them accessible by converting their contents to text or markdown automatically with filetype detection. (As it stands now, using NERDTree, it’s easy to open these files in their external system editors (Word, Preview, etc.). At any rate, what do I want from a Vim Scrivener set up?

  • multilingual spell checking
  • file navigation
  • split screen editing
  • PDF text layer viewing
  • web page downloading/markdown conversion
  • export to pdf, docx, or rtf
  • sensible line wrapping
  • directory search

Much of this is already available from Vim and a few good plugins. So, I’m going to start an irregular series of posts for the Vim Humanist on how to customize Vim for our writing and research needs. If you have ideas or tricks, let me know and I’ll include them in the series.


Associate Professor of Early Latin America Department of History University of Tennessee-Knoxville

Posted in Uncategorized
7 comments on “vim scrivener
  1. PhDeviate says:

    I’m fascinated, and would like to subscribe to your newsletter :)

  2. Caleb McDaniel says:

    Glad that you’ve seen the light! ;-)

    I use Pandoc for a lot of the conversion tasks you describe. Also recommend the Clam plugin, Fuzzy Finder, and vim-ack.

    My dotfiles are on github if they might help. I’ll look forward to your series!

  3. I’ll second Caleb on the utility of Pandoc, and I think this series on Vim is a great idea. I do most of my textfile work in TextWrangler these days, since I’ve been writing short things like blog posts and assignments for students.

    When I do long-form research writing, Scrivener is my go-to tool until I get to the stage of exporting Markdown. Then, I use pandoc to turn the whole thing into LaTeX, and version control the LaTeX for further revisions. If there’s a smoother workflow option, I’d love to know it.

  4. Ioa Petra'ka says:

    I’m a big fan of Vim as well, I use it for almost all of my writing that doesn’t involve Scrivener, and I’ve been using it for about fifteen years. If you are on a Mac, have you heard of QuickCursor? This tool lets you combine awesome tools together to make them even more awesome. It’s basically a way of taking the input from any application (like this Firefox window), and letting you open it in an external editor (like MacVim). You just hit a hotkey, and it sucks up the current content, puts it into a temp file, and loads it into Vim. When you are done, just hit ZZ to close and save and the updates will be popped right back into Scrivener.

  5. Count me among the enthusiastic users of Vim and Pandoc. There is a vim-pandoc bundle that can add some helpful features, among them bibliography autocompletion. I’ve cannibalized just the parts I need to keep it from slowing Vim.

    The killer feature of Scrivener that I haven’t been able to replicate in Vim is the ability to write discrete sections of the text. I think Caleb uses separate files and then uses cat to join them (Is that right, Caleb?) but that doesn’t quite work out for me.

  6. Michael Walsh says:

    It has been a while, but I hope you continue these posts on Vim and Scrivener. I have over a year with MacVim and I am completely addicted. Every time a new and innovative editor is released, I try (and mostly succeed) to add those features to Vim.

    I agree with Lincoln, that the Scrivener feature I most want is to be able to write text in blocks and arbitrarily move them around.

    By the way, I highly recommend the breakindent patch for Vim. It can make Vim behave somewhat like Taskpaper.

  7. Matt McGraw says:

    I am most interested in “sensible line wrapping”. I hate writing a paragraph and having vim treat it as a single line. However, if I force line wrapping at 80 char or something, when I export or render, it’s all choppy because of the forced line breaks. I never typed on a typewriter so hitting a carriage return at the end of the line is not in my muscle memory.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Hacer juicio ú dictamen acerca de alguna cosa... significando que el objeto excita el juicio ú dictamen en la persona que le hace.

Deducir ante el Juez la accion ú derecho que se tiene, ó las excepciones que excluyen la accion contrária.

RAE 1737 Academia autoridades
Buy my book!

Chad Black

I, your humble contributor, am Chad Black. You can also find me on the web here.
%d bloggers like this: