-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
112 lines (80 loc) · 2.5 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
"Fix encoding
set enc=utf-8
"""Packages
" Only load packages I want
" packadd! onedark.vim
"""UI
"Don't show whitespace, but configure for when I want to (:set list! toggles)
set lcs=eol:$,tab:➜\ ,trail:✖
set nolist
map <F3> :set list!<CR>
"Use a space as the vertical divider between windows
set fillchars+=vert:\
"Display wrap character before wrapped lines
set showbreak=…
set linebreak
" set guifont=InputMono-Regular:h11
" set macligatures
" Enable powerline
"set guifont=Meslo\ LG\ M\ DZ\ Regular\ for\ Powerline:h11
"Color scheme, and bindings to change it quickly
if has("gui_running")
set background=dark
" let ayucolor="light"
let ayucolor="mirage"
" let ayucolor="dark"
colorscheme dracula
endif
function! AndPrintScheme(G)
call a:G()
redraw
colorscheme
endfunction
map <F4> :call AndPrintScheme(function("NextColorScheme"))<CR>
map <S-F4> :call AndPrintScheme(function("PreviousColorScheme"))<CR>
map <C-F4> :call AndPrintScheme(function("RandomColorScheme"))<CR>
"Color the end tag in XML the same as the start tag
hi link xmlEndTag xmlTag
"Highlight the current line, but not the column
set cursorline nocursorcolumn
"Always leave 3 lines around the cursor (scrolloff)
set so=4
"Show line numbers
set nu
"Update GUI (left scrollbar, no tearoff menus, no toolbar, no right scrollbar)
set guioptions+=l guioptions-=t guioptions-=T guioptions-=r
"Use full colors in a terminal
"set t_Co=256
"Don't wrap long lines
"set nowrap
"Show the ruler
set ruler
"Hide extra files in NERDTree
let NERDTreeIgnore = ['\.pyc$']
"Hide Bookmarks label and 'Press ? for help' text
let NERDTreeMinimalUI=1
"""Editing
"Indentation
set tabstop=4 "Max width of tab in spaces
set shiftwidth=4 "Size of an indent
set expandtab "Tab and :retab inserts spaces
set smarttab "Tab goes to next indent block
set softtabstop=0 "No combo of tabs and spaces
set autoindent "Start next line at previous indent
set smartindent "Indent after brackets and known keywords
autocmd FileType javascript setlocal sw=2 ts=2
"Use filetype plugins
filetype plugin indent on
"In HTML, use XHTML-style tag closings (e.g. <img />)
let xml_use_xhtml=1
"Fix folding
"set foldmethod=syntax
"Tagbar
map <silent> <F9> :TagbarToggle<CR>
"Code search with Ag, "the silver searcher"
let g:ackprg = 'ag --nogroup --nocolor --column'
"Case insensitive searching
set ignorecase
set smartcase " Case insensitive unless there's a capital letter in the query
"Enable command-line tab completion
set wildmenu