-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gvimrc
80 lines (68 loc) · 2.36 KB
/
.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
" This is all in common.vim now
" syntax enable
" colorscheme desert
" colorscheme slate
" colorscheme default
" DEMO: This syntax works
if (has("gui_running"))
" echo "Found gui_running... \n"
" sleep 1
endif
" Note: User-defined commands must begin with a capital letter
" Font options
if has('mac') " osx
" echo "Found mac... \n"
" sleep 1
command! MM set guifont=AndaleMono:h18 " MacBook Pro 2018 font (43" 4K monitor)
else
command! Fs set guifont=Liberation\ Mono\ Regular\ 10 " Font small
command! Fm set guifont=Liberation\ Mono\ Regular\ 12 " Font medium
command! Fl set guifont=Liberation\ Mono\ Regular\ 14 " Font large
command! Fll set guifont=Liberation\ Mono\ Regular\ 16 " Font large-large
command! FF Fll
command! Laptop Fll
endif
" Window shape commands
command! Ls set lines=40 " Lines small
command! Lm set lines=60 " Lines medium
command! Ll set lines=99 " Lines large
command! Ws set columns=60 " Width small
command! Wm set columns=130 " Width medium
command! Wl set columns=250 " Width large
" Default size/shape
function! ConfigStd()
set columns=130
set lines=60
if has('mac')
set guifont=AndaleMono:h18 " MacBook Font
else
set guifont=Liberation\ Mono\ Regular\ 14
endif
endfunction
call ConfigStd()
" Define an easy way to maximize the window (Vertical bar '|' concats 2 commands on one line. It can
" also be done with a crtl-v/vrtl-j combination)
command! WW set columns=250 lines=99
" match index is 0-based (C-style); no match = -1
" if (match( system("uname -a"), "Linux" ) > -1)
" set guifont=Monospace\ 10 " default => Linux (27 in. LG monitor)
" set guifont=Liberation\ Mono\ 10 " alternative for Fedora
" endif
" elseif (match( system("uname -a"), "Darwin" ) > -1)
" echo "Found Darwin, setting guifont for mac... \n"
" sleep 1
" set guifont=Courier\ New:h16
" endif
" This function is used to swap the orientation of 2 windows (eg left/right), while keeping the
" cursor in the same pane where it started (eg left pane).
function! SwapWindows()
" User-defined functions must begin with a capital letter
wincmd r " rotate windows
wincmd w " move cursor to
endfunction
command! SS call SwapWindows()
set guioptions-=r guioptions-=L guioptions+=l
" Set columns wide if in "diff" mode
if &diff
set columns=240
endif