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

Alternate motions involving brackets. #1416

Closed
paulgittings opened this issue Aug 12, 2014 · 5 comments
Closed

Alternate motions involving brackets. #1416

paulgittings opened this issue Aug 12, 2014 · 5 comments

Comments

@paulgittings
Copy link

Can the alternative motions "i]", "i}", "i)", i">" be implemented to select everything in between the specified bracket types. so that "yi>" would yank everything within the "<" and ">".

Also the "a" versions "a]", "a}" which are similar to the above but include the brackets in the selection.

@Kazark
Copy link
Contributor

Kazark commented Aug 12, 2014

I love how just watching this repository is a great way to learn things about Vim.

@jaredpar jaredpar added this to the 1.8.0 milestone Aug 12, 2014
@jaredpar
Copy link
Collaborator

I'll take a look at getting those implemented.

@Kazark yeah. Before I started writing VsVim I thought I was an average level vim users. Now I know that I maybe knew 5% of what vim was capable of. It's crazy.

@paulgittings
Copy link
Author

Thanks Jared.

Just in case you missed it while I just happen to use the closing brackets, the sequences also work if the opening brackets are used eg "yi(" I don't think there is any difference between using open and closing brackets but haven't paid enough attention to be sure.

Also beware that it's not just simply a match to the previous and next bracket, it takes into consideration nesting. For example consider "{ some text { some inner text) cursor is here }"
If "yi}" is pressed when the cursor is on a piece of text in "cursor is here", then the yank will pull " some text { some inner text) cursor is here " and not " some inner text) cursor is here "

@paulgittings
Copy link
Author

Jared,
just sat down with a guy at work to show him this "issue" and on his set up the motion works. Must be something wrong with my setup. I'll investigate more.

BTW, the feature list on the wiki doesn't mention these motions (or at least I couldn't find them), which is why I assumed the issue was with VsVim.

Sorry for the confusion.

I'd close this issue off until I figure out if there is a real issue.

@jaredpar
Copy link
Collaborator

@TaffyDownUnder the documentation for them in the supported feature section is at the very bottom.

Text object selections (aw, (, {,) ...

Easy to miss and I'm also not the best at keeping that list up to date :(

Have you taken a look at your _vimrc? It's possible there is a key mapping in there which is changing the behavior of the motions in a way that isn't supported by VsVim.

@jaredpar jaredpar modified the milestones: 1.8.0, 1.8.1 Jan 2, 2015
@jaredpar jaredpar modified the milestones: 1.8.1, 2.1.0 Jul 20, 2015
@jaredpar jaredpar closed this as completed Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants