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

后端 未结 10 1303
一向
一向 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:45

    As user1767754 said, the key here is to not make any selection initially.

    Just place the cursor inside the variable name, don't double click to select it. For single character variables, place the cursor at the front or end of the variable to not make any selection initially.

    Now keep hitting Cmd+D for next variable selection or Ctrl+Cmd+G for selecting all variables at once. It will magically select only the variables.

提交回复
热议问题