
Using Vim as a writing environment - edwintorok
http://timotheepoisot.fr/2014/01/01/vim-writing-environment/
======
panozzaj
I'm working on a book talking about how to write effectively using Vim
("Writing With Vim"), sign up for updates at: [https://leanpub.com/vim-for-
writers](https://leanpub.com/vim-for-writers). I need a few more weekends and
it should be good to go. It's at about fifty pages right now and covers
philosophy, basic customizations, things that are built into Vim as well as
plugins, and will cover some publishing workflows.

~~~
spatten
50 pages? Ship it already!

Seriously, though, if you think it'll save someone some time or effort, it may
be worthwhile to hit the publish button instead of waiting.

(I'm a cofounder of Leanpub, so I'm kind of biased, and being flippant here.
Feel free to ignore me if it's not ready)

~~~
panozzaj
Actually, I appreciate your comment. I (tell myself I) was not able to commit
to publishing previously because I could not make much time to provide
updates. However, I think 1) this was probably a cop-out 2) the next couple of
months will be more open. I am going to remove some interim text and/or
comment it out and then publish for half price or something like that. Thanks
for the push!

------
sramsay
I think I've written far more ordinary prose in Vim than I have code: two
books, a dissertation, a dozen articles, probably sixty talks, letters, notes,
thousands of email messages . . . you name it.

I mainly use it, though, as an editor for LaTeX which, I think, is really
using Vim precisely as it was intended (that is, as a code editor).

------
smathieu
Although I write all of my code in Vim, I have always found it to not be great
environment for text. The main annoyance comes from dealing with long lines or
automatic line wrapping that never seems to do what I want it to.

Does anyone have other plugins that they find useful when writing in vim?

~~~
chrishenn
Reed Esau creates a bunch of vim plugins for writing, I've found them to work
very nice:

[http://wynnnetherland.com/journal/reed-esau-s-growing-
list-o...](http://wynnnetherland.com/journal/reed-esau-s-growing-list-of-vim-
plugins-for-writers)

~~~
ikusalic
Thank you for this link. vim-wheel is just pure gold, I needed that for a long
time...

------
leephillips
Author mentions having vim display greek letters and math symbols to replace
the TeX input: other plugins supply the highlighting commands to do this as
well, but I prefer setting LaTeX up to deal with Unicode symbols directly. I
just like having actual integral signs, etc. in my source. Mainly because it
freaks people out when you send them the source to your paper.

~~~
edwintorok
how do you input those symbols efficiently? (without using a character map)

~~~
pacaro
vim has good support through digraphs, :digraphs will list them, and then to
enter, either C-K <char1> <char2>, or <char1> <BS> <char2>

for example ö is C-K o : or o <BS> :

see
[http://vimdoc.sourceforge.net/htmldoc/digraph.html](http://vimdoc.sourceforge.net/htmldoc/digraph.html)
for more details

~~~
krick
Despite knowing vim digraphs I personally use XCompose for that these days.
It's easier to configure and I can use the same shortcut for _every_ program,
wich makes memorizing vim digraphs useless.

~~~
jeorgun
I'd mostly agree, but vim's digraphs are kind of essential when using gvim,
since GTK+ seems to have an inexplicable vendetta against custom .XCompose
files.

~~~
krick
I don't know what to say. I _am_ using gvim and my .XCompose settings seem to
be fine. And I don't remember me having any troubles with that so I would have
to fix something ever…

~~~
jeorgun
As it turns out, you're completely right. Oops.

In case anyone else happens to have the same issue, I solved it by sticking

    
    
      export GTK_IM_MODULE=xim
    

in /etc/environment .

------
tadhg
For any other Vim & reStructuredText users out there, I wrote a plugin to
improve the reST writing experience:

[https://github.com/erisian/rest_tools](https://github.com/erisian/rest_tools)

[http://tadhg.com/wp/2012/10/07/tools-for-writing-
restructure...](http://tadhg.com/wp/2012/10/07/tools-for-writing-
restructuredtext-in-vim/)

------
dbbolton
>and things like replacing LaTeX greek letters by the actual greek letter,

You can actually do that with conceal:

[http://ithaca.arpinum.org/2010/11/06/vim-conceal-for-
ruby.ht...](http://ithaca.arpinum.org/2010/11/06/vim-conceal-for-ruby.html)

‎[http://vimdoc.sourceforge.net/htmldoc/syntax.html#conceal](http://vimdoc.sourceforge.net/htmldoc/syntax.html#conceal)

[http://vimdoc.sourceforge.net/htmldoc/options.html#'conceall...](http://vimdoc.sourceforge.net/htmldoc/options.html#'conceallevel')

~~~
fmoralesc
That's precisely what vim-pandoc-syntax (the newest version of vim-pandoc's
syntax file) + vim-latex use.

------
colemorrison
Sublime Text 2 + Vim mode + Markdown Plugin is amazing. It's like iA Writer
except with VIM and all the fun Sublime Texyness.

------
ikusalic
vimroom (mentioned in the article) is really great.

------
vitaluha
How about navigating filesystem in Vim? NerdTree ?

~~~
techwizrd
I generally use NerdTree or Ctrl+P[1]. It's nice to be able to hit Ctrl+P and
then type 3-5 chars + enter and be exactly where I want.

[1]: [http://kien.github.io/ctrlp.vim/](http://kien.github.io/ctrlp.vim/)

