-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgvimrc
More file actions
81 lines (61 loc) · 1.6 KB
/
gvimrc
File metadata and controls
81 lines (61 loc) · 1.6 KB
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
80
81
"""""""""""""""
" Vi Settings "
"""""""""""""""
" MacVim comes bundled with a specific version of ruby so it has problems
" using command-t when a newer system ruby is installed.
" Use `gem environment` to find out where the current system ruby's
" installation path exists. Then find the dylib file.
"set rubydll=/usr/local/Cellar/ruby/2.5.1/lib/libruby.2.5.dylib
" Stop blinking cursor
" set guicursor=a:blinkon0
" Hide balloon tooltips
set noballooneval
" Hide menubar
"set go-=T
" Hide scroll bars
set guioptions=Ace
" Helper function to return basename of cwd.
function! GetParentDir()
return fnamemodify(getcwd(), ':t')
endfunction
set guitablabel=%M%{GetParentDir()}
" Default window size
set lines=100
set columns=200
"
" Set font
" set guifont=Monospace\ 9
" set linespace=1
set guifont=SFMono-Regular:h13
set linespace=1
" Disable to beep on errors
set vb t_vb=
set undolevels=8000
set cursorline
set runtimepath+=$GOROOT/misc/vim
""""""""""""
" Mappings "
""""""""""""
map <Leader>d <Esc>:lcd %:p:h<CR>
map <Leader>n <Esc>:NERDTree %:p:h<CR>
map <Leader>j <Esc>%!python -m json.tool<CR>
" Copy/paste with easier shortcut keys
" Paste with CTRL+SHIFT+v
noremap <C-S-v> "+gP
inoremap <C-S-v> <Esc>"+pa
" Copy with CTRL+SHIFT+c
map <C-S-c> "+y
" CTRL-S to Save
noremap <C-s> :w<CR>
" Save plangrid coding session
fu! SaveSession()
let l:session_path="~/code/session.vim"
exe "mksession! " . l:session_path
echom "Session saved to " . l:session_path
endf
map <F5> :call SaveSession()<CR>
augroup gvimrc
au!
" Resize splits when the window is resized
au VimResized * exe "normal! \<c-w>="
augroup END