【问题标题】:vim-pressing arrow keys give 'after'vim 按下箭头键给出 'after'
【发布时间】:2011-10-19 16:48:59
【问题描述】:

我的 vim 是 7.0,无法更新到 7.3,我没有权限。

如何产生问题:
- 在 Vim 中,在任何模式下,如果我一直按任何箭头键(箭头键或 hjkl)它总是给出这个词“之后”。例如:
abcd efgh 给出abcd efghafter
非常愚蠢。
我试着把set nocompatible

 map ^[[A <up>  
 map ^[[B <down>  
 map ^[[C <right>  
 map ^[[D <left>`

在 vimrc 中,不起作用...

你能帮忙吗?

编辑:

:map 给出了这个:

v  <C-C>       * :call RangeCommentLine()<CR>  
no <C-C>       * :call CommentLine()<CR>  
n  <CR>        * :noh<CR><CR>  
n  <C-N>       * :<C-U>YRReplace '1', 'p'<CR>  
n  <C-P>       * :<C-U>YRReplace '-1', 'P'<CR>  
v  <C-X>       * :call RangeUnCommentLine()<CR>  
no <C-X>       * :call UnCommentLine()<CR>  
v  #           * :call VisualSearch('b')<CR>  
v  *           * :call VisualSearch('f')<CR>  
n  .           * :<C-U>YRYankCount '.'<CR>  
n  @             YRMapsExpression("<SNR>16_", "@", "1")  
n  D             D<SNR>16_yrrecord  
x  P           * :<C-U>YRPaste 'P', 'v'<CR>  
n  P           * :<C-U>YRPaste 'P'<CR>  
n  Y             Y<SNR>16_yrrecord  
x  d           * :YRDeleteRange 'v'<CR>  
n  dgg           dgg<SNR>16_yrrecord  
n  dG            dG<SNR>16_yrrecord  
n  d$            d$<SNR>16_yrrecord  
n  daw           daw<SNR>16_yrrecord  
n  diw           diw<SNR>16_yrrecord  
n  dE            dE<SNR>16_yrrecord  
n  de            de<SNR>16_yrrecord  
n  dw            dw<SNR>16_yrrecord  
n  dd            dd<SNR>16_yrrecord  
n  gx            <Plug>NetrwBrowseX  
n  gp          * :<C-U>YRPaste 'gp'<CR>  
n  gP          * :<C-U>YRPaste 'gP'<CR>  
v  jj            <Esc><Space>  
x  p           * :<C-U>YRPaste 'p', 'v'<CR>  
n  p           * :<C-U>YRPaste 'p'<CR>  
x  x           * :YRDeleteRange 'v'<CR>  
n  x             x<SNR>16_yrrecord  
x  y           * :YRYankRange 'v'<CR>  
n  ygg           ygg<SNR>16_yrrecord  
n  yG            yG<SNR>16_yrrecord  
n  y$            y$<SNR>16_yrrecord  
n  yaw           yaw<SNR>16_yrrecord  
n  yiw           yiw<SNR>16_yrrecord  
n  yE            yE<SNR>16_yrrecord  
n  ye            ye<SNR>16_yrrecord  
n  yw            yw<SNR>16_yrrecord  
n  yy            yy<SNR>16_yrrecord  
n  y           * "+y<Space>  
n  <Plug>NetrwBrowseX * :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<CR>  
n  <SNR>16_yrrecord * :call YRRecord3()<CR>  
n  <F11>       * :YRShow<CR>

:imap 给出

i  <S-Tab>     *@<C-R>=<SNR>13_SetVals()<CR><C-R>=<SNR>13_TabComplete('up')<CR><C-R>=<SNR>13_RestoreVals()<CR>
i  <Tab>       *@<C-R>=<SNR>13_SetVals()<CR><C-R>=<SNR>13_TabComplete('down')<CR><C-R>=<SNR>13_RestoreVals()<CR>
i  <SNR>16_yrrecord * <C-R>=YRRecord3()<CR>
i  <SNR>16_YRGetChar & <C-R>=YRGetChar()<CR>
i  jj            <Esc>

【问题讨论】:

  • 这是非常奇怪的行为。在 Vim 中,执行 :map 并查看它是否揭示了您忘记的任何奇怪的自定义键绑定。
  • 删除/重命名 .vimrc 看看它是否仍然存在。
  • @CodyHess 我刚刚在问题中粘贴了映射,请参阅编辑。
  • @draevor 我试过了,但还是不行……
  • @CodyHess 所以,为了更好地理解这个问题:假设您处于正常模式并且您按一次h - 您有问题吗?如果你反复按下它会怎样?还是您需要按各种键才能插入单词?即使您处于正常模式,单词也会被插入吗?

标签: linux vim


【解决方案1】:

唯一的解决办法是更新到vim 7.3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-17
    • 1970-01-01
    相关资源
    最近更新 更多