Vim
Vim copied to clipboard
Add new plugin: vim-indentwise
What this PR does / why we need it:
This adds a vim-indentwise implementation so you can move by indent level (very useful for Python and similar languages)
Which issue(s) this PR fixes
Fixes #7667
Special notes for your reviewer:
I added a section in the readme that describes how to use this plugin emulation and lists all the shortcuts. I already use this in my local setup. Let me know if you'd like anything changed as this is my first PR to vs-code vim. Thanks for all your great work, it was really easy to add this!
One note: absolute jumps don't work well with tabs at the moment - I'd add this as a separate PR on top of this one if you don't mind
@J-Fields could you please enable the GH actions for this PR and tell me what I can do to make it easy to merge this PR? I think it would be a very useful feature for indentation sensitive languages. Thank you!
I've rebased this PR on top of the latest stable release - let me know if you prefer it rebased on top of master (it should not have conflicts so should be an easy merge either way)
I just rebased on top of the current master that is roughly version 1.26.1.
Here is a debug build of the extension. It is built on windows, I'm not sure if VS code extensions are platform dependent? Storing this here so others can try the extension more easily and give feedback.
To install, download and unzip the above file, then, in a terminal, run
code --install-extension vim-1.26.1.vsix --force
and restart VS Code. This will install this build over the current VS Code Vim extension until the next point update for VS Code is released.
Check the readme section on this plugin to learn about the keyboard shortcuts.
You can remap the keyboard shortcuts to something else if you like - e.g. I use a german keyboard and don't have much use for the ü and ä keys so I remap the keys like this in the settings.json file (run the VS code command Preferences: Open User settings (JSON) to open it) like so (showing one example only to remap the "Go forward to next line with same indent" to ü, h:
"vim.normalModeKeyBindings": [
{
"before": [
"ü",
"h"
],
"after": [
"]",
"-"
]
}
],
"vim.visualModeKeyBindings": [
{
"before": [
"ü",
"h"
],
"after": [
"]",
"-"
]
},
]
@J-Fields I have some time over the next weeks and thought it would be nice to pick up this work and finally merge support for the indentwise plugin to help navigate by indent level. Could you let me know how to best get this PR merged? I have been using this functionality for a while, added some tests, documented the new shortcuts in the readme. I also asked a few people who showed interest in this in issue #7667 to test this.
The CI is currently not running - could you approve the workflow for the checks to run?
Please tell me if you are busy but there is maybe someone else who can review the code or if there is anything I can do to make it easier to review and merge this. Thanks a lot!