Wrapping selecting text in enclosing characters in Emacs

后端 未结 9 1758
情书的邮戳
情书的邮戳 2020-12-24 07:06

In Textmate I can wrap enclosing characters (\'(\', \'[\', \'\"\', etc.) around text by selecting it and hitting the opening character. For example, if I select word<

相关标签:
9条回答
  • 2020-12-24 07:23

    If you use smartparens just select the text and then type the pair. Smartparens wiki: Wrapping

    0 讨论(0)
  • 2020-12-24 07:26

    I use http://www.emacswiki.org/emacs/ParEdit. M-( does exactly this.

    0 讨论(0)
  • 2020-12-24 07:26

    There is textmate-mode.

    From Emacswiki:

    See textmate-mode for an attempt of having the TextMate behaviour for parenthesis and quotes (auto-closing, overwriting, smart delete).

    http://code.google.com/p/emacs-textmate/

    0 讨论(0)
  • 2020-12-24 07:27

    Autopair is the best one of these tools

    0 讨论(0)
  • 2020-12-24 07:34

    You can have a look at wrap-region.

    0 讨论(0)
  • 2020-12-24 07:34

    Since Emacs 24.1(released 2012-06).
    Put this in your emacs init: (electric-pair-mode 1).
    Now If you select a word and hit (, it will become (word). Same for ", [, { etc.

    0 讨论(0)
提交回复
热议问题