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

Expand selection with inner tag selection command #2907

Closed
eddiemf opened this issue Jul 28, 2018 · 2 comments · Fixed by #2921
Closed

Expand selection with inner tag selection command #2907

eddiemf opened this issue Jul 28, 2018 · 2 comments · Fixed by #2921

Comments

@eddiemf
Copy link

eddiemf commented Jul 28, 2018

Hello everyone!

I come from Sublime Vintage mode context, and I was very used to type vit to select the inner content of a tag, which works in VSCode Vim, but when I typed it again and again in sublime it would keep expanding the selection up, which doesn't happen in VSCode Vim.

Is there anyway to achieve this behavior?

Thanks in advance!

@xconverge
Copy link
Member

af should achieve what you want, you can remap it to af in visual mode if you want as well

https://github.com/VSCodeVim/Vim#-vscodevim-tricks

@eddiemf
Copy link
Author

eddiemf commented Jul 28, 2018

Hello, @xconverge!

Actually it didn't really work, sometimes it goes crazy and selects a huge chunk of tags (maybe when there's php together), and with only HTML it simply does nothing. I've tested with the following snippet:

<div>
  <ul>
    <li>
      <p>Lorem ipsum, dolor sit amet orrupti debitis error!</p>
    </li>
  </ul>
</div> 

Hitting vit selects all the content inside the tag the cursor is in. Hitting vaf or vit + af does nothing at all :(

Also thanks for the link, didn't know about that one, will be very useful as I'm not the most vim power user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants