aboutsummaryrefslogtreecommitdiff
path: root/files/vim/ftplugin/vimwiki
diff options
context:
space:
mode:
Diffstat (limited to 'files/vim/ftplugin/vimwiki')
-rw-r--r--files/vim/ftplugin/vimwiki/snips/plantUml.txt5
-rw-r--r--files/vim/ftplugin/vimwiki/snips/template.txt3
-rw-r--r--files/vim/ftplugin/vimwiki/vimwiki.vim24
3 files changed, 23 insertions, 9 deletions
diff --git a/files/vim/ftplugin/vimwiki/snips/plantUml.txt b/files/vim/ftplugin/vimwiki/snips/plantUml.txt
new file mode 100644
index 0000000..4a016eb
--- /dev/null
+++ b/files/vim/ftplugin/vimwiki/snips/plantUml.txt
@@ -0,0 +1,5 @@
+```{.plantuml caption="<+++>"}
+@startuml
+<++>
+@enduml
+```
diff --git a/files/vim/ftplugin/vimwiki/snips/template.txt b/files/vim/ftplugin/vimwiki/snips/template.txt
index 18280d3..f6b16a8 100644
--- a/files/vim/ftplugin/vimwiki/snips/template.txt
+++ b/files/vim/ftplugin/vimwiki/snips/template.txt
@@ -1,4 +1,7 @@
---
+header-includes:
+ - \usepackage[margin=1.5in]{geometry}
+
title: "Title"
author:
- Íñigo Gutiérrez Fernández
diff --git a/files/vim/ftplugin/vimwiki/vimwiki.vim b/files/vim/ftplugin/vimwiki/vimwiki.vim
index f0e6cd5..e8f7a18 100644
--- a/files/vim/ftplugin/vimwiki/vimwiki.vim
+++ b/files/vim/ftplugin/vimwiki/vimwiki.vim
@@ -3,25 +3,31 @@
"
" Syntastic linter: mdl, proselint, textlint
-let g:syntastic_vimwiki_checkers = ['markdown/mdl']
+"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
-" Column marker: 80 characters
-call matchadd('ColorColumn', '\%101v', 100)
-setlocal textwidth=100
+" Text width
+match ColorColumn /\%81v/
+setlocal textwidth=80
+setlocal linebreak
+
+" Syntax highlighting colors
+highlight Title ctermfg=blue
+highlight TitleHash ctermfg=cyan
+match TitleHash /^##*/
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim<CR>
nnoremap <buffer> <leader>e :Errors<CR>
-nnoremap <buffer> <leader>t :-1r ~/.vim/ftplugin/vimwiki/snips/template.txt<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><CR>
-nnoremap <buffer> <leader>o :w<CR>:!toPDF.sh -o "%"<CR>
-
-" Syntax highlighting colors
-highlight Title ctermfg=darkblue
+nnoremap <buffer> <leader>o :w<CR>:!toPDF.sh -o "%"<CR><CR>
+inoremap <buffer> <leader>h <Esc><<A
+inoremap <buffer> <leader>l <Esc>>>A