-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.vim
127 lines (90 loc) · 2.69 KB
/
config.vim
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
115
116
117
118
119
120
121
122
123
124
125
126
" =============================================================================
" ==/ ------- -------- \==
" General Configuration
" ==\ ------- -------- /==
" =============================================================================
"
" ==| ------- 1. Global -------- |==
"
" I don't know; these things need to happen whether we understand them or not.
set nocompatible
set encoding=UTF-8
set backspace=indent,eol,start
set formatoptions=crql
" Incremental, highlighted, case-sensitive search
set incsearch
set hlsearch
" Add special characters to search
set iskeyword+=\$,-
"
" ==| ------- 2. Sessions -------- |==
"
" Update buffer if file has been changed outside of Vim
set autoread
" History swap space
set directory=~/.vim/swap/
" Extend history
set history=1000
" Undo that remembers after you close the file
if has('persistent_undo')
set undofile
set undodir=~/.vim/undo/
endif
" Sync clipboard
set clipboard+=unnamed
"
" ==| ------- 3. UI -------- |==
"
" Syntax highlighting
syntax enable
" Color scheme
colorscheme phoenix
PhoenixPurple
" Display line numbers
set number
" Don't wrap lines
set nowrap
" Don't show what mode we are in; that's Airline's job.
set noshowmode
" Disable region folding
set nofoldenable
" Keep cursor in same column during vertical travel
set nostartofline
" Enable side scrolling
set sidescroll=1
" Scrolling edge padding
set scrolloff=2
set sidescrolloff=2
" Indicate when we are writing lines more than 80 characters long
set colorcolumn=0
highlight ColorColumn ctermbg=235 ctermfg=50 guibg=#222222
"
" ==| ------- 4. Formatting -------- |==
"
" Tabs
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" Spaces
set autoindent
filetype plugin indent on
"
" ==| ------- 5. Plugins -------- |==
"
" Turn-off Cursorword on start, toggle with <leader>cw
let g:cursorword=0
" CoC servers don't play well with backup files
set nobackup
set nowritebackup
" NERDTree - just the tree
let g:NERDTreeMinimalUI=1
" Change the CWD whenever you change directories in NERDTree
" Useful for dropping out for a couple commands and using the FZF plugin
let g:NERDTreeChDirMode=2
" Arrows are cool
let g:airline_powerline_fonts = 1
" Enable an additional "Airline" for tabs
let g:airline#extensions#tabline#enabled=1
" Better path formatting for the above tabline
let g:airline#extensions#tabline#formatter='unique_tail_improved'