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

Referencing Mark in VIM SED command fails to apply command correctly #631

Closed
disaac opened this issue Aug 19, 2016 · 3 comments
Closed

Referencing Mark in VIM SED command fails to apply command correctly #631

disaac opened this issue Aug 19, 2016 · 3 comments

Comments

@disaac
Copy link

disaac commented Aug 19, 2016


Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.


What did you do?

Created a mark in a file then referenced the mark inside of a VIM SED command.

Exact Keys Entered:

# in VIM normal mode created a mark a
ma
# Navigated below the mark several lines down 
jjjj
# attempted to reference the mark in a VIM SED replacement
# was trying to replace the beginning of each line with a comment
:
'a,.s/^/#/g

What did you expect to happen?

I expected the VIM sed command to utilize the mark 'a' as a starting point for the replacement.

What happened instead?

No changes were made to the text between the mark 'a' and the line the command was entered at.

NOTE When using VIM the above command results in the expected behavior. The issue is only seen in Visual Code Studio with the VsCodeVim plugin.

NOTE I verified that the VsCodeVim SED command works fine with Global replacements and the Mark functionality works as expected for navigation. The issue seems isolated to referencing the mark inside of a sed command only.

Technical details:

  • VSCode Version: 1.4.0 (1.4.0)
  • VsCodeVim Version: 0.1.7
  • OS: OSX 10.11.6 (15G31)
@johnfn
Copy link
Member

johnfn commented Aug 20, 2016

Interesting - this is a feature I didn't even know existed. Thanks for the report, @disaac!

@rebornix
Copy link
Member

Well while implementing #525, I've already added the basic mark support '< and '>, so the logic of supporting user-created marks should be similar but requires more consideration.

Anyone who wants to contribute a full-complete story instead of bug fixing can take this one.

@rebornix
Copy link
Member

This one is already fixed I suppose :)

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