smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Does show-smartparens-mode work with sh-mode if statements?

Open kriansa opened this issue 5 years ago • 3 comments

Does show-smartparens-mode work with sh-mode if statements, or is there something wrong with my configs?

I was expecting it to work similarly to enh-ruby-mode where I can see the matching if/ends:

image

But for sh-mode, this is what I get instead:

image

Thanks for the awesome work on this project!

kriansa avatar Dec 21 '20 07:12 kriansa

Currently there is no such built-in configuration, but it probably can be implemented. Beware that there might be some glitches with some more obscure syntax.

(sp-local-pair 'sh-mode "if" "fi" :actions '(navigate))

Fuco1 avatar Dec 24 '20 13:12 Fuco1

@Fuco1 Thanks, this is great! Is there a reason why this isn't built-in?

kriansa avatar Dec 28 '20 23:12 kriansa

I guess nobody made it yet and I don't use much bash.

Fuco1 avatar Dec 29 '20 19:12 Fuco1