vscode-crystal-lang
vscode-crystal-lang copied to clipboard
Shortcut to navigate to beginning and end of block
Hi, I am very new to Crystal and I have been barely using it for a week on vs code with this extension.
Good work guys! I would like to suggest some features.
In programming languages, where brackets are used to define the scope, I use cmd+shift+\
to navigate to the matching bracket.
But in crystal, we don't have brackets and scopes are being defined by def
, if
... end
etc. So, I would like to have shortcuts to move to beginning and end of scopes.
For example,
- If the shortcut is pressed at line number 30, the cursor would navigate to the end statement at line number 35.
- If the shortcut is pressed at line number 32 ( if statement ), the cursor would navigate to the end statement at line number 34.
- If the shortcut is pressed at line number 31, the cursor would navigate to the end statement at line number 35. ( because that code is in
do-end
block ) -- This is not possible withcmd+shift+\
in bracket scoped languages. So, this could be optional implementation based on the possibilities.
This is will help in navigating the code base faster. It's as powerful as saying "Go to the next function in the class and modify it. Once done, move to the next function."
Hi Thanks you for report this issue!
This problem also happen on VSCode for Ruby, Elixir and other similar languages.
I already published an issue about that on VSCode repo
Please see: https://github.com/Microsoft/vscode/issues/32085
Potentially useful:
- https://github.com/elixir-lsp/vscode-elixir-ls/issues/46
- https://github.com/microsoft/vscode/issues/48332
- https://github.com/microsoft/vscode/issues/176694
https://github.com/microsoft/vscode/issues/583