Sunday, July 28, 2013

Re: Mapping Macro using smartindent

On Monday, July 29, 2013 3:45:56 AM UTC+2, Ben Fritz wrote:
> On Sunday, July 28, 2013 9:09:42 AM UTC-5, Sven Kämpf wrote:
>
> > Hello,
>
> >
>
> >
>
> >
>
> > I try to speed up writing using mappings.
>
> >
>
> > Smartindent
>
> > is on, but doesn't
>
> > work appropriatly.
>
> >
>
> >
>
> >
>
> > Example:
>
> >
>
> >
>
> >
>
> > Assume the following mapping:
>
> >
>
> >
>
> >
>
> > imap {
>
> > {}<Esc>i<CR><Esc>ko
>
> >
>
>
>
> I suggest using cindent instead of smartindent. Or better yet, "filetype plugin indent on" in your .vimrc.
>
>
>
> smartindent is not so smart sometimes.

Thank you for your suggestions, but unfortunately it doesn't work.
Another Example:

If I type:

<Space><Space>go<CR>{}

...in insert mode, than the following appears:

^__go
^__{}

But If I make a mapping like this:

inoremap <Leader>go go<CR>{}

...and type:

<Space><Space><Leader>go

...then the following appears:

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment