-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_vimrc
114 lines (91 loc) · 3.79 KB
/
_vimrc
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
if &shell =~# 'fish$'
set shell=sh
endif
" Enable pathogen plugin manager
execute pathogen#infect()
" Save when make is executed
":autocmd BufWritePost <buffer> make
set number
" Shows line number
set nocompatible
"This setting prevents vim from emulating the original vi's bugs and limitations.
set autoindent
set smartindent
"The first setting tells vim to use "autoindent" (that is, use the current line's indent level to set the indent level of new lines). The second makes vim attempt to intelligently guess the indent level of any new line based on the previous line, assuming the source file is in a C-like language. Combined, they are very useful in writing well-formatted source code.
set tabstop=2
set shiftwidth=4
set expandtab
"I prefer 4-space tabs to 8-space tabs. The first setting sets up 4-space tabs, and the second tells vi to use 4 spaces when text is indented (auto or with the manual indent adjustmenters.)
set showmatch
"This setting will cause the cursor to very briefly jump to a brace/parenthese/bracket's "match" whenever you type a closing or opening brace/parenthese/bracket. I've had almost no mismatched-punctuation errors since I started using this setting.
set guioptions-=T
"I find the toolbar in the GUI version of vim (gvim) to be somewhat useless visual clutter. This option gets rid of the toolbar.
"set vb t_vb=
"This setting prevents vi from making its annoying beeps when a command doesn't work. Instead, it briefly flashes the screen -- much less annoying.
set ruler
"This setting ensures that each window contains a statusline that displays the current cursor position.
"set nohls
"By default, search matches are highlighted. I find this annoying most of the time. This option turns off search highlighting. You can always turn it back on with :set hls.
set incsearch
"With this nifty option, vim will search for text as you enter it. For instance, if you type /bob to search for bob, vi will go to the first "b" after you type the "b," to the first "bo" after you type the "o," and so on. It makes searching much faster, since if you pay attention you never have to enter more than the minimum number of characters to find your target location. Make sure that you press Enter to accept the match after vim finds the location you want.
"set virtualedit=all
" Only useful if using windows
" Opens gvim using the entire screen
" autocmd GuiEnter * simalt ~x
" Enable Ctrl-C, Ctrl-V, select with cursor etc. as in mswin
source $VIMRUNTIME/mswin.vim
behave mswin
autocmd BufNewFile,BufRead *.honey set syntax=java
nnoremap <C-f> <PageDown>
nnoremap <C-b> <PageUp>
" Favorite Color Scheme
if has("gui_running")
" colorscheme torte
" colorscheme molokai
colorscheme dracula "https://github.com/dracula/vim
set guifont=Menlo_Regular:h14
let g:molokai_original = 1
" Remove Toolbar
set guioptions-=T
"Terminus is AWESOME
"set guifont=Lucida_Console:h12
" Unbind Ctrl F for find
macmenu Edit.Find.Find\.\.\. key=<nop>
else
"set guifont=Lucida_Console:h12
"colorscheme metacosm
endif
" set rtp+=$GOROOT/misc/vim
filetype plugin indent on
syntax on
" Configure tagbar
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
nmap <F8> :TagbarToggle<CR>
g:tagbar_ctags_bin /usr/local/Cellar/ctags/5.8_1/bin
let g:go_fmt_command = "goimports"