moving to left or right word
Ubuntu 20.04.3
8.1-2269
No response
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
What's TERM?
Try this:
" Enable modified arrow keys, see :help xterm-modifier-keys
execute "silent! set <xUp>=\<Esc>[@;*A"
execute "silent! set <xDown>=\<Esc>[@;*B"
execute "silent! set <xRight>=\<Esc>[@;*C"
execute "silent! set <xLeft>=\<Esc>[@;*D"
See :help xterm-modifier-keys.
What's
TERM?
❯ echo $TERM
alacritty
FYI this below works but feels like a workaround
map <ESC>[1;5A <C-Up>
map <ESC>[1;5B <C-Down>
map <ESC>[1;5C <C-Right>
map <ESC>[1;5D <C-Left>
imap <ESC>[1;5A <C-Up>
imap <ESC>[1;5B <C-Down>
imap <ESC>[1;5C <C-Right>
imap <ESC>[1;5D <C-Left>
Try this:
" Enable modified arrow keys, see :help xterm-modifier-keys execute "silent! set <xUp>=\<Esc>[@;*A" execute "silent! set <xDown>=\<Esc>[@;*B" execute "silent! set <xRight>=\<Esc>[@;*C" execute "silent! set <xLeft>=\<Esc>[@;*D"
this doesn't fix it
this doesn't fix it
Try to set 'ttymouse' to sgr, and try to reproduce with no config (and on master).
This works for me:
$ TERM=alacritty vim -Nu NONE +'execute "silent! set <xUp>=\<Esc>[@;*A"' +'nnoremap <C-Up> :echomsg "C-Up"<CR>' +'set ttymouse=sgr'
Pressing <C-Up> causes Vim to print C-Up on the command-line.
I moved my .vimrc and .vim folder, git clone vim repo, compiled it so i'm on default configuration. I ran
❯ cat test
ewihfgoiweh fbhguasihfui fugwqefghuo fuqgwhefgh9o
❯ TERM=alacritty ./vim -Nu NONE +'execute "silent! set <xUp>=\<Esc>[@;*A"' +'nnoremap <C-Up> :echomsg "C-Up"<CR>' +'set ttymouse=sgr' test
And control C-Left or C-Right doesn't move to the next/previous word but it doesn't delete lines like it was doing before
And control C-Left or C-Right doesn't move to the next/previous word
My command was only meant to test <C-Up>. It did not set <xLeft> nor <xRight>, which are necessary for <C-Left> or <C-Right> to work.
A recent patch (8.2.3727) has fixed an issue which should help you. Could you make another test on master? And use this snippet:
" Enable modified arrow keys, see :help xterm-modifier-keys
execute "set <xUp>=\<Esc>[@;*A"
execute "set <xDown>=\<Esc>[@;*B"
execute "set <xRight>=\<Esc>[@;*C"
execute "set <xLeft>=\<Esc>[@;*D"
Yes, it's the same one that I posted earlier. At the time I posted it, it didn't work for you because of an issue which was fixed in 8.2.3727. Now, it should work. If it doesn't work, post the output of :set! termcap.
And control C-Left or C-Right doesn't move to the next/previous word
My command was only meant to test
<C-Up>. It did not set<xLeft>nor<xRight>, which are necessary for<C-Left>or<C-Right>to work.
Sorry, I didn't pay attention to the command 🤦
A recent patch (8.2.3727) has fixed an issue which should help you. Could you make another test on master? And use this snippet:
" Enable modified arrow keys, see :help xterm-modifier-keys execute "set <xUp>=\<Esc>[@;*A" execute "set <xDown>=\<Esc>[@;*B" execute "set <xRight>=\<Esc>[@;*C" execute "set <xLeft>=\<Esc>[@;*D"
I compiled, and i'm running VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 3 2021 19:45:48) Included patches: 1-3729 without .vimrc except the snippet above, and not .vim (no plugins). Ran ./vim test and it fixed the issue! thank you a lot for your time. Now I have to wait Ubuntu pushing 8.2 x)
AFAICT we can close this issue.
Closed #9254.
Now I have to wait Ubuntu pushing 8.2 x)
No you don't have to wait for 8.2. You can fix your issue right now, by setting 'ttymouse' to sgr, and by setting <xUp> & friends:
set ttymouse=sgr
execute "set <xUp>=\<Esc>[@;*A"
execute "set <xDown>=\<Esc>[@;*B"
execute "set <xRight>=\<Esc>[@;*C"
execute "set <xLeft>=\<Esc>[@;*D"
by setting 'ttymouse' to sgr
If that doesn't work, clear <DecMouse> manually:
set <DecMouse>=
execute "set <xUp>=\<Esc>[@;*A"
execute "set <xDown>=\<Esc>[@;*B"
execute "set <xRight>=\<Esc>[@;*C"
execute "set <xLeft>=\<Esc>[@;*D"
If that still doesn't work, again, post the output of :set! termcap.