Steps to Reproduce:
await vscode.window.showInputBox({prompt: "cmd line", value: "set"})set is highlighted/selectedCurrently we can't put the cursor at the end of the default value when running showInputBox. In this case, users have to move the cursor manually if we want to keep the default value as prefix always.
That's actually indented use case since the user is likely to accept Enter or over write the pre-set value. @rebornix What is your use-case for this?
This features originally comes from implementing Vim's Ex commands, which support line range as a prefix like 1,3 represents from line #1 to #3 and '<,'> represents lines under user's selection. When users trigger Ex command by :, Vim will help fulfill the line range prefix automatically and then users can type commands directly, eg '>,'<s/a/b/g for replacement. If users don't like the line range Vim puts there automatically, they need to use backspace to delete the range characters.
Vim doesn't select those characters it auto-completes but Code does, so I'm asking if it's possible to add this support to showInputBox.
It would also help if a selection range could be defined.
In my case I would like set the whole file path as value but only select the file base name.
e.g.
/path/to/file/file-name.cpp
Users most likely will only change the file name.cpp but should also have the possibility to change the path.
Concurring to what @sleistner said. I have an open question on Stack overflow: http://stackoverflow.com/questions/38599756/unselecting-input-value-in-a-showinputbox-for-visual-studio-code
+1 to this, it is very counterintuitive to do visual block find/replaces with VSCodeVim as noted in the above mentioned issues with this default behavior. If it were configurable like #23827 makes it, that would be useful for better emulating vim-style editing for VSCodeVim users like myself!
Most helpful comment
It would also help if a selection range could be defined.
In my case I would like set the whole file path as value but only select the file base name.
e.g.
/path/to/file/
file-name.cppUsers most likely will only change the
file name.cppbut should also have the possibility to change the path.