Closed rietmann closed 9 years ago
What exactly do you mean by "everything". Also, some description of frustrations would be nice. Many things can be fixed by simply toggling some customze variable.
Sorry for being unspecific. By "everything" I mean, I get the following when I type "something"
"something\"
Basically, when I go back and edit a string, to add a variable or something, I don't want smart quotes.
this:
"some text foo" -> "some text: " + variable + ", foo"
ends up as
"some text\"\" foo"
I just want to turn smart-parens off for quotes. I like them everywhere else so far.
thanks again!
Well, to disable escaping you can simply toggle sp-autoescape-string-quote
off. There are some edge cases when autoescaping does weird things, and it is planned to be fixed, but it depends on other fixes that aren't done yet.
Note that to split a string into two you can call sp-split-sexp
. In the very near future there will even be a post-handler available so you can automatically insert + | +
or anything else you'd like.
Hi There!
I'm giving smart-parens (via Prelude) an honest try, but I find myself constantly frustrated with completions for " and \". I tried removing it using tips from the wiki (in my customizations.el)
This seems to break everything. I'm including the output of (print sp-pairs) below.
thanks!
(print sp-pairs)
((latex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "{" :prefix "\(\sw|\s)" :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\"" :close "''" :actions (insert) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-quotes)) (:open "\"" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\(" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "/" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "[" :close "]" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "$" :close "$" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "`" :close "'" :skip-match sp-latex-skip-match-apostrophe :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (plain-tex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "{" :prefix "\\\(\sw\|\s\)" :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\"" :close "''" :actions (insert) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-quotes)) (:open "\\"" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\\(" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "/" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\[" :close "\]" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "$" :close "$" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "
" :close "'" :skip-match sp-latex-skip-match-apostrophe :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (tex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-spaces-inside-pair)) (:open "{" :prefix "\\\(\sw\|\s_\)_" :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\"" :close "''" :actions (insert) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (sp-latex-insert-quotes)) (:open "\\"" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\\(" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "/_" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "\[" :close "\]" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "$" :close "$" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "
" :close "'" :skip-match sp-latex-skip-match-apostrophe :actions (:add) :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (common-lisp-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (clojure-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (nrepl-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (slime-repl-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (eshell-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (lisp-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (scheme-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (lisp-interaction-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (inferior-emacs-lisp-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (emacs-lisp-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) :post-handlers (:add)) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (t (:open "\\(" :close "\\)" :actions (insert wrap autoskip)) (:open "\{" :close "\}" :actions (insert wrap autoskip)) (:open "\(" :close "\)" :actions (insert wrap autoskip)) (:open "'" :close "'" :actions (wrap insert autoskip) :unless (sp-point-after-word-p)) (:open "(" :close ")" :actions (insert wrap autoskip)) (:open "[" :close "]" :actions (insert wrap autoskip)) (:open "{" :close "}" :actions (insert wrap autoskip)) (:open "" :close "
" :actions (insert wrap autoskip)))) ((latex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) ...) (plain-tex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) ...) (tex-mode (:open "\langle" :close "\rangle" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg{" :close "\Bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big{" :close "\Big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg{" :close "\bigg}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big{" :close "\big}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Bigg(" :close "\Bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\Big(" :close "\Big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\bigg(" :close "\bigg)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\big(" :close "\big)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left{" :close "\right}" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) (:open "\left(" :close "\right)" :actions (wrap insert autoskip) :when (:add) :unless (:add) :pre-handlers (:add) ...) ...) (common-lisp-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (clojure-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (nrepl-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (slime-repl-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (eshell-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (lisp-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (scheme-mode (:open "" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (lisp-interaction-mode (:open "
" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) (inferior-emacs-lisp-mode (:open "`" :close "'" :actions (:add) :when (sp-in-string-p) :unless (:add) :pre-handlers (:add) ...) (:open "'" :actions nil :when (:add) :unless (:add) :pre-handlers (:add) :post-handlers (:add))) ...)