Assume I have text with cursor as | (after $):
while ( letter != '$|')
now I want to finish while statement and open C-block without typing <S-TAB><S-TAB><CR> or leaving insert mode to get this
while ( letter != '$')
{
|
}
Now I have simple map in my vimrc to do this
inoremap {{ <C-o>o{<CR>}<C-o>O
Works fine, but it always adds new line before open curly brace, so when I want just add C-block on current line this mapping inserts unwanted empty line before C-block.
What I suggest: add to plugin smart C-block expansion that checks if there is some text before cursor or no. And using this information add new line before open brace or no. Also will be nice to have setting to choose style between:
while ( 1 ) {
}
or
while ( 1 )
{
}
By the way, thank you for plugin, it is really cool.
Assume I have text with cursor as | (after $):
while ( letter != '$|')
now I want to finish while statement and open C-block without typing<S-TAB><S-TAB><CR>
or leaving insert mode to get thisNow I have simple map in my vimrc to do this
inoremap {{ <C-o>o{<CR>}<C-o>O
Works fine, but it always adds new line before open curly brace, so when I want just add C-block on current line this mapping inserts unwanted empty line before C-block.
What I suggest: add to plugin smart C-block expansion that checks if there is some text before cursor or no. And using this information add new line before open brace or no. Also will be nice to have setting to choose style between:
or
By the way, thank you for plugin, it is really cool.