Hello,

Itry 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

Typing "{" (Quotes for clarification) results in
"
{
_
}
" (where "_" is the cursor position) -> Perfect.


But:

--->
line n: for(int i(0);i<v.size();++i)_
<---

...though typing <Esc>o leads to
---->
line n  : for(int i(0);i<v.size();++i)
line n+1:  _
<----

..typing '{'(using the mapping from above) leads to
---->
line n  : for(int i(0);i<v.size();++i)
line n+1:{
line n+2:  _
line n+3:}
<----

How can I getthis?(Appearing the brackets right below the'f' in the same column)
---->
line n  : for(int i(0);i<v.size();++i)
line n+1:  {
line n+2:    _
line n+3:  }
<----

Thank you in advance for help.

Best Sven K.

--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to