-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
176 lines (134 loc) · 4.54 KB
/
.vimrc
File metadata and controls
176 lines (134 loc) · 4.54 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
" _..--""---.
" / ".
" ` l
" |'._ ,._ l/"\
" | _J<__/.v._/
" \( ,~._,,,,-)
" `-\' \`,,j|
" \_,____J
" .--.__)--(__.--.
" / `-----..--'. j
" '.- '`--` `--' \\
" // '`---'` `-' \\
" // '`----'`.-.-' \\
" _// `--- -' \' | \________
" | | ) ( `.__.---- -'\
" \7 \`-( 74\\\
" || _ /`-( l|//7__
" |l (' `-)-/_.--. f''` -.-"|
" |\ l\_ `-' .' | | |
" llJ _ _)J--._.-(' | | l
" |||( ( '_)_ .l ". _ ..__I | L
" ^\\\||`' ' '"-. " )''`'---' L.-'`-.._
" \ | ) /. ``'`-.._``-.
" l l / / | |''|
" ' \ / / "-..__ | |
" | | / / 1 ,- t-...J_.'
" | | / / | | |
" J \ /" ( l | |
" | ().'`-()/ | | |
" _.-"_.____/ l l.-l
" _.-"_.+"| / \. \
"/"\.-"_.-" | | / \ \
"\_ " | | 1 | `'|
" |ll | | | i |
" \\\ |-\ \j .. L,,'. `/
" __\\\ ( .-\ .--' ``--../..' '-..
" `'''`----`\\\\ .....--'''
" \\\\
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim-plug stuff
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" autoload vim-plug if not present
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" plugins
call plug#begin('~/.vim/plugged')
Plug 'ap/vim-css-color'
Plug 'tpope/vim-endwise'
Plug 'jiangmiao/auto-pairs'
Plug 'jceb/vim-orgmode'
Plug 'mattn/emmet-vim'
Plug 'tpope/vim-speeddating'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'pangloss/vim-javascript'
Plug 'evanleck/vim-svelte', {'branch': 'main'}
call plug#end()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" custom settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" security feature
set modelines=0
" syntax highlighting
syntax on
" disables vi compatibility
set nocompatible
" enables default ruler (https://codeyarns.github.io/tech/2010-11-28-vim-ruler-and-default-ruler-format.html)
set ruler
" disables terrible bell signal, replacing it with a visual cue
set visualbell
" obvious
set encoding=utf-8
" set soft wrap for text
set wrap
" tab sizes and etc
set tabstop=4
set shiftwidth=4
set softtabstop=0
set expandtab
set noshiftround
set smarttab
" when traversing text, vim will try to leave 6 linse of padding on either
" side of the cursor
set scrolloff=6
" append to matchpairs list
set matchpairs+=<:>
" set screenline to always be visible
set laststatus=2
" map leader
let mapleader=" "
" map localleader (localleader is a leader key for chords that depend on
" specific filetypes)
let maplocalleader="\\ "
" enable mouse interaction. hypocritical, but why not?
set mouse=a
" setting breakindent prevents indented lines from breaking
set breakindent
" make linebreaks work as expected
set linebreak
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" plugin-specific settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" org-mode variables
"
" g:org_aggressive_conceal dictates whether formatting characters are hidden
" (*bold text* simply becomes bold text)
"
" g:org_indent dictates indentation style for heading levels
let g:org_aggressive_conceal = 1
let g:org_indent = 1
let g:org_agenda_files = ['~/Dropbox/org/journal/*.org']
" disable coc warning for outdated vim
let g:coc_disable_startup_warning = 1
" NERDTree bindings?
nnoremap <Leader><Leader> :NERDTreeToggle<CR>
" Expand Emmet abbreviations with the tab key (cucked voice) just like in VS Code
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
" With this setting enabled, all Emmet abbreviations expand with a tabbed
" newline between them. So, for instance (_ is cursor):
" div_
" <tab is pressed>
" <div>
" _
" </div>
let g:user_emmet_settings = {
\ 'html' : {
\ 'block_all_childless' : 1,
\ },
\}
" case insensitive searches by default
set ignorecase