Compare commits
No commits in common. "d6d23f913b991fc046d89b44af48d14a2277437d" and "1b62acfc8059d1d946645d5eb4c90b41b6569228" have entirely different histories.
d6d23f913b
...
1b62acfc80
|
@ -1,6 +0,0 @@
|
||||||
function! SynGroup()
|
|
||||||
let l:s = synID(line('.'), col('.'), 1)
|
|
||||||
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
|
||||||
endfun
|
|
||||||
|
|
||||||
com! -nargs=0 Syn :call SynGroup()
|
|
35
.vimrc
35
.vimrc
|
@ -62,6 +62,7 @@ nn s= <c-w>=| " Equalize splits
|
||||||
nn sb :Lex<cr>| " File tree
|
nn sb :Lex<cr>| " File tree
|
||||||
nn <leader><leader> :noh<cr> |"
|
nn <leader><leader> :noh<cr> |"
|
||||||
nn <leader>t :term<cr>| " Open terminal
|
nn <leader>t :term<cr>| " Open terminal
|
||||||
|
nn <leader>o :!xdg-open http://localhost:8080/%:t:r.html & <cr>
|
||||||
" Remaps
|
" Remaps
|
||||||
ino <nowait> jj <esc>| " Normal now
|
ino <nowait> jj <esc>| " Normal now
|
||||||
nn <left> <nop>| " Hard mode
|
nn <left> <nop>| " Hard mode
|
||||||
|
@ -221,7 +222,11 @@ let g:pandoc#syntax#conceal#cchar_overrides = { "atx": " ", "li": "·" }
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
" `euclio/vim-markdown-composer` {{{
|
||||||
|
|
||||||
|
let g:markdown_composer_custom_css = ['file:///home/h/.zk/pandoc.css']
|
||||||
|
let g:markdown_composer_external_renderer='pandoc -f markdown+latex_macros-yaml_metadata_block -t html5 --mathjax --bibliograph /home/h/.zk/references.bib --citeproc --lua-filter=/home/h/.wiki/lua-filters/diagram-generator/diagram-generator.lua --lua-filter=/home/h/.wiki/filters/html-links.lua --lua-filter=/home/h/.zk/filters/tikz.lua'
|
||||||
|
let g:markdown_composer_autostart = 0
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
@ -361,31 +366,23 @@ au FileType javascript set mps+==:;
|
||||||
" JSONC (see https://github.com/neoclide/jsonc.vim/pull/9")
|
" JSONC (see https://github.com/neoclide/jsonc.vim/pull/9")
|
||||||
au BufNewFile,BufRead */.vscode/*.json setlocal filetype=jsonc
|
au BufNewFile,BufRead */.vscode/*.json setlocal filetype=jsonc
|
||||||
|
|
||||||
let s:zk_preview_enabled = 0
|
" Hacky way to pass on active note to script for automated for HTML preview
|
||||||
let s:live_server_job = -1
|
au BufEnter /home/h/.zk/*.md silent exe '!echo % > /home/h/.zk/current-zettel.txt'
|
||||||
au BufEnter /home/h/.zk/*.md silent exe '!echo "%" > /home/h/.zk/current-zettel.txt'
|
au BufEnter /home/h/.zk/*.md silent exe '!cat %:r.html > /home/h/.zk/current-zettel-content.html'
|
||||||
function! ToggleZKPreview()
|
|
||||||
if s:zk_preview_enabled == 1
|
|
||||||
let s:zk_preview_enabled = 0
|
|
||||||
call jobstop(s:live_server_job)
|
|
||||||
au! ZKPreview
|
|
||||||
else
|
|
||||||
let s:zk_preview_enabled = 1
|
|
||||||
let s:live_server_job = jobstart('live-server --watch=/home/h/.zk/current-zettel-content.html --open=current-zettel-content.html --port=8080')
|
|
||||||
augroup ZKPreview
|
|
||||||
au BufEnter /home/h/.zk/*.md silent exe '!cat "%:r.html" > /home/h/.zk/current-zettel-content.html'
|
|
||||||
au BufWritePost /home/h/.zk/*.md silent exe '!make && cat "%:r.html" > /home/h/.zk/current-zettel-content.html'
|
|
||||||
augroup END
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
command! ToggleZKPreview call ToggleZKPreview()
|
|
||||||
|
|
||||||
nn <leader>o :ToggleZKPreview<cr> :!xdg-open http://localhost:8080/%:t:r.html & <cr>
|
" }}}
|
||||||
|
|
||||||
highlight QuickScopeSecondary cterm=underline
|
highlight QuickScopeSecondary cterm=underline
|
||||||
highlight QuickScopePrimary ctermbg=253 ctermfg=232 cterm=none
|
highlight QuickScopePrimary ctermbg=253 ctermfg=232 cterm=none
|
||||||
highlight Pmenu ctermfg=232
|
highlight Pmenu ctermfg=232
|
||||||
|
|
||||||
|
function! SynGroup()
|
||||||
|
let l:s = synID(line('.'), col('.'), 1)
|
||||||
|
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
||||||
|
endfun
|
||||||
|
|
||||||
|
com! -nargs=0 Syn :call SynGroup()
|
||||||
|
|
||||||
" Taken from /usr/share/vim/vim90/defaults.vim
|
" Taken from /usr/share/vim/vim90/defaults.vim
|
||||||
augroup vimStartup
|
augroup vimStartup
|
||||||
au!
|
au!
|
||||||
|
|
Loading…
Reference in New Issue