Vim光标跳到缓冲切换后的行的开始处

当我切换缓冲区然后回到它(基本上当我回到以前打开的任何缓冲区),光标放置在行的开始,丢失前一个位置在行。这是非常讨厌,也许有人知道如何解决这个问题?
您可以使用该设置
:se nostartofline

或短:

:se nosol

文档:

*'startofline'* *'sol'* *'nostartofline'* *'nosol'*
'startofline' 'sol' boolean (default on)`

        global
        {not in Vi}
When "on" the commands listed below move the cursor to the first
non-blank of the line.  When off the cursor is kept in the same column
(if possible).  This applies to the commands: CTRL-D,CTRL-U,CTRL-B,CTRL-F,"G","H","M","L",gg,and to the commands "d","<<" and ">>"
with a linewise operator,with "%" with a count and to buffer changing
commands (CTRL-^,:bnext,:bNext,etc.).  Also for an Ex command that
only has a line number,e.g.,":25" or ":+".
In case of buffer changing commands the cursor is placed at the column
where it was the last time the buffer was edited.
NOTE: This option is set when 'compatible' is set.

相关文章

解决方案:解决linux下vim乱码的情况:(修改vimrc的内容)全...
Linuxvi/vim所有的UnixLike系统都会内建vi文书编辑器,其他的...
      vim正则匹配:空行:/^$/  /^[\t]*$/注释...
$select-editorSelectaneditor.Tochangelater,run'sele...
上次手贱忘了保存,这次就简单做个备忘吧,把踩过的坑记一下...
Linux之文本编译器小结vim的优势所有的UNIX-LIKE习通都会内置...