Writing books with LaTeX, using VIM

Admittedly, this is rather fringe to most readers of this blog, and I expect no comments on this post 🙂

But I thought it important to post this for those Googling certain terms and searching for help in writing books using LaTeX and VIM.

I use VIM as my editor for almost everything I write – including entering text in web pages, where I use the Firefox blugin “It’s All Text“. Since some time back, I have been more active as a writer, and my rediscovery and progressively love for LaTeX as the document publishing system has taken hold. Being a tools geek, I decided to do some tweaking of the standard LaTeX syntax plugin for VIM.

The plugin resides in the system-wide VIM syntax folder and is named “tex.vim”. To make use of my improved LaTeX plugin, simply copy my plugin to your own “.vim/syntax” directory, and you will get better tab settings and the possibility to fold parts/chapters/sections etc. of the book using the standard markers – like this:

\chapter{Name of the Chapter} %{{{1

With this, the chapter will be foldable all the way to the next marker on the same level (the above example showing level “1” of folding). Remember to put the percentage symbol before the fold marker to ensure LaTeX treats that part as a comment and does not render it as document text.

11 thoughts on “Writing books with LaTeX, using VIM

  1. Well, it so happens that I will decide to post here on this fringe topic.

    Because I want to start writing a book as soon as today or in the next few days, and know very little that is useful about writing books.

    Call this occasion serendipity.

    I attempted to write a book a few yrs ago, and it did not amount to much other than a bunch of words of poorly organized thoughts on some paper, and stapled.

    It was hardly readable.

    But the idea has been regestating in my mind since and is just about ready to give birth any moment now.

    I still feel pretty much in an area of unknown.

    I get the idea of being like a second generation bastard woman with her first pregnancy and being a product of a lustful one night stand of whom I do not even know the father’s last name, never mind his whereabouts, and would have a difficult time picking him out of a crowd.

    Therefore I am looking for as much information and know how to write a book, as possible.

    I am just short of screaming for help and more brain power.

    I would be delighted if I could find a better brain, with the most up to date computing power.

    My brain feels like those old first computers that I hear today’s computer geeks talk about, where they started at. Is Commodore the right word?

    I will spend some time reading the links you posted.

    I am hardly literate about computer basics, too.

    So I see this area as a huge area of confusion.

    Any and all advice would be appreciated.


    1. I can use a bit of LaTeX too, but I’m not sure if doing that and with VIM, too, is the right choice for someone who’s not so good in computer basics. There are many tools for organizing thoughts or ideas (Geir’s HyperList being one of them) and writing or typesetting.
      As to writing a book itself, there’s a lot of know-how and tips about that, as our friend Google would confirm. For example, I find this one nice: http://blogs.plos.org/neurotribes/2011/06/02/practical-tips-on-writing-a-book-from-22-brilliant-authors/

      1. Thanks profant,

        I feel like a fart in a windstorm.

        Oh, boy..

        I am going to take a nap.

        I just had one and I am going to take another.


    2. You may find the learning curve of the text editor VIM daunting, and LaTeX perhaps more so.

      So – my simple tip of the day for writing books is very simple; Just start writing. And then you can worry later 😉

    3. Dio, I see you have two good tips, and LRH said something similar to what Geir said – “You learn to write by writing” (just like “you learn to audit by auditing”). I found that to be true. My writing improved when I was a staff member, as a result writing a lot of knowledge reports. LOL 🙂

Have your say

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s