[Vim-latex-devel] Re: matching brackets
Brought to you by:
srinathava,
tmaas
From: Luc H. <her...@fr...> - 2002-11-12 19:57:26
|
* On Tue, Nov 12, 2002 at 08:26:48AM -0500, Carl Mueller <cm...@ma...> wrote: > One of my biggest problems used to be mismatched brackets. > Now I have macros which automatically type the matching > bracket. For instance, "(" results in "()" with the cursor > in between. Since I sometimes want only one bracket, I made > it so that "((" results in "(". > That is faster than typing "(" and then deleting the extra bracket. > Not everyone may agree with this idea, so it could be an option. Hum ... nice idea. If you don't mind, may be I will use in my common_brackets.vim. As the only times I need a single parenthesis are within comments or string contexts, I use <C-V> for the remaining rare times. Personnaly, I'd rather see this as a plugin. Then from any file in ftplugin/tex, the corresponding pairs are activated. and the same from ftplugin/vim, ftplugin/c, etc. These bracketing macros are not interresting in LaTeX documents only. > I'm listing the code below. It applies to: > () [] {} \{\} $$ It reminds me I need to extend my version of CompleteSlash to support '\%(\)' -- for vim > || \|\| > && (when within eqnarray or eqnarray* environments) cheers, -- Luc Hermitte |