... 다시 작동합니다
20.4. I am not able to create a mapping for the <xxx> key. What is wrong?
1) First make sure, the key is passed correctly to Vim. To determine if
this is the case, put Vim in Insert mode and then hit Ctrl-V (or
Ctrl-Q if your Ctrl-V is remapped to the paste operation (e.g. on
Windows if you are using the mswin.vim script file) followed by your
key.
If nothing appears in the buffer (and assuming that you have
'showcmd' on, ^V remains displayed near the bottom right of the Vim
screen), then Vim doesn't get your key correctly and there is nothing
to be done, other than selecting a different key for your mapping or
using GVim, which should recognise the key correctly.
당신이 눌러있는 home
키가 동일한 경우 확인할 수 있습니다이 방법을 빔 <Home>
으로 이해하십시오.
또 다른 가능성은 다른 매핑이이 것을 방해하고 있다는 것입니다. 다음을 시도해 볼 수도 있습니다 :
는
noremap <Home> 0w
inoremap <Home> <ESC>0wi
편집 :
이 문제는 터미널이 빔이 <Home>
로 인식되지 않았다는 home
키 코드를 전송하고 있음을 보인다.
나는 최선의 해결책은 Vim이 그 키를 올바르게 인식 할 수 있도록하기 위해서 당신의 .vimrc
을 변경없이 다른 터미널/시스템으로 옮길 수 있다고 믿는다. :h xterm-end-home-keys
에서
: 문제가 해결되지 않으면
On some systems (at least on FreeBSD with XFree86 3.1.2) the codes that the
<End> and <Home> keys send contain a <Nul> character. To make these keys send
the proper key code, add these lines to your ~/.Xdefaults file:
*VT100.Translations: #override \n\
<Key>Home: string("0x1b") string("[7~") \n\
<Key>End: string("0x1b") string("[8~")
, 당신은 :set t_kh=^V^[[1~
을 시도 할 수 있습니다. 작동하는 경우 터미널 유형의 체크에 동봉 할 수 있습니다. 추가 정보는 :h terminal options
편집 2에서 찾을 수 있습니다
20.4. I am not able to create a mapping for the <xxx> key. What is wrong?
:
:
3) If the key is seen, but not as itself and not as some recognizable
key, then there is probably an error in the terminal library for the
current terminal (termcap or terminfo database). In that case >
:set term?
will tell you which termcap or terminfo Vim is using. You can try to
tell vim, what termcode to use in that terminal, by adding the
following to your vimrc: >
if &term == <termname>
set <C-Right>=<keycode>
endif
where <termname> above should be replaced by the value of 'term'
(with quotes around it) and <keycode> by what you get when hitting
Ctrl-V followed by Ctrl-Right in Insert mode (with nothing around
it). <C-Right> should be left as-is (9 characters). Don't forget that
in a :set command, white space is not allowed between the equal sign
and the value, and any space, double quote, vertical bar or backslash
present as part of the value must be backslash-escaped.
Now you should be able to see the keycode corresponding to the key
and you can create a mapping for the key using the following command: >
:map <C-Right> <your_command_to_be_mapped>
For more information, read
:h map-keys-fails
:h map-special-keys
:h key-codes
당신이 어떤 매핑을 추가하지 않을 경우, 홈 키는 아무것도하지 않습니다 ... 나를 위해 작동? – mihai
매핑을 시도했지만 여기에서 작동합니다. btw, 당신의'0w'은'^'일 수 있습니다. – Kent
@mihai 예 ... 0w가 아닌 Home 키를 사용하여 보조 정보로 – Ozkan