On Mon, Sep 25, 2006 at 08:07:22PM +0200, Meino Christian Cramer wrote: > > [snip] > > > After I wrote my first TeX-text without Emacs/AucTeX spontaneous I > > > would say the following things are missing: > > > > > > A Keystrokes to insert {\bf X }, {\it X \/} and such where X marks the > > > cursor position after doing the keystroke. > > > > > > B Interface to run TeX and a viewer (configurable) on the file one is > > > editing which ensures, that the file on the HD is uptodate. > > > > > > C Defintions to automatically map "<word>" to ``<word>'' and to remap > > > - in my case - german umlauts to the TeX-commandsequences. This > > > should be done for any non-ASCII-character. Most of the bugs I had > > > to remove while trying to tex my file were of such kind. > > > > > > I have not proofen that this is not already implemented, I only read > > > the few lines of the help text for ft-tex-plugin. And didn't fiddle > > > with quickfix and such. May be quickfix can be misused for texing ? > > > Dont know.
I am sorry to have left this alone for so long. I have been busy. I spent too much time, shortly after the last note on this thread, trying to get the 'errorformat' right for plain TeX, then I did not have time to let you know about it. I just posted a preliminary version of plaintex support at http://vim.sourceforge.net/scripts/script.php?script_id=1685 Please try it out. If I get any feedback (from you or others) then I am more likely to improve it. A. I chose <C-B> for \bf and <C-T> for \it . (Why not <C-I>? Because vim sees that as a <Tab>, and I do not want to remap that.) In Insert mode, you get {\bf }<++> or {\it \/}<++>, with the cursor inside the braces, and <C-J> will jump to the <++> marker. In Visual mode, you get the Visual selection wrapped in "{\bf " and "}" or "{\it " and "\/}". In Normal mode, the word under the cursor is wrapped. If you have similar requests, they are easy to add. B. Next version. This is not too hard to do. What viewer do you use? xdvi maybe? C. I map " (in Insert mode) to produce either `` or '' (or " if it is after a \ or in Math mode). Do you also want something, maybe <C-Q>, to act like <C-B>, so that it will work in Normal, Visual, and Insert modes? I have not tried it, but there is already a script that translates various non-ASCII characters into TeX commands. I think it does the translation when reading and writing the file. Unfortunately, www.vim.org is not responding right now, so I cannot give you a pointer. [snip] > PS: By the way: Are you using Ruby, Benji? I know "The principle of > least surprise" from programming Ruby... No, I do not use Ruby. I think the principle is older than that language. HTH --Benji Fisher