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

Please, add support of " " and ' ' text objects to vi-mode plugin #5708

Closed
srghma opened this issue Dec 12, 2016 · 9 comments
Closed

Please, add support of " " and ' ' text objects to vi-mode plugin #5708

srghma opened this issue Dec 12, 2016 · 9 comments
Labels
Area: plugin Issue or PR related to a plugin Topic: bindkey Pull Request or issue regarding keyboard shortcuts

Comments

@srghma
Copy link

srghma commented Dec 12, 2016

And many others text objects as I assume
I cant do ci"

zsh 5.2 (x86_64-unknown-linux-gnu)
oh-my-zsh-git r4257.26aae6b-1

@srghma
Copy link
Author

srghma commented Dec 12, 2016

And how to make set clipboard=unnamedplus for vi-mode? 😄

@okapia
Copy link

okapia commented Jan 7, 2017

Note that the commands for enabling that text object are at the top of Functions/Zle/select-quoted. You can use them in .zshrc regardless of what the vi-mode plugin does:

     autoload -U select-quoted
     zle -N select-quoted
     for m in visual viopp; do
       for c in {a,i}{\',\",\`}; do
         bindkey -M $m $c select-quoted
       done
     done

It'll also work for other characters if bound appropriately, e.g. i: i+ a. a, etc
You might also want to look at Functions/Zle/select-quoted and select-word-match (new in zsh 5.3).

@srghma
Copy link
Author

srghma commented Jan 7, 2017

@okapia, That must be added in vi-mode

@okapia
Copy link

okapia commented Jan 7, 2017

@BjornMelgaard: yes, it ought to be added but I'm not an oh-my-zsh contributor so can't do that for you. I'm just trying to be helpful by pointing out what would need to be added and that you can use it directly from your .zshrc as a (hopefully) short-term solution.

@srghma
Copy link
Author

srghma commented Jan 7, 2017

@okapia , and I'm already using it, great thanks, I just had noted the obvious

@srghma srghma closed this as completed Jan 7, 2017
@srghma srghma reopened this Jan 7, 2017
@yangmillstheory
Copy link

yangmillstheory commented Nov 1, 2017

I found a snippet that I'm including in my own patched vi-mode.plugin.zsh here (need to translate the page). Looks like #5708 (comment) will only work for quotes, not brackets.

@srghma
Copy link
Author

srghma commented Nov 1, 2017

Thanks @yangmillstheory

@softmoth
Copy link

By the way, this is supported in the vim-mode plugin add-on.

@mcornella mcornella added Area: plugin Issue or PR related to a plugin Topic: bindkey Pull Request or issue regarding keyboard shortcuts labels Mar 12, 2020
@robbyrussell
Copy link
Member

⌛️ Going to close this as it appears the vim-mode plugin satisfies this need. If I'm mistaken, please let us know and/or contribute a proposed PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Topic: bindkey Pull Request or issue regarding keyboard shortcuts
Projects
None yet
Development

No branches or pull requests

6 participants