0

If some region is selected region, then applying a command (such as the commands which insert an environment) provided by auctex results in putting the region in the corresponding environment.

Is these a similar auctex command which puts the selected region between ( and )?

| improve this question | | | | |
1

(LaTeX-insert-left-brace ARG)

Insert typed left brace ARG times and possibly a correspondig right brace. Automatic right brace insertion is done only if no prefix ARG is given and ‘LaTeX-electric-left-right-brace’ is non-nil. Normally bound to keys (, { and [.

| improve this answer | | | | |
1

smartparens package has this behaviour by default for (, {, [ and ".

Additionally it is possible to add other chars:

  ;; wrap selection with a symbols
  (sp-pair "*" "*" :actions '(wrap))
  (sp-pair "_" "_" :actions '(wrap))
  (sp-pair "=" "=" :actions '(wrap))
  (sp-pair "+" "+" :actions '(wrap))
  (sp-pair "/" "/" :actions '(wrap))
  (sp-pair "$" "$" :actions '(wrap))
  (sp-pair "-" "-" :actions '(wrap))
  (sp-pair "«" "»" :actions '(wrap))
  (sp-pair "“" "”" :actions '(wrap))
  (sp-pair "´" "´" :actions '(wrap))
  (sp-pair "`" "`" :actions '(wrap))
  (sp-pair "'" "'" :actions '(wrap))
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.