Please enable JavaScript to view the math powered by MathJax

I've been using FocusWriter (henceforth FW) for a while. It has an uncluttered writing interface and a calming atmosphere. I like FW, and it has been working quite well for me. My quibble is that FW supports only plain text or RTF. I would prefer something like markdown or reST (with some syntax highlighting), so that the files are readable and editable in any text editor. And it would be easy for me to post my writings on this blog. (Ruhoh accepts markdown by default)

I decided to try Vim for this purpose. Vim is a well featured clutter-free text editor and there will probably be plugins for the things I want. And I use Vim for generic editing, so I'm comfortable with it :-)

Note: This is a work in progress and I'll update it as I come up with more ideas.

How to convert Vim to such a mode i.e. things I would like

  1. Provide syntax coloring for the scheme I plan to write with. Should look for plugins. ✔
    • Ruhoh uses [ ] to list tags. And Markdown uses square brackets for image data. Which creates a small conflict. I'm wondering how to sort that out. It would be nice if we can tweak the syntax highlighting to respect the file header/metadata. Current (temporary?) solution is to comment out line45 from .vim/syntax/mkd.vim to make Vim neglect that bit of syntax recognition.
  2. Hide all menus in full screen mode. GVim or Vim (through any reasonable terminal emulator) should be okay since it has a fairly minimal interface. ✔
  3. Text should be soft-wrapped around nicely, with width I choose.
    • Softwrap is taken care of. ✔
    • Still don't know how to restrict it's width the way I want.
    • One annoying thing on Vim is that by default the down arrow takes you to the next (hard) "line", and not if the current line has been wrapped to successive lines of display. Rebinding the up/down keys with a g has taken care of the matter. Now I can "scroll" through soft lines. ✔
    • Justified text alignment. Since this is only the raw (input) form, I can live without it. ✔
    • Centered text box. Issokay. I can live without it. ✔
  4. I would like to get data like the number of words/characters I've typed (in this session) and how much time I've been working on this file. Other "metadata" like when I started this post, total number of words/characters in this file, etc would also be nice. But the interface must be kept uncluttered. All this data in the statusline, or in a separate 1-2 line window at the bottom, on demand.
    • Vim shows that with g Ctrl-g. Not in the status line just yet. ✔
  5. Will reST be more comfortable to use, than markdown? In that case, write in reST and then convert it to markdown, say using pandoc.
  6. Good tools to export to different formats from markdown. I think Pandoc accomplishes that nicely, for now. ✔
  7. Any way to see document outline in Vim? I wonder if the file can be folded around different levels of headers.

Some helpful tips

  • Vundle (alternatively vim-pathogen, but Vundle's better imho), is an excellent way to manage Vim plugins and scripts, especially Github ones.
  • Vim powerline seems to give a nice looking status line (in it's default configuration) which can be tweaked to display what I want.
  • The Solarized theme for Vim is awesome!

Once I have the setup ready, I'll put up screenshot(s) :-)



blog comments powered by Disqus

Published

2012-07-11

Tags