How to restore the cursor s "logical" and "physical" positions when I open a file ?
:
cur应当放在档案中最后的逻辑上。
cur应当按照正门窗在最后一刻的物理线上。
http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session”rel=“nofollow noreferer”>。 它确实将 cur放在正确的逻辑上。 但是,窗户的曲线位置是第一线或中线。
UPDATE:
The solution is mkview
and loadview
as noted by @sehe.
To make it work with other plugins (in my case, latex file + latex-box), the following would be useful:
www.un.org/Depts/DGACM/index_spanish.htm 页: 1
au VimEnter *.tex loadview
缩略语
- After doing all the startup stuff, including loading
.vimrc
files, executing the "-c cmd" arguments, creating all windows and loading the buffers in them.
www.un.org/Depts/DGACM/index_spanish.htm 2. 更好地或想象“概览-快递”
通过创建“圆形码”-~/.vim/view,你将在那里保存所有“概览-snapshot-files”。
If you are using git
to synchronize ~/.vim
across computers, maybe you d like to
- ignore the files in
~/.vim/view
, - but keep the empty folder in your repo.
然后,您需要(根据回答here)
- create a empty file:
~/.vim/view/.gitignore
- put
view/*
, and!.gitignore
in~/.vim/.gitignore