Thursday, January 30, 2014

Re: Difference in Arrow keys: in buffer window vs in command window; and normal mode vs spell completion

Oops! Have to correct items (1, and 2) of the original post:

>>> On Thursday, January 30, 2014 9:24:25 PM UTC-6, Suresh
>>> Govindachar wrote:
>>>
>>> Windows 7, 64 bit; vim 7.4 Big version without GUI
>>> built by mool@tororo
>>>
>>> I have found that the arrow keys work differently depending on
>>> where/when they are used:
>>>
>>> 1) Conemu, cmd shell: normal mode, work as expected.
>>> 2) Conemu, cmd shell: Spelling menu gotten from "<C-X>s":
>>> arrow keys do not work

The preceding is _not_ correct -- I was misremembering my
experiments. The actual conditions under which the results of (1
and 2) were seen was:

*) start conemu by typing at Windows Run prompt:
c:\opt\conemu\conemu64.exe
*) Does not matter whether cmd shell is used or if bash shell
is used via: C:\opt\msys\1.0\bin\bash.exe --rcfile
c:\home\suresh\.bashrc
*) Start vim.exe via:

"c:\opt\vim\vim74\vim.exe"
-cur_console:h0
-u vimrc_for_test_vim_in_conemu.vim
--noplugin

contents of vimrc used above is:

set runtimepath=./vimfiles,$VIMRUNTIME
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme calmar256_dark_new
"colorscheme rastafari
set laststatus=2
set statusline=%<%f%h%m%r%=%{strftime(\"%I:%M:%S\ \%p,\ %a\ %b\
%d,\ %Y\")}\ %{&ff}\ %l,%c%V\ %P%{MySetMode()}
set modeline

function! MySetMode()
let b:my_mode = mode()
return ''
endfunction
finish

Under the above conditions, the results of (1, 2) are seen. Note
that for my usual usage of vim (with all my plugins sourced),
":verbose map <up>?" returns "no mapping found".

Note in the above the setting of term to be xterm. This is in
contrast to what Grégory Pakosz wrote around September 24, 2013,
in a post titled "Vim + colors inside ConEmu under windows. (see
https://groups.google.com/forum/#!msg/vim_use/WpJGscUUZNU/9RD8AzeYAlMJ):

| However, set term=xterm breaks arrow keys (and also keypad).

My experiment described above contradicts the preceding -- at
least for the use of arrow keys in normal mode.

Grégory Pakosz continues with the following:

| As Vim's documentation mentions, Vim under Windows doesn't
| really understand term being set to something else than
| 'win32'.

Would appreciate any elaboration on the above.

>>> 3) Conemu, bash shell: arrow keys do not work in normal mode
>>> 4) Conemu, bash shell: arrow keys work in command window for
>>> selecting from options.
>>>
>>> The following is the incantations I have in my vimrc that
>>> pertain to the terminal -- the colors are beautiful:
>>>
>>> set term=xterm
>>> set t_Co=256
>>> let &t_AB="\e[48;5;%dm"
>>> let &t_AF="\e[38;5;%dm"
>>> set vb t_vb=
>>>
>>> Any idea what's going on?
>>
>> Perhaps one of your plugins creates mappings for the arrow keys?
>> What do commands like these say?
>>
>> :verbose map <Left>
>> :verbose map! <Left>
>
> Should have mentioned in the original question that the above
> return "no mapping found".


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: