简体   繁体   English

.vimrc和.gvimrc之间的差异

[英]diffrence between .vimrc and .gvimrc

I have vim and gvim on my ubuntu. 我的Ubuntu上有vim和gvim。 I know the vim configuration file ~/.vimrc and the gvim configuration file ~/.gvimrc . 我知道vim配置文件〜/ .vimrc和gvim配置文件〜/ .gvimrc Sometimes I write into these files to change the configuration of vim/gvim. 有时我写这些文件来更改vim / gvim的配置。 But, 但,
1. How do these two files work exactly ? 1.这两个文件如何正确工作?
2. Why when I modify the file ~/.vimrc but it works also for gvim ? 2.为什么当我修改文件〜/ .vimrc但它也适用于gvim时,为什么? So what is the point of have two configuration files? 那么拥有两个配置文件有什么意义呢? Just one file --> ~/.vimrc can already do the job, can't it? 只有一个文件-> 〜/ .vimrc已经可以完成这项工作,不是吗?

See :help gvimrc : 参见:help gvimrc

The gvimrc file is where GUI-specific startup commands should be placed. gvimrc文件是应放置GUI特定的启动命令的位置。 It is always sourced after the vimrc file. 它始终在vimrc文件之后提供。

You can use the gvimrc files to set up your own customized menus (see :menu ) and initialize other things that you may want to set up differently from the terminal version. 您可以使用gvimrc文件来设置自己的自定义菜单(请参阅:menu ),并初始化可能要与终端版本不同的其他设置。

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

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