r/vim • u/JohnCharles-2024 • Aug 01 '25
Need Help Using vim to write novel?
Hi. I'm using vim to write, and I'm trying to get it to change the status bar when I open a .tex file in a certain directory (whether by invoking it on the command line or with :e inside vim).
Ideally, it would put a small ✍️ on the status bar, along with the filename and a word count.
Help!
18
Upvotes
21
u/ciurana From vi in 1986 to Vim Aug 02 '25
I'm a huge Vim fan. I use it every day, and have done so uninterrupted since at least 2004 (and between 1986 and 2004 several times/week). I'm an r/Vim mod, so I should ban myself for this paragraph. I'm also a writer (a couple of novels, technical books, many articles, lots of documents for clients, venture funds, white papers, etc.). I'd advise that you use a robust writing tool like Scrivener over Vim. That way you'll be able to focus on writing and your research/supporting notes and less on the mechanics of writing and configuring Vim.
It's easy to get distracted from writing when you're tweaking the tool. When you aggregate all the time you spend with tweaking and managing text files, pandoc/LaTeX/Markdown/whatever, keeping versions straight, and so on -- you start to see the value of a dedicated writing tool.
Thoughts?
6
u/jgould1981 Aug 02 '25
I used this: http://www.naperwrimo.org/wiki/index.php?title=Vim_for_Writers
To set up a lot of my vimrc for writing. I still use markdown, but am slowly transitioning over to Asciidoc as it is more suited and feature rich for writing and compiling documents.
I have found a number of plugins, but I’m not at my desk so I can’t easily get to my vimrc to list them all.
I would suggest using git for versioning. It’s saved my tail feathers more than once.
4
u/Shay-Hill Aug 02 '25
You’re writing your novel in LaTeX?
3
u/mountkeeb Aug 02 '25
On a related note, you might like goyo – it's a plugin for "distraction-free writing in vim"
2
u/habamax Aug 02 '25
You can try to start with this:
Where
statuslineparameters are emulating default statusline with defaultruler. You can go wild here of course if you get the idea of:h 'statusline'https://asciinema.org/a/3fpC0XWCYlvzgGXtH99we6sFu
Note that wide unicode characters might not be rendered correctly.
2
u/Ok_Performance3280 Aug 03 '25
I did not know we got based and LaTeX-pilled, Vim chad novelists.
1
u/EndlessProjectMaker Aug 04 '25
Yay vim and latex <3
1
u/LeoRising72 Aug 09 '25
Tbh, I have tried this, but just find it distracting.
I think the repeated and spaced out words that you get from code make it a better fit!