For me, Goyo was the plugin that always matched what I wanted vim to become when I was in "prose writing mode."
https://github.com/junegunn/goyo.vim
I combine with limelight.vim:
https://github.com/junegunn/limelight.vim
This partially simulates the experience/UX of the product iA Writer on macOS or iPad, which is my favorite prose editor, but is proprietary software and doesn't work on Linux.
As others mentioned, when in prose writing mode you can also flip on a handful of vim options, I save these as hotkeys in my vimrc. For example, spell checking and line wrapping.
In case you're curious:
There is something nice about having the editor as a separate command especially for writing.
For prose, you can simply hard wrap at 80 (arguably you should), and vim supports this via a single config line. OOTB vim soft breaks anyway and you can navigate between in those broken lines via gj, gk etc.
Seems like bloat to me.
For a community that prides itself on "one small tool for a specific purpose," people sure like to use VIM for a thousand different purposes by hacking plugins. This used to be derided as the microsoft way decades ago.
For writing prose, I use an app specifically designed for writing prose: Scrivener. See elsewhere saying "you should change how you write in order to use version control when writing prose." Totally forgetting that there's been a version control for prose for literal decades: tracking changes in a word processor.
Do you want to process words? Use a word processor. Not a text editor. Writing prose isn't editing text.
So when you're working with multiple applications, all of which are trying to force you to use their own way of editing text, it feels highly fragmented and un-unixy
I do understand what you're saying, it's just that I wish the text editing portion of most of these tools is abstracted to a degree that allows for my text-editing tool of choice to be used within it
I'm not sure that this is the meaning of the slogan. The slogan says that a programmer shouldn't try to make one tool to do all things, not, I think, that users shouldn't be given the freedom to adapt their favorite tool to do all the things that they want to do. (Imagine, for example, if one applied this understanding of the slogan to C, and regretted the thousand and thousand thousand different purposes to which users were putting it!)
If I were a Mac user, I'd probably use iA Writer. Instead, I'm very happy with Sublime. I appreciate Scrivener's bells and whistles but I find I never need more than documents, folders, and headings (although I wouldn't say no to Obsidian-style wikilinks).
You think this "community" is a tech community? Let alone a unix community? And using a text editor for text processing is definitely aligned with the "unix way" than your way.
> This used to be derided as the microsoft way decades ago.
No. Your way was derided as the microsoft way. The unix way was to treat everything as text! Programs/processes feed/pipe text to each other.
I prefer writing with a mechanical pencil
For editing text on a screen, I prefer UNIX utilities ed, sed, ex/vi and custom filters written in C. The later can be used within ed or ex/vi via
:!filter
The slow, error-prone step is getting the text _accurately_ from the paper to bits in the computer. A personalised OCR that can recognise own handwriting might be helpfulOne thing I’ve learned about writing prose vs. code is that you should not be quick to edit your prose and instead continue writing and finish the complete draft. This is why studies show that typewriters and pen and paper give a better creative process. I can’t foresee me looking for things like autocomplete or pure speed when trying to put thoughts to paper.
Hat's off to everyone who has worked on this plugin!
I used to do one sentence per line, but after getting used to how Emacs handles soft-wrapping, I now do one paragraph per line—also when I use Vim. This also makes collaboration with other authors easier, since most non-vim collaborators do that.
Even though I have a very narrow editor when you type for example:
this is a very very long sentence
- this is a very incredibly long sentence too
And say it is too narrow for the viewport, it will soft wrap like so: this is a very very
long sentence
- this is a very
incredibly long
sentence too
Even though the bulleted sentence is soft wrapped, it maintains the indent of the sentence which I find a really useful visual aid.Of course, this assumes that you're writing in Markdown or ASCIIDoc or something else that will get processed into the final displayed form. But even with plain text, you could always run it through fmt or something similar.
You could also just change git's diff settings to highlight word-based changes if you don't want to use external tools. I believe you can even use regex to redefine a word to match sentences.
What you're describing is called "track changes" in word processors.
I'd say an alternative to using Git or JJ or whatever is use a version control that exists to serve non-code. That is to say, use Track Changes! :D
Word, Google Docs, Scrivener (this is my favorite), etc. have no problem telling you "hey you changed this draft by inserting a paragraph and changing this other word's verb ending, while also replacing this one with a synonym."
Yeah, if you use Git, which was designed for tracking changes to a far more limited kind of language, you're going to run into incompatibilities. So track changes with a version control created for tracking changes to human language.
If you have to "rethink" your app in order to serve a new purpose, it's a red flag that you're trying to square a circle.
Better to use a tool that was created for your purpose.
I don't like word processors. They're heavy and don't cleanly separate style from structure. And they use more or less obscure file formats.
I like text editors -- vim especially -- and plain text (or plain text with a thin layer of lightweight markup, like Markdown). And semantic linewrapping plus git is good enough for my purposes.
It may not be for yours, and that's OK. We are allowed to be different.
Not saying that a line-by-line diff is that much better. Neither is great imo.
IME the main advantages are (1) not having to fight with useless Microsoft word (and similar) behavior, bloat, bugs, etc. and (2) being able to mix in a spot of code as needed, for example compiling different sections together, doing a bit of text replacement and templating etc.
The main disadvantage is that the tooling isn't really there. I've done a stupid amount of yak shaving trying to get things like footnote folding in emacs, word count, etc., the spell checking is waaay behind, outline formats don't really work right (though they also don't really work right in word etc.)
So three cheers for anyone working on making the tooling problem better!!
Suggestion: use 72. It's divisible by 2, 3, 4, 6, 8, 9, 12, 18, 24, and 36, simplifying tables, columns, centering, etc.
When I've used Vim, the undo points frustrated me: One undo covers a much larger set of events / longer time than in other writing applications. I think it 'undoes' until the last command.
Every other program does it more granually and, once I thought about it, amazingly intuitively - I've never had to think about it. Is there a general algorithm they all use?
> soft line wrap
Also, is there a way to make Vim's soft line wrap break lines at standard points, such as between words and at hyphens? Vim seems to break lines at the line character limit, regardless of where that is in the word or sentence.
You could then use a git workflow to do your reviews and edits.
https://gitlab.com/ntnsndr/dotfiles/-/blob/master/.vimrc
I launch with `vim -O [2-3 working files]` and am good to go. Learning vim itself is hard enough, and rewarding enough, that plugins feel extreme, especially for prose writing.
Writers are renown for ther love of coding domain specific languages!
They'd even trade such writing fundamentals like bold in nicely looking proportional fonts for that!
Track changes, and label a specific part of your timeline as draft 1. Google Docs supports this. Scrivener (created specifically for writing novels) does this. Etc.
Why would I use git? It's designed for tracking changes to linted code.