Skip to content

Instantly share code, notes, and snippets.

@yuriks
Created January 4, 2012 06:47
Show Gist options
  • Save yuriks/1558850 to your computer and use it in GitHub Desktop.
Save yuriks/1558850 to your computer and use it in GitHub Desktop.
yuriks' vim config
colorscheme slate
highlight SpecialKey gui=NONE guifg=#1a1a1a
highlight ModeMsg term=bold,reverse ctermfg=6 gui=bold,reverse guifg=goldenrod
highlight Search guibg=#7e5227 guifg=NONE
highlight LineNr guifg=grey60 guibg=grey25
highlight PreProc guifg=red guibg=NONE ctermfg=red
set guifont=Envy\ Code\ R:h10
set columns=120
set lines=30
set fcs=vert:▪,fold:═
set lcs=tab:\│\ ,trail:@,extends:>,precedes:<
set hlsearch
set incsearch
set mousemodel=extend
set guioptions=cgLr
set nobackup
set cindent
set autoread
set cinoptions=l1,g0
set display=uhex
set encoding=utf-8
set noexpandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set list
set lcs=tab:\|\ ,trail:@,extends:>,precedes:<
set showmatch
set number
set ruler
set scrolloff=5
set sidescroll=1
set sidescrolloff=20
set backspace=indent,eol,start
set ignorecase
set smartcase
map <M-n> <Left>
map <M-e> <Down>
map <M-i> <Up>
map <M-o> <Right>
map <M-h> <Home>
map <M-'> <End>
map <M-u> <PageDown>
map <M-y> <PageUp>
map! <M-n> <Left>
map! <M-e> <Down>
map! <M-i> <Up>
map! <M-o> <Right>
map! <M-h> <Home>
map! <M-'> <End>
map! <M-u> <PageDown>
map! <M-y> <PageUp>
map! <M-s> <Esc>
filetype plugin indent on
command SetGLSLFileType call SetGLSLFileType()
function SetGLSLFileType()
for item in getline(1,10)
if item =~ "#version 400"
execute ':set filetype=glsl400'
break
endif
if item =~ "#version 330"
execute ':set filetype=glsl330'
break
endif
endfor
endfunction
au BufNewFile,BufRead *.frag,*.vert,*.geom,*.fp,*.vp,*.gp,*.glsl SetGLSLFileType
syntax enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment