jiangmiao / auto-pairs

Vim plugin, insert or delete brackets, parens, quotes in pair
http://www.vim.org/scripts/script.php?script_id=3599
4.09k stars 373 forks source link

Don't go to the closing bracket when it's on the next line #328

Closed aj3423 closed 3 years ago

aj3423 commented 3 years ago

Sometimes the code looks like:

{
    {
        some code
        |  <---  cursor here
}

When type a "}" at that position, it doesn't insert a "}", it goes to the next line. Currently I just go to the last line, copy the "}" line by yy and paste p, let the linter do the indention.

Maybe not go to the followed "}" if the "}" is on the next line ?

LunarWatcher commented 3 years ago

Shitty standards (read: let g:AutoPairsMultilineClose = 0).

My fork does this by default, as well as enabling a keybind for toggling it.