2016-03-14 2 views
1

В Vim ключ k перемещает курсор в одну строку вверх. Если я сопоставляю ключ e с ключом k: noremap e k, то при нажатии e курсор перемещается на одну строку вверх и на одну позицию справа. Почему это происходит? Это какой-то плагин Vim вмешивается в noremap или я чего-то не хватает? Как отладить его?Отображение ключей в Vim, непредвиденное поведение

Мой файл .vimrc:

" Use spaces instead of tabs 
set expandtab 

" 1 tab == 4 spaces 
set shiftwidth=4 
set tabstop=4 

" Set vim to be noncompatible with vi. 
" There is no funky behavior with arrow keys this way. 
set nocompatible 

" Configure backspace so it acts as it should act 
set backspace=indent,eol,start 

" Solarized color scheme 
syntax enable 
colorscheme SolarizedDarkCinnamon 

" Underline the cursor line. 
set cursorline 
hi CursorLine term=bold cterm=bold 

" allow to copy from and to clipboard 
set clipboard=unnamedplus 

" Set autoindentation 
set autoindent 

" Uncomment the following to have Vim jump to the last position when              
" reopening a file 
if has("autocmd") 
    au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") 
    \| exe "normal! g'\"" | endif 
endif 

let g:ycm_autoclose_preview_window_after_completion = 1 
let g:ycm_autoclose_preview_window_after_insertion = 1 

set iminsert=0 
set imsearch=0 
+1

Я не могу воспроизвести его с помощью ванили vim – Kent

+2

http://stackoverflow.com/questions/7642746/is-there-any-way-to-view-the-currently-mapped-keys-in-vim – Dummy00001

ответ

2

Я предполагаю, что у вас есть конечные пробелы в вашем определении отображения. Убери это.

+0

А, спасибо вы! Это конечное пустое пространство. – ashim