Re: disabling abbreviations inside comments

2007-04-12 Thread Luc Hermitte
Hello,

* On Thu, Apr 12, 2007 at 12:31:24PM -0700, Mrinal Nath <[EMAIL PROTECTED]> 
wrote:
> I have some iabbreviations defined. The problem is that the iabbrs get
> expanded even while I am writing comments (in VHDL).
> 
> Is there a way to detect that I am currently typing a comment (line
> that has "--" anywhere before the cursor), and temporarily disable
> abbreviation expansion? When I finish typing the comment, I would like
> all the abbreviations to be expanded as usual.

My VimL-library suite lh-map-tools defines a few functions that helps
implementing such abbreviations.
-> http://hermitte.free.fr/vim/ressources/lh-map-tools.tar.gz

(Note: it also comes with a bracketing-system, and all the documentation
you'll need -> :h MapNoContext(), :h BuildMapSeq(). For more advanced
mappings have a look at my C&C++ ftplugins suite.)

HTH,

-- 
Luc Hermitte
http://hermitte.free.fr/vim/


Re: disabling abbreviations inside comments

2007-04-12 Thread Mrinal Nath

Resending due to delivery failure. Sorry for any inconvenience



I have some iabbreviations defined. The problem is that the iabbrs get
expanded even while I am writing comments (in VHDL).

Is there a way to detect that I am currently typing a comment (line
that has "--" anywhere before the cursor), and temporarily disable
abbreviation expansion? When I finish typing the comment, I would like
all the abbreviations to be expanded as usual.

Thanks

Mrinal