-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gvimrc
36 lines (31 loc) · 924 Bytes
/
.gvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
" Set the theme (actually done in .vimrc)
" colorscheme rdark-mod
" set colorcolumn=81,121
" Remove unnecessary menus
set guioptions-=T
set guioptions-=r
set guioptions-=L
set guioptions-=m
set guioptions+=c
" Adjust the window size
set lines=51
set columns=100
" Solarized does not work that good in the terminal I am using, so let's just
" use it with gvim
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
call togglebg#map("<F12>")
" Only with gvim, set the proper encoding for tex files
function! CheckFileEncoding()
if exists('b:fenc_at_read') && &fileencoding != b:fenc_at_read
exec 'e! ++enc=' . &fileencoding
unlet b:fenc_at_read
" No idea why I had to add this
exec 'set filetype=' . &filetype
endif
endfunction
autocmd BufRead *.tex let b:fenc_at_read=&fileencoding
autocmd BufWinEnter *.tex call CheckFileEncoding()
" Use <C-Tab> instread of <C-6>
noremap <C-Tab> <C-^>