Reputation: 2264
I am trying to clean my .vimrc by removing gui specific settings so that it works well with terminal (i.e., when I start vim over ssh . Is there a place to find a list of vim commands that I should move within if ('gui_running') endif
block.
Upvotes: 0
Views: 169
Reputation: 196456
No, only common sense will help you, there. If you want to clean up your ~/.vimrc
it must mean that you have identified some problems, doesn't it?
In general only a few things are really GUI-specific:
guifont
and related options, guioptions
, gui
, actually,Read the documentation for every option you set.
But if that's really your ~/.vimrc
it shouldn't be too hard because you know exactly what everything does, how and why, right?
As an example, this is what I have:
let os=substitute(system('uname'), '\n', '', '')
if has('gui_running')
colorscheme sorcerer
set guioptions-=T
set lines=40
set columns=140
if os == 'Darwin'
set guifont=Inconsolata-g:h13
set fuoptions=maxvert,maxhorz
set clipboard^=unnamed
elseif os == 'Linux'
set guifont=Inconsolata-g\ Medium\ 11
set guioptions-=m
set clipboard^=unnamedplus
endif
else
if &t_Co >= 256
colorscheme sorcerer
elseif &t_Co < 256
colorscheme sorcerer_16
endif
if os == 'Darwin'
set clipboard^=unnamed
elseif os == 'Linux'
set clipboard^=unnamedplus
endif
nnoremap <Esc>A <up>
nnoremap <Esc>B <down>
nnoremap <Esc>C <right>
nnoremap <Esc>D <left>
inoremap <Esc>A <up>
inoremap <Esc>B <down>
inoremap <Esc>C <right>
inoremap <Esc>D <left>
endif
I don't use this ~/.vimrc
on remote machines so the clipboard
settings are safe for me but you might need to put it in a conditional if you intend to work via SSH.
Upvotes: 4
Reputation: 114
This might not be what you are looking for, but this should provide you with a starting point.
Upvotes: 1