我应该在我的.vimrc文件中写什么来测试我是运行vim还是gvim.
因为 颜色架构colorscheme我非常喜欢在vim中很漂亮,但在gvim中很难看.所以我想要的是,当我在vim时,我使用上述内容颜色架构 colorscheme,当我在gvim时,使用另一个 颜色架构 色彩方案.
是否有任何vimscript代码可以实现此功能?
j13*_*13r 17
这两页有很多关于配色方案的信息以及如何切换它们:http : //vim.wikia.com/wiki/Switch_color_schemes http://www.indelible.org/ink/vim-colorschemes/
它还具有您遇到的问题:
if has('gui_running')
" GUI colors
colorscheme foo
else
" Non-GUI (terminal) colors
colorscheme bar
endif
Run Code Online (Sandbox Code Playgroud)