Browse Source

vim: stuff for migrating various files to ~/workspace

main
Brennen Bearnes 5 months ago
parent
commit
36f3b82932
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      home/.vim/vimrc

+ 12
- 1
home/.vim/vimrc View File

@ -271,14 +271,16 @@ let mapleader = ","
" main personal wiki
let wiki = {}
let wiki.name = 'notes'
let wiki.path = '~/notes/vimwiki/'
let wiki.path_html = '~/notes/html/'
let wiki.path_html = '~/workspace/notes-html/'
let wiki.auto_tags = 1
let wiki.auto_diary_index = 1
let wiki.automatic_nested_syntaxes = 1
" a markdown wiki for testing purposes
let markdownwiki = {}
let wiki.name = 'markdownwiki'
let markdownwiki.path = '~/notes/markdownwiki'
let markdownwiki.path_html = '~/notes/markdownwiki/html/'
let markdownwiki.auto_tags = 1
@ -364,6 +366,14 @@ let mapleader = ","
catch
echo "Failed opening file in vim."
endtry
elseif a:link =~# '^workspace:'
try
" chop off the leading file: - see :h expr-[:] for syntax:
execute ':split ' . '~/workspace/' . a:link[10:]
return 1
catch
echo "Failed opening workspace location in vim."
endtry
" elseif a:link =~# '^https\?:'
" try
" execute ':terminal lynx ' . a:link
@ -835,6 +845,7 @@ let mapleader = ","
" take some custom actions after reading a wiki page:
function! s:WikiBufReadPostOverrides()
" regenerate wiki pages with `%% exec-raw auto` on load
" XXX: don't run this for _logscratch files
if search("%% exec-raw auto", "nw")
call <SID>RunFilter("filter-exec-raw")
endif


Loading…
Cancel
Save