Use of <End> key on a line in insert mode and subsequent left arrow key misfires
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
Using End in insert mode on a line, and then using the left arrow key in the hope of moving back one character does not work. It seems to apply the left to the cursor location before the jump to End using the End key.
To Reproduce
Steps to reproduce the behavior:
Have any document with a long line of text. From the middle of the line, press end. As expected this takes you to the end of that line. Now, pressing left arrow key does not take you to one character left on the line from the end position. Rather it takes you back one character to the left of your original cursor position you were in before executing the End to reach the end of line.
Please see screencast below.
Expected behavior
From the end, pressing left, or right should use that position as the relative position from which to apply left or right.
Screenshots
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.26.0
- VSCode version: 1.74.3
- OS: Linux Ubuntu 2020 LTS
Additional context
The extension related settings in settings.json are:
"vim.handleKeys": {
"<C-a>": false,//vscode, this selects all.
"<C-b>": false,//vscode, this toggles sidebar
"<C-c>": false,//dont want to escape into normal command mode, rather have copy available
"<C-f>": false,//retain ability to search in a file
"<C-h>": false, //vscode find and replace
"<C-j>": false,//toggle bottom panel
"<C-k>": false,//retain ability to close all windows using CtrlKCtrlW
"<C-n>": false, //mapping CtrlN to navigate to next problem
"<C-p>": false, //mapping Ctrlp to open file
"<C-v>": false,//retain ability to paste usually
"<C-w>": false,//vscode closes current open window
"<C-x>": false,//retain ability to cut usually
"<C-pageup>": false,//move to previous editor
"<C-pagedown>": false//move to next editor
},
"vim.cursorStylePerMode.normal": "block",
"vim.hlsearch": true,
"vim.useSystemClipboard": true,
"vim.foldfix": true,
"vim.enableNeovim": true,
"vim.vimrc.enable": true,
"vim.neovimPath": "/usr/bin/nvim",
"vim.vimrc.path": "/home/TryerGit/VSIDE Stuff/.vimrc",
The contents of my .vimrc of vim.vimrc.path in settings.json is:
set hlsearch
set ignorecase
set smartcase " if searched with upper case, preserves. Else, ignores case
set incsearch " incremental search
set number relativenumber
set viminfo=
nnoremap <Up> {
nnoremap <Down> }
nnoremap <Left> 0
nnoremap <Right> $
nnoremap <S-F1> :nohlsearch<CR>
inoremap <S-F1> <C-o>:nohlsearch<CR>
nnoremap j gj
nnoremap k gk
inoremap jk <ESC>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the End-then-left and End-then-right sequences in VS Code using the reported insert-mode setup, including the listed key mappings and Neovim settings. Trace the extension's handling of End and arrow keys; done means subsequent left or right movement starts from the line end rather than the cursor position before End.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100