writing in plain text

I think it's worth it to write in plain text because it keeps your writing medium highly portable and allows you to automate things like formatting and citations. Markdown is nice because it doesn’t require dealing with a whole sophisticated markup language while you're just trying to get ideas down. You can use a simple plain text editor for any writing project without having to tweak formatting or mess around with little menus every time you sit down to write.

I just use the text editor vim and the document converter pandoc to do pretty much all of my writing now. In my .vimrc configuration file I have “filetype plugin on” and I have it configured so that my textwidth is set to 80 characters when I write markdown files (:h autocmd). This helps keep the text file itself readable even before it's been typeset, or if I want to work on it on a machine where I don't have my vim configurations. I use the ‘gwap’ command to keep the paragraphs nicely formatted and legible, and have a shortcut for it (:h gq).

I use pandoc with Latex and biblatex, so I maintain a bibtex database. I don’t have zotero. I just use vim to edit the file semi-automatically and grep when I want to recall a “cite key.” I also have a “snippets” subdirectory in my .vim folder, which has little templates like this one:

	  @book{,
	    title = {},
	    author = {},
	    translator = {},
	    date = {},
	    publisher = {},
	    location = {}
	  }
	

I can print this template into my .bib database whenever I want to add a new entry with a quick keyboard shortcut:

nnoremap <leader>bk :-1read
	$HOME/.vim/snippets/book<CR>f,i

I borrowed the idea from here.

Pandoc’s citation preprocessor defaults to Chicago author-date, but you can tell it to use any citation style you need using a CSL file (you can find some here). I handle all my formatting with a “YAML header” at the beginning of the file, which I also have a “snippet” for:

	  
	  ---
	  geometry: margin=1in
	  indent: true
	  fontfamily: times
	  fontsize: 12pt
	  csl: /home/path/to/chicago-note-bibliography.csl
	  bibliography: /home/path/to/library.bib
	  header-includes:
	    - \usepackage{setspace}
	    - \doublespacing
	    - \usepackage{etoolbox}
          - \patchcmd{\quote}{\rightmargin}{\leftmargin 1.5e			\rightmargin}{}{}
	    - \AtBeginEnvironment{quote}{\singlespacing}
	  ---
	  
	

Calling the LaTeX “setspace” and “etoolbox” packages like I do here gives me proper Chicago formatting, with double-spaced body paragraphs and single-spaced half-inch indented block quotes (I got the tip from here). The nice thing about the "snippet" is that I don't have to memorize all this stuff, or worry about formatting or keeping a bibliography when I'm writing. When I want a formatted document, I can either paste this snippet at the top of the file or keep it in a separate .yaml file. When I call pandoc with the 'C' flag, all the formatting and citations will be taken care of for me:

:! pandoc -C % metadata.yaml -t pdf -o this_text.pdf

Typing ‘:!’ allows me to invoke pandoc (or any other commandline program or shell command) without leaving vim. In my experience pandoc works most smoothly as a kind of "Latex for dummies," but I've found it pretty serviceable for producing .docx and HTML files as well.

I’m trying to keep my files simpler for this chapter, since I don’t have to worry about migrating to a new workflow with a half-finished Microsoft Word document this time around. I’m trying to avoid excessive footnoting. When I cite something it just looks like this:

In the earlier essay, Freud had already begun to notice that the problem of melancholia hinged on questions of identification: "In mourning it is the world which has become poor and empty," he observed, "in melancholia it is the ego itself."[@SE14, 246]

...and since my .csl file has pandoc return my citations as footnotes, anything in the bracket will show up in its respective footnote accompanied by the properly formatted citation. If I really need to write a more extensive commentary and want it out of the way of the ‘source’ file’s main body, I can still just use the regular Markdown syntax: [^1].

This set up seems to lend itself to keeping things a bit more organized, doesn’t involve as much formatting during the actual writing process, and automates the management of my citational apparatus. Vim did take me some time to get the hang of, but I like it more than the graphical word processors I used before because it has fewer distractions and lots of useful little tricks up its sleeve.

I've seen some pretty elaborate setups in other people's guides to using pandoc and markdown together for academic writing. Some of these are very cool, but I didn't want to replace my word processor with ten other complicated graphical applications. I also don't want to spend years perfecting a vim or emacs configuration to essentially reverse engineer Scrivener. I try to keep things in the terminal and to err towards simplicity.