IntelliJ: Move to next typo

前端 未结 4 412
忘掉有多难
忘掉有多难 2020-12-24 00:14

IntelliJ IDEA has an inspection that checks for spelling. In the analysis overview, I can see how many spelling mistakes were found, e.g. 12 typos found. In the

相关标签:
4条回答
  • 2020-12-24 00:38

    F2 and Shift + F2 shortcuts will navigate you to the Next / Previous highlighted error. You need to configure the error navigation first to Go to next problem instead of default Go to high priority problems option(from the context menu of editor right side bar):

    enter image description here

    See help for details. Another option is to use double click (F4 shortcut) from the Inspection Results window to go to the source.

    0 讨论(0)
  • 2020-12-24 00:40

    In Settings -> Editor -> Colors & Fonts -> General, you can add an 'Error stripe mark' color to Typo.

    0 讨论(0)
  • 2020-12-24 00:42

    With the default settings of IntelliJ I find it difficult to spot the typos. So I do the following hack to spot and correct them once in a while.

    1. Temporarily change inspection setting to show Typos as Errors.
    2. IntelliJ then highlights the typos as Errors, making it much easier to spot them in the editor. I correct them and then revert the inspection setting changes. The changes can be kept permanently but I don't prefer that!
    0 讨论(0)
  • 2020-12-24 01:02

    IntelliJ IDEA 2016.3

    If you want to fix all typos from the project, you can list all of them and iterate through them using double click (or F4 to open the source):

    • Analyze > Run Inspection by Name...

      Analyze > Run Inspection by Name

    • Type "Typo"

      Typo

    You will be able to see a list containing all typos grouped by file:

    Spelling

    0 讨论(0)
提交回复
热议问题