Re: [Vim-latex-devel] help needed with \ll and \lv shortcuts
Brought to you by:
srinathava,
tmaas
From: Charles B. <bon...@ma...> - 2003-01-10 15:43:01
|
On Fri, 2003-01-10 at 00:56, Srinath Avadhanula wrote: > On Thu, 9 Jan 2003, Srinath Avadhanula wrote: > > > One bug: The documentation says that "SPG" gives a \paragraph, > > > but "SPR" does. > > > > > I'll fix this now... > > > I actually ended up changing the map for \paragraph to SPG instead of > fixing the documentation... SPG seems a more logical choice. Either one is reasonable. > > > > call IMAP (g:Tex_Leader.'M', "\\sum_{<++>}^{<++>}<++>", 'tex') > > > > > This is an excellent suggestion thanks. I've added this, but the problem > > with this is that because g:Tex_Leader is "`" by default, therefore at > > the beginning of a quote, you press M, you'll get \sum.. which will > > I have taken care of this problem. In the latest version `M expands to > \sum except when it is preceded by ` or \ (so that we can type ``Moo and > \`M (for diacritics)). > Even weirder in the my version (a few days old), type "I am here". The double quotes get changed to two left quotes, which then trigger the `I substitution and you get `\int... Also fix for `I (which gives int). The others (lines 90-116 in my main.vim) might occur, but are less likely. If the fix is easy, fix for them also. The issue of what to use as a Tex_Leader is interesting. Some years ago, I did my own mappings (when vim was much more primative) with ",". The idea is that in English a comma is almost always followed by whitespace. The same holds true for semi-colon ";". Both make good leaders. A period "." can also be used (as in nroff) The recognition of both "," and ";" can be improved if you require whitespace (or first character of new line) before expanding the macro. A left quote is a little more problematic. It is used for diacritical marks (as you note) and for double left quotes in Latex. Many experienced latex authors automatically type `` at the beginning of a quote. If this were a brand new project, I'd suggest using one of "," or ";" for latex-suite macros and leaving the other one for user defined macros. Some bugs: When I type `i or `j or `o (letters not in greek) I get an error: Undefined variable s:greek_i etc. instead of `i etc. Charlie Boncelet > Thanks, > > Srinath -- Charles Boncelet <bon...@ec...> University of Delaware |