-
Notifications
You must be signed in to change notification settings - Fork 783
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
expand line command actions #1449
base: main
Are you sure you want to change the base?
Conversation
I dig it. I'd be interested in your feedback on this one too: #1424 (similar to vim's |
Ya, I'm a bit iffy on using find here, just happens to be what I had used in vim. I'd be fine with |
dce6231
to
abb2ee1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
I wanted to share an idea that I just had about this: it would be really cool if we could add a similar command for adding a cursor at the next glyph (meaning: leave a cursor where you are now and then add another one at the next instance of this glyph) |
I wish I could merge this for you 😄 |
can file an issue or open a separate PR for it. you'd want that to only add a cursor to the next glyph on the same line or next in the file? makes me wonder if there should be a file for 'multiple cursor' related commands. I don't ever use them aside from with cursorless, but I suspect lots of others do. would need some common command to indicate you want to add a cursor too. "curse" would be good but curse on/off is used for mouse cursor, so a bit confusing. but something like "curse add next char this"? You could just do what you want in cursorless already with something like (untested) "pre char this and next view char this", but it's a bit wordy. anyway probably better to discuss in a different issue or PR if you prefer not to use cursorless for that. |
👍fwiw you can also use cursorless to navigate to the next glyph. I use multi cursor most often when I don't have access to cursorless because I'm having to work in IntelliJ. |
We discussed this in the latest community session.
|
abb2ee1
to
93c9297
Compare
Changed the names and doc strings to reflect the feedback.
vimscript.py is for the vimscript language, not for the vim app, so not applicable there. community doesn't have any native support for vim atm. Adding it is non-trivial because of mode switching, so it's not as simple as just enabling it if vim is active somewhere. Most people using vim (afaik) used to use my personal repo, which then got broken out into talon-vim, and then partially got broken into a much simpler implementation neovim-talon, which is what will be paired with cursorless in neovim. The neovim-talon repo will use these actions being added in this PR, so I don't think there needs to be something in community using them right away. I suspect there is probably some emacs equivalent that could be added if you think there really should be something. Or we could add something for https://marketplace.visualstudio.com/items?itemName=ArturoDent.jump-and-select, but I doubt many people are using that in vscode (could be wrong). |
I did notice that zsh by default seems to bind a readline shortcut for doing this, but bash doesn't. So will need shell-specific readline overrides, which we don't support atm. I plan to add this to my branch and then port it over eventually after a bunch of testing, but not sure if it needs to be part of this PR. I don't mind to wait though if it's preferred to have some real use cases in community. I guess maybe of note, I have a vscode plugin scope in my branch so can enable certain commands if a vscode plugin is installed, which could be used to enable jump-and-select extension mentioned above to more cleanly add support for this into vscode as well. I haven't opened a PR to add that to community yet though. |
93c9297
to
0dc2b80
Compare
Update from the community session. We think that we should probably wait with this until we actually have an implementation in community that utilizes the spoken forms. |
No worries. I'll add something that uses it as part of this PR then. |
Ok the scope of this is expanding now... but this implements a plugins tag and associated scope so that you can now specify if an app has a specific plugin installed. I also include action implementation for the new line command if the jump-and-select plugin is installed in vscode. I haven't bothered moving all of the other plugin usage from vscode.talon to use this new Also atm the test if the plugin is installed is tested on Linux only. Will test on Mac later, but if someone on Windows can hopefully chime in about where the settings file is located I'll add that too. |
This adds two new actions for lines that allow for something like
f<key>
in vim (and other places) which will just jump to the first occurrence of that character.The only debatable bit is likely the use of
find
as the command. Open to suggestions though.