changeset 494:76defcf6bf02

Add gvimrc file.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 12 Nov 2021 10:50:18 -0800
parents 16cac382ca7c
children 232351531855
files install.py vim/gvimrc
diffstat 2 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/install.py	Fri Nov 12 10:49:22 2021 -0800
+++ b/install.py	Fri Nov 12 10:50:18 2021 -0800
@@ -191,6 +191,16 @@
         'source %s' % nixslash(_p('vim', 'vimrc'))
     ])
 
+    # Create a gvimrc file mostly to fix a bug with Scoop, which
+    # installs a _gvimrc in the base runtime path, and it can mess
+    # up colors and settings.
+    gvimrc_path = '~/.gvimrc'
+    if is_windows:
+        gvimrc_path = '~/_gvimrc'
+    writelines(gvimrc_path, [
+        'source %s' % nixslash(_p('vim', 'gvimrc'))
+    ])
+
     _install_vim_bundle(cfg, 'vimbundles', _p('vim', 'bundle'), force)
     _install_vim_bundle(cfg, 'vimbundles:local', _p('vim', 'local'), force)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vim/gvimrc	Fri Nov 12 10:50:18 2021 -0800
@@ -0,0 +1,15 @@
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+"
+" Ludovic Chabant's ~/.gvimrc
+"
+" http://ludovic.chabant.com
+"
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Set a variable that says we already sourced this file, for those few
+" settings we don't want to re-apply.
+if exists('g:sourced_gvimrc')
+    let g:resourcing_gvimrc = 1
+endif
+let g:sourced_gvimrc = 1
+