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

前端之家收集整理的这篇文章主要介绍了Vim光标跳到缓冲切换后的行的开始处前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我切换缓冲区然后回到它(基本上当我回到以前打开的任何缓冲区),光标放置在行的开始,丢失前一个位置在行。这是非常讨厌,也许有人知道如何解决这个问题?
您可以使用该设置
  1. :se nostartofline

或短:

  1. :se nosol

文档:

  1. *'startofline'* *'sol'* *'nostartofline'* *'nosol'*
  2. 'startofline' 'sol' boolean (default on)`
  3.  
  4. global
  5. {not in Vi}
  6. When "on" the commands listed below move the cursor to the first
  7. non-blank of the line. When off the cursor is kept in the same column
  8. (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 ">>"
  9. with a linewise operator,with "%" with a count and to buffer changing
  10. commands (CTRL-^,:bnext,:bNext,etc.). Also for an Ex command that
  11. only has a line number,e.g.,":25" or ":+".
  12. In case of buffer changing commands the cursor is placed at the column
  13. where it was the last time the buffer was edited.
  14. NOTE: This option is set when 'compatible' is set.

猜你在找的Bash相关文章