How to select all instances of a variable and edit variable name in Sublime

后端 未结 10 1296
一向
一向 2020-12-02 03:34

If I select a variable (not just any string) in my code, all other instances of that variable get a stroke (white outline) around them:

10条回答
  •  一向
    一向 (楼主)
    2020-12-02 03:43

    1. Put the cursor in the variable.

      Note: the key is to start with an empty selection. Don't highlight; just put your cursor there.

    1. Press D as needed. Not on a Mac? Use CtrlD.

    Didn't work? Try again, making sure to start with nothing selected.

    More commands:

    Find All: CtrlG selects all occurences at once. Not on a Mac? AltF3

    Undo Selection: U steps backwards. Not on a Mac? CtrlU

    Quick Skip Next: KD skips the next occurence. Not on a Mac? CtrlKCtrlD

    Sublime Docs

提交回复
热议问题