Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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

# Header 1  
## Header 2 

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.

share|improve this question
For people who don't know what that thing is or what it does, could you provide examples of what it does and how it does them? – romainl Aug 1 '12 at 10:43
Markdown is plain text and Vim is the best tool you'll ever find for editing plain text. The presentation of markdown is an entirely different problem. The ## and Co. are there to provide semantics to your text for humans and machines. If you have ## subheader, you don't need to have a 22px font. – romainl Aug 1 '12 at 14:58
up vote 2 down vote accepted

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.

share|improve this answer
Thanks! I think with the syntaxes that you've provided, and also the one of Daniel Andersson, I'll get pretty close to where I would like to be. The only thing I'm missing now (which isn't really a big problem) is the indentation that iA Writer gives me. Thanks to both of you! Vim just also became my preference for simple text editing and creating notes. :) – Ambidex Aug 2 '12 at 7:20

Vim is a text editor and not a word processor. By design it does not allow to show portions of text with a larger font.

Close enough, though, is to write your documents with Markdown syntax, and use a syntax file that highlights correct Markdown markup in Vim with color/font style/etc.

Vim Instant Markdown provides an instant preview mode in an external window.

This Vim syntax plugin for Markdown seems to be well used.

Also worth to mention: the point of Markdown syntax is that it is supposed to be easy to read even without fancy graphics possibilities; i.e. it should be readable as a well organized document in raw text form. If it fulfills this or not is a matter of opinion, but I find it quite clear, and I often write personal notes that will never be shown in a fancy graphical manner in Markdown syntax (on the other hand, I don't find LaTeX syntax especially difficult to read on the fly either).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .