James McMahon
James McMahon

Reputation: 49629

Sublime Text 2 multiple selections editing in vintage mode

Is there there a way to edit files across multiple selections in vintage mode?

I hit cmd + D (this is under a Mac) to select instances of string in the file, but I can't figure out how edit the selections.

This is under Sublime Text 2.

Upvotes: 4

Views: 1445

Answers (3)

gaga lady
gaga lady

Reputation: 33

Usually I just press shift+up/down/right/left, then you will find that you can select whatever you want. It works on Mac sublime 3.

Upvotes: 1

theillien
theillien

Reputation: 1380

I struggled to figure this out myself. I came to find that simply selecting a word with Ctrl+D and then pressing c isn't a complete solution. It will only select the first occurrence of a word. In order to select and change them all I have found that I need to execute the following sequence:

  • Place the cursor at the beginning of the desired word
  • Ctrl+D to highlight the word
  • Ctrl+F to open the Find box pre-populated with the desired word
  • Alt+Enter to select all of the matching words
  • c to make the changes
  • Esc to return to COMMAND MODE

There are several posts all over the Internet (including the documentation on the Sublime Text website) which states that pressing Alt+F3 will select all of the matching words. This does not work for me on openSUSE/KDE. Pressing Alt+F3 will instead open the window menu for minimizing, maximizing, etc. In fact, if you hover over the Find All button after opening the Find box it will display Alt-text indicating Alt+Enter.

Upvotes: 1

isengrab
isengrab

Reputation: 122

I haven't tested this on a Mac, but on Linux using CTRL-D puts you in visual mode. When you're in visual mode c allows you to change the highlighted text, putting you into insert mode much like vim would.

Upvotes: 5

Related Questions