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

Copy the current line tag and its children with the command yat #4685

Closed
calebeaires opened this issue Mar 26, 2020 · 1 comment · Fixed by #4721
Closed

Copy the current line tag and its children with the command yat #4685

calebeaires opened this issue Mar 26, 2020 · 1 comment · Fixed by #4721
Labels

Comments

@calebeaires
Copy link

Is your feature request related to a problem? Please describe.
I'm always frustrated when I want yank the entire html tag typing yat but instead copy the tag that starts on the current line and its children tags, it copy the entire parent html tag.

Describe the solution you'd like
type yat and copy the tag within the current line

<div class="dont-copy-parent">

<!--  yat --> | <div class="want-copy-this">
                  <div>Content</div>
             </div>

</div>

Vim and neoVIM do this job

@J-Fields J-Fields changed the title Copy the current line tag and it`s childrem with the command yat Copy the current line tag and its children with the command yat Mar 26, 2020
@gergelyth
Copy link
Contributor

I think this is solved by considering the tag starting on the current line, when the cursor is in a position you described. Check out #4721

J-Fields pushed a commit that referenced this issue May 13, 2020
When executing yat or dat on a line where a new tag is opened (and there are only whitespaces between the beginning of the line and the opening < of the tag and the cursor is either on one of these whitespaces or on the opening <), the current version of the extension copies or deletes the outer tag, whereas Vim operates on the inner. This PR corrects the extension's behaviour.

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

Successfully merging a pull request may close this issue.

3 participants