I mean If I press enter end next press { system should to understand
that it is new block and add right bracket also. But if I press Enter
and start line with another symbol system should do nothing. Thanks
for :inoremap tip. It's useful )

2007/2/23, Gavin Gilmour <[EMAIL PROTECTED]>:
Hi, I assume that you mean {<CR>?

If so, I have a bunch of mappings that do just this:

inoremap { {<CR>}<C-O>O

With some bonus ones that you may either like or find incredibly annoying:

inoremap [ []<LEFT>
inoremap ( ()<LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>

I'm undecided on the latter!

Cheers,

Gavin.

On Fri, Feb 23, 2007 at 10:39:28AM +0300, Alexey Vakhov wrote:
> Hi All,

> I want to add simple code snippets. For example if I press <CR>{ I
> want to extend this to
> {
>  <--- cursor
> }
> How can I make this by simplest way?
> Thanks.
> --
> Alexey Vakhov mailto:[EMAIL PROTECTED]




--
Alexey Vakhov mailto:[EMAIL PROTECTED]

Reply via email to