VIM with iA Writer type formatting

formattingmarkdownvim

I've been Googling for a while now. I would like to have iA Writer-like (or a bit like StackExchange) formatting in Vim. Since I love the way it formats my texts, but I'm constantly pressing "w" to skip words because my experience with Vim. I would love to be able to have the same smart formatting in Vim.

I did found a nice Vim plugin for getting Vim to toggle to big and clean font:
https://github.com/honza/writer.vim

But this still does not enable me to use the formatting:

# Header 1  
## Header 2 
*underline*
**strong**
etc...

Besides all this above, I would not mind to have Vim like shortcuts in my iA writer app if it would not be possible to implement iA formatting in Vim.

Edit: After a while of even more searching, I found out this type of formatting is called Markdown. I am starting to think there isn't really a good way to directly edit a Markdown file in Vim, because Vim is not able to make things display like that? I would really like to be able to use the movement shortcuts in combination of the nice formatting of Markdown and how it is displayed in iA Writer.

Best Answer

  • As Daniel Andersson says, a syntax file will get you a long way towards what you want. It's still not the same as a WYSIWYG editor, but headings, bold or italic text and code will look different if you have a proper syntax file set up. Note that there are a few competing Markdown plugins. In addition to the one Daniel mentioned, you might try this one or this one.

    But in addition, you could try a plugin for Vim like WriteRoom for Vim. The idea is to make Vim visually distraction free. If you add such a plugin, and make (g)Vim as large as possible, you may get even closer to what you want.