You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vim vg0, vg^ and vg$ should include the character at the end of the line in the selection #9802
changed the title [-]vim vg0 should include the current character in the selection[/-][+]vim vg0 and vg^ should include the current character in the selection[/+]on Jul 26, 2016
changed the title [-]vim vg0 and vg^ should include the current character in the selection[/-][+]vim vg0, vg^ and vg$ should include the character at the end of the line in the selection[/+]on Jul 27, 2016
Again these are Vim specific details which has to be implemented by Vim extensions. Because, Vim extension uses Block cursor type for Normal (and Visual mode). Relation between Block type cursor and Line type cursor is that
To represent current character or column, Line cursor type blinks before it where as block type cursor blinks on top of the character
For eg: ab|c <==> block cursor on top of c
All movement and selection operations are based on this fact. So, when selecting backwards it is expected to ignore the current character.
One more fact is that in Vim world, there is no special position for end of line, instead last character is represented as end. So when end or $ is pressed, Vim moves the cursor to last character. Hence by default vg0 or vg^ ignores first character if just calling cursorMove command. So Vim implementation has to handle selecting current character on top of calling this command.
Activity
[-]vim vg0 should include the current character in the selection[/-][+]vim vg0 and vg^ should include the current character in the selection[/+]rebornix commentedon Jul 27, 2016
Same case as #9803. Thanks Daniel Imms (@Tyriar)
sandy081 commentedon Jul 27, 2016
This is a different issue than #9803. All selection commands are excluding the last character.
[-]vim vg0 and vg^ should include the current character in the selection[/-][+]vim vg0, vg^ and vg$ should include the character at the end of the line in the selection[/+]sandy081 commentedon Jul 27, 2016
Again these are Vim specific details which has to be implemented by Vim extensions. Because, Vim extension uses Block cursor type for Normal (and Visual mode). Relation between Block type cursor and Line type cursor is that
For eg:
ab|c<==> block cursor on top ofcAll movement and selection operations are based on this fact. So, when selecting backwards it is expected to ignore the current character.
One more fact is that in Vim world, there is no special position for end of line, instead last character is represented as end. So when end or
$is pressed, Vim moves the cursor to last character. Hence by defaultvg0orvg^ignores first character if just calling cursorMove command. So Vim implementation has to handle selecting current character on top of calling this command.Moving this to Vim sample extension
sandy081 commentedon Jul 27, 2016
This issue was moved to microsoft/vscode-extension-samples#3