Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.81k stars 193 forks source link

Smartparens and Vimfold #862

Open inspell opened 6 years ago

inspell commented 6 years ago

Expected behavior

Vimfold brackets are recognized or ignored.

Actual behavior

Smartparens fails with: Search failed. This means there is unmatched expression somewhere or we are at the beginning/end of file.

Steps to reproduce the problem

Have this text in a buffer (in my case elisp buffer):

;; Debugging Utilities {{{ (setq xxx-debug-enabled t) ;; }}} Debugging Utilities

Notes: Generally Vimfold uses the {{{ and }}} inside comments to fold blocks of code. Currently I don't have this mode enabled but I was thinking about it. However I may reconsider if it will make the use of smartparens harder. It is a bit annoying that I cannot delete whole foldable sections.

Now select the text (all the three lines) and try to delete it with 'd'. You will get the error message mentioned above. If you try to paste what you've delete with 'p' you will see that only the 'Debugging Utilities' part is pasted.

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information

In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.

Fuco1 commented 6 years ago

Currently the search inside comments is bound to that one comment only. I had this idea for a long time to add some flag to a pair which would allow the context to "spill over" to the following comment or comments precisely for this use case.

Nothing is done yet but it is something I am/was considering for a long time, so one day we might land this feature.