What is the Textmate equivalent to http://www.vim.org/scripts/script.php?script_id=1697
Asked
Active
Viewed 384 times
1 Answers
4
The basic functions of Surround are covered by default: typing '
, "
, (
, [
or {
with some text selected will "surround" it with the character you typed.
The HTML
bundle also allows you to "surround" your text with a — further editable — <p>
tag by hitting ⌃⇧W.
Surround's coolest functionality — to be able to change "text"
into 'text'
by typing cs"'
— doesn't seem to be available.

romainl
- 186,200
- 21
- 280
- 313
-
Yes, "Surround's coolest function" is what I'm after. I also like how it lets you know where the other surround is by highlighting it – jwerre Feb 03 '11 at 15:02
-
Out of curiosity, I see a lot of people - me included - leaving TextMate for Vim or Emacs. Are you going the other way? If yes, why? – romainl Feb 03 '11 at 16:33
-
@jwerre: The source bundle has "Toggle Single / Double String Quotes" bound by default to ⌃" (control-shift-' on US keyboard layouts). Also, I have found ⌘⌃T to be invaluable in discovering functionality like this. Simply begin typing "toggle" with your cursor inside a string and this pops up immediately. – mbauman Feb 04 '11 at 16:40
-
@romainl I went to Vim for a little while and decided I was more productive with Textmate so I went back... But not before I got used to surround. – jwerre Feb 04 '11 at 16:43
-
@jwerre, you don't really suffer from that productivity hit if you start on inconsequential personal side projects. It doesn't take that long to be productive enough to move to serious stuff and be as productive as before. – romainl Feb 04 '11 at 16:57
-
all this chatter led me to start start a discussion on the topic: http://stackoverflow.com/questions/4900743/textmate-or-vim-which-is-better – jwerre Feb 04 '11 at 17:07