aboutsummaryrefslogtreecommitdiff
path: root/stow/vim/dot-vim/ftplugin/vimwiki/vimwiki.vim
blob: c361600717f875b58bb6db33cdf8f74093c8b509 (plain)
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
" ~/.vim/ftplugin/vimwiki.vim
" vimwiki-specific vim configuration
"
" Syntastic linter: mdl, proselint, textlint

"let g:syntastic_vimwiki_checkers = ['markdown/mdl']

" Tabs hate: tabs are expanded to 2 spaces
setlocal tabstop=2 shiftwidth=2 expandtab
" Show existing tabs (they can be deleted with :retab)
setlocal list

" Text width
match ColorColumn /\%81v/
setlocal textwidth=80
setlocal linebreak

" Syntax highlighting colors
highlight Title ctermfg=blue
highlight TitleHash ctermfg=cyan
match TitleHash /^##*/

setlocal conceallevel=1

let mapleader = " "

nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim<CR>
nnoremap <buffer> <leader>e :Errors<CR>

nnoremap <buffer> <leader>tt :r ~/.vim/ftplugin/vimwiki/snips/template.txt<CR>
nnoremap <buffer> <leader>tp :r ~/.vim/ftplugin/vimwiki/snips/plantUml.txt<CR>/<+++><CR>cf>

nnoremap <buffer> <leader>c :w<CR>:!toPDF.sh "%"<CR>
nnoremap <buffer> <leader>o :w<CR>:!toPDF.sh -o "%"<CR><CR>

let mapleader = ","

inoremap <buffer> <leader>h <Esc><<A
inoremap <buffer> <leader>l <Esc>>>A