Fueling the Web

Sublime Text: Redo Action Shortcut


When using Sublime Text, sometimes there are scenarios where I find myself needing to redo a particular action that I just ran.

For instance, I sometimes need to convert several variables in a file from snake_case to camelCase or vice versa. To do this, I use a package called Case Conversion. With this package installed, I can convert a variable with these steps:

  1. Select or place the cursor over a variable.
  2. Bring up the command palette with Shift + Cmd + P.
  3. Fuzzy search for 'Convert Case: camelCase'.
  4. Hit Enter to run the command.

Then, instead of searching for that command again, I can simply place my cursor over additional variables and hit Cmd + Y to redo the previous action. That lets me quickly run the same command multiple times.

Of course, if it's easy enough to select all words at the same time, then I can just run the command once and be done. But it's not always easy to add multiple cursors exactly where I need them, or I may not know exactly where all of the variables are that need to be converted. In these cases, the redo action shortcut comes in quite handy.

Case Conversion is just one use case. There are many more. How have you used the redo action command?