Re: [Vim-latex-devel] Math mode: how to disable textwrap
Brought to you by:
srinathava,
tmaas
From: Ted P. <te...@te...> - 2008-11-12 16:18:39
|
> Is there a way to automatically set tw=0 when entering math mode, and > resetting it to whatever it was (e.g. 72) when exiting math mode ? > That's a feature I'd love to have (didn't found it in the manual) : > long mathematical equations are usually much easier to read when not > automatically wrapped. > > Is there any easy way to do so ? I don't know HOW, but I think I know where you should start looking. **Idea 1** In Vim, you can use "autocmd" to automatically fire off a command on a specific event. Try: :help autocmd Ideally, you would like entering mathmode to trigger some event, and Vim would fire off an autocmd. Exiting mathmode would turn off that event. **Idea 2** Do you use the LaTeX-Suite IMAP macros to enter equations? For example, do you type EEQ to start a new equation environment? If you do, you could redefine EEQ to not only build the equation environment and reposition the cursor but *ALSO* turn off wrapping. You could then define some other combination to turn wrapping back ON and issue the Cntrl+J that brings you to the final <++> placeholder. I hope someone else has some better ideas for you. Personally, I either... *) deal with it and issue SHIFT+J's whenever I need to join lines OR *) Turn on paste mode (:set paste) and then turn it off when I'm done (:set nopaste). --Ted -- Ted Pavlic <te...@te...> |