aboutsummaryrefslogtreecommitdiff
path: root/stow/vim/.vim/ftplugin/vimwiki
diff options
context:
space:
mode:
Diffstat (limited to 'stow/vim/.vim/ftplugin/vimwiki')
-rw-r--r--stow/vim/.vim/ftplugin/vimwiki/snips/plantUml.txt5
-rw-r--r--stow/vim/.vim/ftplugin/vimwiki/snips/template.txt15
-rw-r--r--stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim39
3 files changed, 59 insertions, 0 deletions
diff --git a/stow/vim/.vim/ftplugin/vimwiki/snips/plantUml.txt b/stow/vim/.vim/ftplugin/vimwiki/snips/plantUml.txt
new file mode 100644
index 0000000..4a016eb
--- /dev/null
+++ b/stow/vim/.vim/ftplugin/vimwiki/snips/plantUml.txt
@@ -0,0 +1,5 @@
+```{.plantuml caption="<+++>"}
+@startuml
+<++>
+@enduml
+```
diff --git a/stow/vim/.vim/ftplugin/vimwiki/snips/template.txt b/stow/vim/.vim/ftplugin/vimwiki/snips/template.txt
new file mode 100644
index 0000000..f6b16a8
--- /dev/null
+++ b/stow/vim/.vim/ftplugin/vimwiki/snips/template.txt
@@ -0,0 +1,15 @@
+---
+header-includes:
+ - \usepackage[margin=1.5in]{geometry}
+
+title: "Title"
+author:
+- Íñigo Gutiérrez Fernández
+
+ \
+
+ UO238186
+date: "10/04/2020"
+---
+
+# Introducción
diff --git a/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim
new file mode 100644
index 0000000..c361600
--- /dev/null
+++ b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim
@@ -0,0 +1,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