在用户自己的目录下的.vimrc中添加,

 1 "remember last update or view postion"
 2  " Only do this part when compiled with support for autocommands 
 3  if has("autocmd")
 4  " In text files, always limit the width of text to 78 characters 
 5  autocmd BufRead *.txt set tw=78
 6  " When editing a file, always jump to the last cursor position 
 7  autocmd BufReadPost *
 8  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
 9  \ exe "normal g'\"" |
10  \ endif 
11  endif

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
  • 2021-09-06
  • 2021-11-18
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2021-07-02
  • 2021-11-23
  • 2021-08-27
  • 2021-07-23
  • 2022-01-12
  • 2021-07-22
相关资源
相似解决方案