auto-pairs icon indicating copy to clipboard operation
auto-pairs copied to clipboard

Could you please use the user-defined tab width when inserting new line?

Open screwzm opened this issue 10 years ago • 4 comments

This is a great plugin, thanks for your good work. But I am wondering if you can make one adjustment when inserting new line after { and RETURN? The problem is that you indent a fixed number of SP for the whole input, I think using the user-defined tab width(if exist) instead to indent is very necessary.

screwzm avatar Mar 18 '14 04:03 screwzm

:+1: It's quite annoying when you have a language with certain recommended tab widths and auto-pairs inserts a fixed width. I would install auto-pairs again if this was fixed.

beakr avatar Mar 18 '14 04:03 beakr

It uses o to insert new indented line. so the behavior depends on vim settings.

jiangmiao avatar Sep 02 '14 13:09 jiangmiao

Mine does not indent though but it does insert an empty line in between curly braces. Probably some conflict in my vim settings. I had to do some workaround with this:

inoremap {<CR> {<CR>}<C-o>O<TAB>

flipjs avatar Oct 11 '14 02:10 flipjs

I believe we have similar problems.

When I was pressing new lines inbetween blocks like {}, it was adding extra indents.

This is similar to problem #54

It might have something to do with using YAIFA

My fix for that line is:

return "\<ESC>ko\t".cmd

check out the diff here: quangv@a9567a1f06370a445ae8ff28e6a3243506c774ff

quangv avatar Aug 20 '15 05:08 quangv