Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim: Add square bracket commands #17693

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saahityaedams
Copy link
Contributor

Closes #17177 #4316

Release Notes:

N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 11, 2024
@zed-industries-bot
Copy link

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A
Messages
📖

This PR includes links to the following GitHub Issues: #17177, #4316
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against 74bd3f2

@saahityaedams
Copy link
Contributor Author

@ConradIrwin I took a stab at implementing the square bracket vim commands and had a query.

Does ]] mean moving to the next { at the zeroth column for ALL file extension ? Can it be configured ? The documentation here isn't very clear.

@ConradIrwin
Copy link
Member

In vim I believe that is how it works. I would like to do better than that, but it's not (yet) clear to me how to map tree-sitter node names to methods in a reliable cross-language way.

@maxdeviant maxdeviant changed the title [DRAFT] Add square bracket commands for vim mode vim: Add square bracket commands Sep 16, 2024
@ConradIrwin ConradIrwin self-assigned this Sep 17, 2024
@feltcute
Copy link

In vim I believe that is how it works. I would like to do better than that, but it's not (yet) clear to me how to map tree-sitter node names to methods in a reliable cross-language way.

These keybinds for treesitter nodes are done in Helix (Vim Unimpaired inspired) and Ki Editor to more advanced extents, the latter of which is also in Rust and uses treesitter as its fundamental technology for its modal structure, may serve as useful reference. I try to broadly cover the topic of the state of treesitter based bindings in-depth in a Discussions comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support vim count sections [m and [[
4 participants