You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
467 B
9 lines
467 B
if !exists("g:notecrate_dirs")
|
|
let g:notecrate_dirs = {
|
|
\ "notes": { "prefix": "n", "dir": "~/notecrate"}
|
|
\ }
|
|
endif
|
|
for [key, value] in items(g:notecrate_dirs)
|
|
execute "autocmd BufRead,BufNewFile " . value["dir"] . "/*.md set filetype=notecrate syntax=notecrate"
|
|
execute "normal! :nnoremap <leader>w" . value["prefix"] . " :e " . value["dir"] . "/index.md<CR>:let b:notecrate_dir = \"" . value["dir"] . "\"<CR>:let b:notecrate_history = []<CR>\<CR>"
|
|
endfor
|
|
|