Wednesday, January 25, 2017

Re: How to make the curly brace on the same line when press enter between them ?

On Thursday, January 26, 2017 at 4:23:09 AM UTC+8, Tony Mechelynck wrote:
> On Wed, Jan 25, 2017 at 7:11 PM, Zhe Lee <imlegendlzz@gmail.com> wrote:
> > here is the thing:
> > {|}, | is my curve when I press enter now the curly braces will not on the same line.
> > How to fix it?
> >
>
> If you mean they are not in the same (vertical) _column_ then I'm not
> sure; it may or may not be possible, check in particular the options
> containing "indent" (:help '*indent*' but hit Ctrl-D instead of Enter,
> then hit Tab until you come to an entry that looks promising).
>
> OTOH, if what worries you is really that they aren't on the same
> (horizontal) _line_ then the answer is simple: Dont hit Enter between
> them, but possibly the space bar, the Tab key, or even nothing. Or
> type them both one after the other, then hit Left-Arrow to bring the
> cursor back between them.
>
> Best regards,
> Tony.
Oh if in vimrc file the result will be normal:
{
}

but if in a new buffer it will be:
{
}

Is there a way to debug what happened in the process ? Like use the debug ?

just use debug call Testf() doesn't work here.

function! Testf()
" execute "norm i{}\<left>\<CR>"
execute "norm i{\<CR>"
endfunction

--
--
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/d/optout.

No comments: