Vim: Range mode for visual selection is highlighted in vim command line

Created on 21 Sep 2016  路  10Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


What did you do?

press V to visually select a line
press : to vim command line which is now in the range mode for the selected text '<,'>
write s/foo/bar/g

What did you expect to happen?

the command line to look like
'<,'>s/foo/bar/g

What happened instead?

s/foo/bar/g

This is because the '<,'> is highlighted so it gets overwritten as soon as you type something.
This can be avoided by manually un-highlighting it, but it shouldn't be needed.

Technical details:

  • VSCode Version: 1.5.2
  • VsCodeVim Version: 0.2.0
  • OS: Windows
kinenhancement upstreavscode

Most helpful comment

just cross your fingers for this https://github.com/Microsoft/vscode/pull/23827

All 10 comments

I agree, but it may actually not be possible to do this with what VSCode provides us. I'm not quite sure, however. @rebornix what do you think?

If VSCode forces a selection of the command pallet when you open it I could add an issue/request at their repository and try to get an option for it not to be selected.

Currently it's not possible due to Code's API limitation but I've already filed an issue there https://github.com/Microsoft/vscode/issues/10582 .

Instead of putting '<,'> in the command line box, couldn't the plugin just prepend this to whatever command a user types (like s/foo/bar/g) behind the scenes before executing? i.e. "if any text selected, assume range and prepend '<,'> to any subseqeuent command"

@Youdaman I think that would confound a lot of _other_ people, who expect the range to be there and would get confused why it wasn't/why their search was suddenly only operating on a range.

@johnfn could always make it a configuration option.

just cross your fingers for this https://github.com/Microsoft/vscode/pull/23827

Microsoft/vscode#23827 is merged, so this can now be fixed 馃憦 馃暫

I've got the latest versions of this plugin (0.7.1) and VSCode (1.12.1) but the text in the command line is still highlighted -- is there anything I need to change in the settings?

@youdaman it's fixed on master, but we haven't rolled out a release yet.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edwintorok picture edwintorok  路  3Comments

stefanoio picture stefanoio  路  3Comments

cckowin picture cckowin  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

waltiam picture waltiam  路  3Comments