diff options
authorTom Ryder <tom@sanctum.geek.nz>2018-06-21 14:07:02 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-21 14:07:02 +1200
commit127c4aa5fe0018ce473624d52256fd3a9b59a0d4 (patch)
parentAdd \c and \C bindings for cursor lines (diff)
Review GUI Vim options in .gvimrc
2 files changed, 18 insertions, 16 deletions
diff --git a/vim/gvimrc b/vim/gvimrc
index 128a396a..edf4f9cd 100644
--- a/vim/gvimrc
+++ b/vim/gvimrc
@@ -1,21 +1,17 @@
-" My choice of font changes depending on which operating system I'm using;
-" these are both workable monospace fonts, but Ubuntu Mono doesn't render very
-" nicely on Windows a lot of the time
+" Ubuntu Mono on Unix, Consolas on Windows
if has('unix')
- silent! let &guifont = 'Ubuntu Mono 12'
- silent! let &guifont = 'Consolas:h11'
+ set guifont=Ubuntu\ Mono\ 12
+elseif has('win32') || has('win64')
+ set guifont=Consolas:h11,Courier\ New:h11
-" Reset guioptions
+" Reset GUI options
set guioptions=
-" Use the system GUI clipboard
-set guioptions+=a
-" Use console dialogs instead of popup windows
-set guioptions+=c
-" Use the gVim icon
-set guioptions+=i
+set guioptions+=a " Use the system GUI clipboard
+set guioptions+=c " Use console dialogs, not popup windows
+set guioptions+=M " Don't load menu.vim (also set in .vimrc)
-" When the GUI starts, t_vb is reset to its default value, so it's necessary
-" to repeat this line from my .vimrc file that turns off visual bells
-set visualbell t_vb=
+" Stamp 'visualbell' back down again, if 'belloff' not available
+if !exists('+belloff')
+ set visualbell t_vb=
diff --git a/vim/vimrc b/vim/vimrc
index f12ac69e..b1176b65 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -143,6 +143,12 @@ if has('file_in_path')
set path+=**
+" Don't load menus at all in GUI mode; needs to be set here, before gVim
+" actually starts up
+if has('gui_running')
+ set guioptions+=M
" Line break settings and mappings
if has('linebreak')