-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgvimrc
executable file
·68 lines (56 loc) · 1.43 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
colorscheme murphy
set columns=80
set lines=55
set mouse=a
let localconfig = $HOME . "/.gvimrc.local"
if filereadable(localconfig)
exec ":source " . localconfig
endif
" Keybindings to use tabs like tmux windows
map <C-A>c :execute(tabpagenr("$") . "tabnew")<CR>
map <C-A>1 1gt
map <C-A>2 2gt
map <C-A>3 3gt
map <C-A>4 4gt
map <C-A>5 5gt
map <C-A>6 6gt
map <C-A>7 7gt
map <C-A>8 8gt
map <C-A>9 9gt
map <C-A>n gt
map <C-A>p gT
let g:last_tab_visited = 1
map <C-A><C-A> :execute("tabn " . g:last_tab_visited)<CR>
au! TabLeave * let g:last_tab_visited = tabpagenr()
set showtabline=2 " always show tabs in gvim, but not vim
" set up tab labels with tab number, buffer name, number of windows
function! GuiTabLabel()
if !exists('t:tab_name')
let t:tab_name = 'vim'
endif
let label = ''
let bufnrlist = tabpagebuflist(v:lnum)
" Append the tab number
let label .= v:lnum.':'
" Append the tab name
let label .= '[' . t:tab_name . ']'
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label .= '+'
break
endif
endfor
return label
endfunction
set guitablabel=%{GuiTabLabel()}
" Change tab name
function! SetTabName(myarg)
" Set name and refresh buffer
let t:tab_name = a:myarg
let &ro = &ro
endfunction
command! -nargs=1 SetTabName call SetTabName('<args>')
map <C-A>, :SetTabName<Space>
set macligatures
set guifont=Fira\ Code:h12