Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
Last active September 13, 2019 15:54
Show Gist options
  • Save jfeilbach/50e6a8c4e9de87efe08ed5682e47ea03 to your computer and use it in GitHub Desktop.
Save jfeilbach/50e6a8c4e9de87efe08ed5682e47ea03 to your computer and use it in GitHub Desktop.
some .vimrc settings
hi comment ctermfg=grey
if has("syntax")
syntax on
endif
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
if has("autocmd")
filetype plugin indent on
endif
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim81,/usr/share/vim/vimfiles/after,/var/lib/vim/addon
s/after,~/.vim/after
set compatible
set backspace=indent,eol,start
set history=50
set ruler
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
set t_Co=16
set t_Sf=m
set t_Sb=m
endi
if has("autocmd")
if has('gui')
function! <SID>MapExists(name, modes)
for mode in split(a:modes, '\zs')
if !empty(maparg(a:name, mode))
return 1
endif
endfor
return 0
endfunction
autocmd GUIEnter * if !<SID>MapExists("<S-Insert>", "nvso") | execute "map <S-Insert> <MiddleMouse>" | endif
autocmd GUIEnter * if !<SID>MapExists("<S-Insert>", "ic") | execute "map! <S-Insert> <MiddleMouse>" | endif
endif
endif
if filereadable("/etc/papersize")
let s:papersize = matchstr(readfile('/etc/papersize', '', 1), '\p*')
if strlen(s:papersize)
exe "set printoptions+=paper:" . s:papersize
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment