valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
815 stars 29 forks source link

Feature request: Command to move cursor to previous/next found issue #705

Open oiiiiiiii opened 2 years ago

oiiiiiiii commented 2 years ago

Note: Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Is your feature request related to a problem? Please describe. I often times type, then later see (thanks to the extension) a grammar mistake or similar I made. Then I always need to navigate back to the part where the mistake is and let it fix (or fix it manually). This "navigating to the error" is somewhat annoying to me.

Describe the solution you'd like I would like to have a keyboard shortcut to navigate the cursor exactly to where the previous issue is. Therefore I would like a command that gives that option, similar to cSpell.goToPreviousSpellingIssue from the Code Spell Checker Extension, which I can then bind to any keyboard shortcut I want inside the keybindings.json of VSCode.

Describe alternatives you've considered An alternative would be to bring up the quick suggestions menu of the previous warning, but I think the first solution would be better.

Additional context None.

t-huyeng commented 2 years ago

You can try f8 + shift or f8.

I at least have this in my VSCode keyboard shortcuts defined as:

f8 - Go to Next Problem in Files (Error, Warning, Info) f8 + shift - Go to Previous Problem in Files (Error, Warning, Info)

Still this not always works for me and jumps sometimes to the beginning of the file. But I guess if you do not have to much warnings it should work okay.

{
  "key": "f8",
  "command": "editor.action.marker.nextInFiles",
  "when": "editorFocus"
},
{
  "key": "shift+f8",
  "command": "editor.action.marker.prevInFiles",
  "when": "editorFocus"
}
oiiiiiiii commented 2 years ago

Yeah but same problem for me. Sometimes if there are errors below your cursor it will jump to them instead of the one before your cursor, so I think it would be could to have a "proper" solution.