-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_vimrc
651 lines (561 loc) · 18.1 KB
/
dot_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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
" Section: Plugins {{{
set nocompatible " be iMproved, required
filetype off " required
" https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
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
call plug#begin('~/.vim/plugged')
" {{{ Commenting
Plug 'scrooloose/nerdcommenter'
" }}}
" {{{ Color schemes
Plug 'vim-scripts/CycleColor' " Cycles through available colorschemes.
Plug '0mp/vim-robpike'
Plug 'pbrisbin/vim-colors-off'
Plug 'altercation/vim-colors-solarized'
Plug 'junegunn/seoul256.vim'
" }}}
" {{{ Languages
" {{{ bpftrace
Plug 'mmarchini/bpftrace.vim'
" }}}
" {{{ C++
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'rhysd/vim-clang-format'
let g:clang_format#command='/usr/local/bin/clang-format10'
let g:clang_format#auto_format=0
" }}}
" {{{ Go
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_build_constraints = 1
" Make it possible to jump to definitions in other files.
let g:go_def_mode='godef'
" }}}
" {{{ JavaScript
Plug 'pangloss/vim-javascript'
Plug 'posva/vim-vue'
" }}}
" {{{ Markdown
Plug 'moorereason/vim-markdownfmt'
let g:markdownfmt_autosave = 0
" }}}
" {{{ LaTeX
Plug 'lervag/vimtex'
let g:tex_flavor = "latex"
" }}}
" {{{ Python
Plug 'davidhalter/jedi-vim'
if filereadable("/usr/local/bin/black")
Plug 'psf/black', { 'tag': '19.10b0' }
let g:black_virtualenv = "/usr/local"
endif
" }}}
" {{{ reStructuredText
Plug 'nvie/vim-rst-tables'
" }}}
" }}}
" {{{ Navigation
Plug 'ctrlpvim/ctrlp.vim'
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
let g:ctrlp_working_path_mode = '0'
Plug 'tpope/vim-repeat'
" Find a char across lines.
Plug 'dahu/vim-fanfingtastic'
Plug 'mileszs/ack.vim'
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
"Plug 'ludovicchabant/vim-gutentags'
set statusline+=%{gutentags#statusline()}
if executable('exctags')
let g:gutentags_ctags_executable = "exctags"
endif
if executable('uctags')
let g:gutentags_ctags_executable = "uctags"
endif
" }}}
" {{{ Syntax checking
Plug 'vim-syntastic/syntastic'
Plug 'w0rp/ale'
" }}}
" {{{ Fuzzy finder
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
" Complete lines.
imap <c-x><c-l> <plug>(fzf-complete-line)
" }}}
" {{{ Linting
Plug 'ntpeters/vim-better-whitespace'
" }}}
" {{{ Git
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
" }}}
" {{{ Writing
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" }}}
call plug#end()
filetype plugin indent on
filetype on " Enable filetype detection
filetype plugin on " Enable filetype-specific plugins
" }}}
" Section: Plugins configuration {{{
let NERDSpaceDelims=1
" Use "--" instead of "{--}" for Haskell.
let g:NERDAltDelims_haskell = 1
" Netrw
let g:netrw_banner=0 " Disable a banner.
" let g:netrw_liststyle=3 " Print as a tree.
let g:netrw_altv=1 " Open files to the right.
" Goyo
function! s:goyo_enter()
set showbreak=
colo seoul256-light
Limelight
endfunction
function! s:goyo_leave()
set showbreak=\\_
" Don't bother setting the old colorscheme back on.
Limelight!
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
" }}}
" Section: Mappings {{{
" Leader needs some space.
let mapleader = " "
" Turn off highlighting.
nnoremap <leader>n :nohl<CR>
" Sudo saving.
cmap w!! w !sudo tee % >/dev/null
" Toggle paste mode.
nnoremap <leader>p<leader>p :set paste!<CR>p:set paste!<CR>
" Save.
" nnoremap <leader>w<leader> :w <CR>
nnoremap <leader>ww :set wrap! <CR>
" Disable the Ex mode.
map Q <Nop>
" Move cursor by display lines when wrapping
nnoremap <expr> j v:count ? 'j' : 'gj'
nnoremap <expr> k v:count ? 'k' : 'gk'
vnoremap <expr> j v:count ? 'j' : 'gj'
vnoremap <expr> k v:count ? 'k' : 'gk'
" Fight the <esc> <shift>-o delay.
set timeout timeoutlen=1000 ttimeoutlen=100
" Leader d sends targeted text into a black hole.
" Ref.: https://stackoverflow.com/a/11993928/4694621
nnoremap <leader>d "_d
vnoremap <leader>d "_d
" }}}
" Section: Miscellenous {{{
" Show the command you type in.
set showcmd
" Turn off mouse scrolling.
set mouse=
" One clipboard is enough for me.
" https://stackoverflow.com/a/30691754/4694621
set clipboard=unnamedplus
" macOS specific hack.
if substitute(system('uname'), "\n", "", "") == "Darwin"
set clipboard=unnamed
endif
" Copy the Vim registers content to the system clipboard. This way you can:
" 1. Open Vim.
" 2. Copy some text.
" 3. Close Vim.
" 4. Paste the copied text somewhere else as it is now present in the system
" clipboard.
"
" https://stackoverflow.com/a/45553311/4694621
autocmd VimLeave * call system('echo ' . shellescape(getreg('+')) .
\ ' | xclip -selection clipboard')
" Make backspace work like in most other apps.
set backspace=2
" Persistant undo history.
set undofile
" Ensure that .vimundo exists.
function! <SID>EnsureDirExists(dir)
if !isdirectory(a:dir)
if exists("*mkdir")
call mkdir(a:dir,'p')
echo "The " . a:dir .
\ " directory for persistant undo history has been created."
else
echo "Please create the " . a:dir .
\ " directory for persistant undo history manually."
endif
endif
endfunction
call <SID>EnsureDirExists($HOME . '/.vimundo')
set undodir=~/.vimundo/
" Show all the whitespace characters. Toggle with :set list!
" http://vim.wikia.com/wiki/See_the_tabs_in_your_file
" https://stackoverflow.com/q/40498265/4694621
" https://stackoverflow.com/a/36374234/4694621
set listchars=tab:\|\ ,trail:~,extends:>,precedes:<,
if has("patch-7.4.710")
set listchars+=space:.
endif
" Show and highlight search matches during typing.
set incsearch
set hlsearch
" Ignore case if search pattern is all lowercase, case-sensitive otherwise.
set smartcase
set ignorecase
" Works better for completions -> does not mix cases although ignorecase is
" set.
set infercase
" Look for the tags up in the directory tree.
set tags=./tags;/
" Disable full autocomplete in the last line mode.
set wildmode=list:longest,full
" Improve the autocompletion menu.
set completeopt=longest,menuone
" Do not look up tags when asked to perform autocompletion.
set complete-=t
" Fuzzy file opener.
" Usage: :find *.cpp
set path+=**
set wildmenu
" }}}
" Section: Files & buffers {{{
set history=500
set undolevels=500
set encoding=utf-8
" Does some magic with buffers.
set hidden
" You're right Adam, no one needs it!
set nobackup
set noswapfile
" Help Vim detect CUDA source files.
au BufNewFile,BufFilePre,BufRead *.cu set filetype=cuda
au BufNewFile,BufFilePre,BufRead *.cuh set filetype=cuda
" VueJS
au FileType vue setlocal ts=2 sts=2 sw=2 expandtab
au FileType typescript setlocal ts=2 sts=2 sw=2 expandtab
au FileType javascript setlocal ts=2 sts=2 sw=2 expandtab
" Use appropriate comment style when working with .vue files.
" Source: https://github.com/posva/vim-vue
let g:ft = ''
function! NERDCommenter_before()
if &ft == 'vue'
let g:ft = 'vue'
let stack = synstack(line('.'), col('.'))
if len(stack) > 0
let syn = synIDattr((stack)[0], 'name')
if len(syn) > 0
exe 'setf ' . substitute(tolower(syn), '^vue_', '', '')
endif
endif
endif
endfunction
function! NERDCommenter_after()
if g:ft == 'vue'
setf vue
let g:ft = ''
endif
endfunction
" Python
au! FileType python setl nosmartindent
" YAML
au FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" }}}
" Section: Automagic {{{
" Jump to where I left off last time.
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
" Autorefresh files.
set autoread
" Hide the preview window when using Vim's native autocompletion.
" http://stackoverflow.com/a/26022965/4694621
au CompleteDone * pclose
" Lines in a commit message should not exceed 72 characters.
au FileType gitcommit set tw=72
" Enable spell-checking when commiting with git.
au FileType gitcommit set spell
au FileType gitcommit setlocal colorcolumn=51
au FileType make set noexpandtab shiftwidth=8 softtabstop=8 tabstop=8
au FileType sh set noexpandtab shiftwidth=8 softtabstop=8 tabstop=8
au FileType c set noexpandtab shiftwidth=8 softtabstop=8 tabstop=8
au FileType cpp set expandtab shiftwidth=4 softtabstop=4 tabstop=4
au FileType tex set expandtab shiftwidth=1 softtabstop=1 tabstop=1
au FileType html set expandtab shiftwidth=2 softtabstop=2 tabstop=2
au FileType scss set expandtab shiftwidth=2 softtabstop=2 tabstop=2
au FileType css set expandtab shiftwidth=2 softtabstop=2 tabstop=2
" Continue comment on a new line.
au FileType tex set formatoptions+=cro
" Templates.
if has("autocmd")
augroup templates
autocmd BufNewFile Makefile 0r ~/.vim/templates/Makefile
autocmd BufNewFile makefile 0r ~/.vim/templates/makefile
autocmd BufNewFile Vagrantfile 0r ~/.vim/templates/Vagrantfile
augroup END
endif
au BufReadPost svn-commit*.tmp setlocal spell tw=75 noexpandtab shiftwidth=8 softtabstop=8 tabstop=8
au BufReadPost *.toml setlocal ft=toml
" }}}
" Section: Visuals {{{
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set relativenumber
set number
" Show cursor positions in the status bar.
set ruler
" Always show the tabline.
set showtabline=2
" Highlight the current line.
set cursorline
" Don't let tmux mess the background colour.
" XXX: It might break some shortcuts though.
" Source: http://stackoverflow.com/q/6427650/4694621
if !has("gui_running")
set term=screen-256color
" set term=xterm
endif
" Indent wrapped lines and don't break in the middle of a word.
" XXX: Might break in older version.
" https://bluz71.github.io/2017/05/15/vim-tips-tricks.html
set lbr
set breakindent
set showbreak=\\_
syntax enable
silent! colorscheme robpike
" Enable true color support.
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" }}}
" Section: Style {{{
set shiftwidth=4
" Always set tabstop to 8 so that it is always visiable that you're mixing
" tabs and spaces.
set tabstop=8
set expandtab
set softtabstop=4
set autoindent
set smartindent
" Round up indentation.
set shiftround
" }}}
" Section: FreeBSD {{{
" Copyright (c) 2007-2008 Sean C. Farley <[email protected]>
" Copyright (c) 2017-2018 Mateusz Piotrowski <[email protected]>
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions
" are met:
" 1. Redistributions of source code must retain the above copyright
" notice, this list of conditions and the following disclaimer,
" without modification, immediately at the beginning of the file.
" 2. Redistributions in binary form must reproduce the above copyright
" notice, this list of conditions and the following disclaimer in the
" documentation and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"
" $FreeBSD: src/tools/tools/editing/freebsd.vim,v 1.2 2008/07/30 03:34:23 scf Exp $
" This is a plugin for Vim (tested with Vim v7.1) to follow the FreeBSD style(9)
" indentation. It registers a macro (see below) for changing a buffer's
" indentation rules but does not change the indentation of existing code.
" Ignore indents caused by parentheses in FreeBSD style.
function! <SID>IgnoreParenIndent()
let indent = cindent(v:lnum)
if indent > 4000
if cindent(v:lnum - 1) > 4000
return indent(v:lnum - 1)
else
return indent(v:lnum - 1) + 4
endif
else
return (indent)
endif
endfun
" Follow the FreeBSD style(9).
function! SwitchFreeBSDStyle()
setlocal cindent
setlocal cinoptions=(4200,u4200,+0.5s,*500,:0,t0,U4200,l1
setlocal indentexpr=<SID>IgnoreParenIndent()
setlocal indentkeys=0{,0},0),:,0#,!^F,o,O,e
setlocal noexpandtab
setlocal shiftwidth=8
setlocal tabstop=8
setlocal textwidth=80
endfun
" Set correct indendation rules for the FreeBSD Ports.
au BufRead /usr/ports/* set noexpandtab shiftwidth=8 softtabstop=8 tabstop=8
" Vim configuration for the doc tree documents.
if has("autocmd")
au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML()
au BufNewFile,BufRead *.[1-9] call ShowSpecial()
endif " has(autocmd)
function Set_Highlights()
"match ExtraWhitespace /^\s* \s*\|\s\+$/
highlight default link OverLength ErrorMsg
match OverLength /\%71v.\+/
return 0
endfunction " Set_Highlights()
function ShowSpecial()
" setlocal list listchars=tab:>>,trail:*,eol:$
hi def link nontext ErrorMsg
return 0
endfunction " ShowSpecial()
function Set_SGML()
setlocal number
syn match sgmlSpecial "&[^;]*;"
setlocal syntax=sgml
setlocal filetype=xml
setlocal shiftwidth=2
setlocal textwidth=70
setlocal tabstop=8
setlocal softtabstop=2
setlocal formatprg="fmt -p"
setlocal autoindent
setlocal smartindent
" Rewrap paragraphs
noremap P gqj
" Replace spaces with tabs
noremap T :s/ /\t/<CR>
call ShowSpecial()
call Set_Highlights()
return 0
endfunction " Set_SGML()
" }}}
" Section: Homebrewed hacks {{{
" Sign highlight lines.
" TODO: Set signcolumn back to auto when you remove all the higlight signs.
if v:version >= 800
set signcolumn=auto
let s:sign_highlight_counter = 0
endif
hi GreenSignHighlightRow ctermbg=49 guibg='#00ffaf'
hi YellowSignHighlightRow ctermbg=226 guibg='#ffff00'
hi PinkSignHighlightRow ctermbg=177 guibg='#df87ff'
sign define GreenSignHighlightRow linehl=GreenSignHighlightRow
sign define YellowSignHighlightRow linehl=YellowSignHighlightRow
sign define PinkSignHighlightRow linehl=PinkSignHighlightRow
let g:last_used_highlight_color = 'GreenSignHighlightRow'
let s:sign_highlight_serial = 1
function PlaceSignHighlight(sign_highlight_group)
" Redefine highlights as they could have been overwritten by changing
" colorscheme.
hi GreenSignHighlightRow ctermbg=49 guibg='#00ffaf'
hi YellowSignHighlightRow ctermbg=226 guibg='#ffff00'
hi PinkSignHighlightRow ctermbg=177 guibg='#df87ff'
if v:version >= 800
set signcolumn=no
endif
let l:linenum = line(".")
let s:sign_highlight_serial = s:sign_highlight_serial + 1
exe ":sign place " . s:sign_highlight_serial .
\ " line=" . l:linenum .
\ " name=" . a:sign_highlight_group . " buffer=" . bufnr('%')
if v:version >= 800
let s:sign_highlight_counter = s:sign_highlight_counter + 1
endif
let g:last_used_highlight_color = a:sign_highlight_group
endfunction
function UnplaceSignHighlight()
let l:linenum = line(".")
redir! > /tmp/sign-highlight.txt
silent :exe ":sign place buffer=" . bufnr('%')
redir END
let l:id = system("cat /tmp/sign-highlight.txt | " .
\ "grep line=" . l:linenum . " | head -1 ")
let l:id = system("cut -d= -f3 | cut -d' ' -f1 | tr -d '\n'", l:id)
if l:id
exe ":sign unplace " . l:id . " buffer=" . bufnr('%')
if v:version >= 800
let s:sign_highlight_counter = s:sign_highlight_counter - 1
if s:sign_highlight_counter == '0'
set signcolumn=auto
endif
endif
endif
endfunction
map <leader>ghh :call PlaceSignHighlight(g:last_used_highlight_color)<CR>
map <leader>gh1 :call PlaceSignHighlight('GreenSignHighlightRow')<CR>
map <leader>gh2 :call PlaceSignHighlight('YellowSignHighlightRow')<CR>
map <leader>gh3 :call PlaceSignHighlight('PinkSignHighlightRow')<CR>
map <leader>ghc :call UnplaceSignHighlight()<CR>
" function HighlightCursorLine()
" let l:linenum = line(".")
" redir! > /tmp/sign-highlight.txt
" silent :exe ":sign place buffer=" . bufnr('%')
" redir END
" let l:id = system("cat /tmp/sign-highlight.txt | " .
" \ "grep line=" . l:linenum . " | head -1 ")
" let l:id = system("cut -d= -f3 | cut -d' ' -f1 | tr -d '\n'", l:id)
" if l:id
" hi CursorLine ctermfg=162 guifg='#df0087'
" else
" hi CursorLine ctermfg=NONE guifg=NONE
" endif
" endfunction
" au CursorMoved * call HighlightCursorLine()
function! SaveOrig()
if filereadable(expand('%:p'). '.orig')
echom 'The ' . expand('%:p') . '.orig file already exists!'
else
write %:p.orig
endif
endfunction
command! SaveOrig call SaveOrig()
function! Origins()
r ! git status --untracked-files=no --short | awk '{print $NF}' | cut -d / -f 1-2 | sort -u
endfunction
command! Origins call Origins()
" }}}
" Section: Toggling and switching knobs {{{
" Toggle between tabs and spaces.
" Highlight the 81th column.
let &colorcolumn=0
function! Toggle81()
if &colorcolumn
setlocal colorcolumn=0
else
setlocal colorcolumn=81
endif
endfunction
function! ToggleIndentation()
if &expandtab
set shiftwidth=8
set tabstop=8
set softtabstop=8
set noexpandtab
else
set shiftwidth=4
set tabstop=8
set softtabstop=4
set expandtab
endif
endfunction
nnoremap <leader>sf :call SwitchFreeBSDStyle()<CR>
nnoremap <leader>th :call Toggle81()<CR>
nnoremap <leader>ti :call ToggleIndentation()<CR>
nnoremap <leader>tl :set list!<CR>
" }}}
" Unfold the section under the cursor in .vimrc.
au BufWinEnter .vimrc normal! zv
" vim:foldmethod=marker:foldlevel=0: