【问题标题】:How to move cursor back one character stuck at SOL instead of jump to previous EOL?如何将光标移回一个卡在 SOL 上的字符而不是跳转到上一个 EOL?
【发布时间】:2013-02-14 09:51:12
【问题描述】:

我 gvim,当我使用光标移动键返回一个字符时,它不会回绕到上一行,而是卡在当前行的开头。 有什么标志可以控制吗?

【问题讨论】:

    标签: cursor back eol


    【解决方案1】:

    是的,有。详情见:help 'whichwrap':

    'whichwrap' 'ww'    string  (Vim default: "b,s", Vi default: "")
                global
                {not in Vi}
        Allow specified keys that move the cursor left/right to move to the
        previous/next line when the cursor is on the first/last character in
        the line.  Concatenate characters to allow this for these keys:
            char   key    mode  ~
             b    <BS>   Normal and Visual
             s    <Space>    Normal and Visual
             h    "h"    Normal and Visual (not recommended)
             l    "l"    Normal and Visual (not recommended)
             <    <Left>     Normal and Visual
             >    <Right>    Normal and Visual
             ~    "~"    Normal
             [    <Left>     Insert and Replace
             ]    <Right>    Insert and Replace
        For example: >
            :set ww=<,>,[,]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-11
      • 2016-08-02
      • 2013-11-28
      • 1970-01-01
      • 2015-07-20
      • 1970-01-01
      • 1970-01-01
      • 2021-05-20
      相关资源
      最近更新 更多