Search code examples
pythonvisual-studio-2013ptvs

How to highlight all symbol appearances in python code with PTVS?


I am using PTVS 2.2 for VS2013 for my Python project. I found 2 important features seem missing for code editing:

  • Reference Highlighting: When I highlight a symbol by double clicking it, I want all the appearances of this symbol to be highlighted as well. It could help me identify the symbol's usage quickly.

  • Refactoring: When I change a symbol, all its appearances should be changed accordingly.

    But PTVS is not doing that (see below). Or do I misconfigured it?

enter image description here


Solution

  • For reference highlighting, I found below extension. But it's dumb because it's not case-sensitive.

    Highlight all occurrences of selected word

    For Refactoring, it turns out i need to right click and select refactor first. It's a bit tedious, but at least works.

    enter image description here

    Ref:

    Highlight references when cursor is on an identifier #76

    PTVS refactoring