繁体   English   中英

vim:更改在 Windows 7 上保存视图的目录

[英]vim: Changing directory where views are saved on Windows 7

我最近了解了 vim 中的折叠,并且您可以使用:mkview将折叠保存在文档中。 但是,vim 试图将视图保存在C:\\Program Files (x86)\\vim\\目录路径中,这需要管理员权限才能保存到...因为这是一台企业 Win7 工作机,我需要说服 vim 它想要将视图保存在别处。

是否需要在我的_vimrc文件中包含一个命令来让 vim 将视图保存在别处? 或者另一种控制这种行为的方法?

设置viewdir
来自:help mkview

When [file] is omitted or is a number from 1 to 9, a name is generated and 'viewdir' prepended. 

:help 'viewdir'给出:

                        *'viewdir'* *'vdir'*
'viewdir' 'vdir'    string  (default for Amiga, MS-DOS, OS/2 and Win32:
                         "$VIM/vimfiles/view",
                         for Unix: "~/.vim/view",
                         for Macintosh: "$VIM:vimfiles:view"
                         for VMS: "sys$login:vimfiles/view"
                         for RiscOS: "Choices:vimfiles/view")
                    global
                    {not available when compiled without the |+mksession|
                    feature}
    Name of the directory where to store files for |:mkview|.
    This option cannot be set from a |modeline| or in the |sandbox|, for
    security reasons.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM