m4xshen / autoclose.nvim

A minimalist Neovim plugin that auto pairs & closes brackets
MIT License
488 stars 13 forks source link

Add an option to not add closing half of the pair when it's next to a none whitespace character #17

Closed ryuheechul closed 1 year ago

ryuheechul commented 1 year ago

Autoclose.nvim is convinient when I freshly type things like below.

   cursor
     |
     V 
(word|)

However I actually edit more than write I often find myself doing very inefficient editing like following.

; move the cursor to a existing word
|word

; type (
(|)word

; delete ) - this is a multiple key strokes
(|word

; put ) at the end
(word)|

I came up with a simple idea. Perhaps not adding a closing half of the pair when the cursor is "touching" the word. So it would be nice if this plugin can offer an option like that.

m4xshen commented 1 year ago

This options is added in 8ed364d39a7e09265f283d5ec0ce88e3a6806f41. Thanks for your feedback.

ryuheechul commented 1 year ago

Works perfectly, thank you!