summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ftdetect/markdown.vim2
-rw-r--r--ftplugin/markdown_bujo.vim6
-rw-r--r--plugin/bujo.vim9
3 files changed, 17 insertions, 0 deletions
diff --git a/ftdetect/markdown.vim b/ftdetect/markdown.vim
new file mode 100644
index 0000000..c00d51a
--- /dev/null
+++ b/ftdetect/markdown.vim
@@ -0,0 +1,2 @@
1" Makes us able to read
2au BufRead,BufNewFile *.md set filetype=markdown
diff --git a/ftplugin/markdown_bujo.vim b/ftplugin/markdown_bujo.vim
new file mode 100644
index 0000000..cf79d6f
--- /dev/null
+++ b/ftplugin/markdown_bujo.vim
@@ -0,0 +1,6 @@
1" Edit markdown lists
2" Add and remove bullets with ease
3nnoremap <buffer> <C-Enter> i-[]
4nnoremap <buffer> <C-BS> :.s/\[\]/\[x\]<Enter>
5inoremap <buffer> <C-Enter> -[]
6inoremap <buffer> <C-BS> <esc>:.s/\[\]/\[x\]<Enter>
diff --git a/plugin/bujo.vim b/plugin/bujo.vim
new file mode 100644
index 0000000..b4d1d85
--- /dev/null
+++ b/plugin/bujo.vim
@@ -0,0 +1,9 @@
1" Open the bujo todo list file
2function s:OpenTodo()
3 "30 makes it open at width 30
4 exe ":30vs ~/bujo/todo.md"
5endfunction
6
7if !exists(":Todo")
8 command Todo :call s:OpenTodo()
9endif