Browse Source

current state of vimrc

main
Brennen Bearnes 2 years ago
parent
commit
d24cdd10f1
1 changed files with 31 additions and 6 deletions
  1. +31
    -6
      home/.vim/vimrc

+ 31
- 6
home/.vim/vimrc View File

@ -390,12 +390,19 @@ let mapleader = ","
" set to 0 to have newlines in list items get rendered to <br>
let g:vimwiki_list_ignore_newline = 1
" disable table mappings:
let g:vimwiki_key_mappings =
\ {
\ 'table_mappings': 0,
\ 'table_format': 0
\ }
" hit ,S to debug current syntax highlighting groups
" https://vim.fandom.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor
"
" map <Leader>S :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
" \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
" \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
map <Leader>S :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
" map <Leader> b to go back - the plugin will check for this
" mapping and not associate it with regular backspace (which
@ -852,6 +859,9 @@ let mapleader = ","
" view backlinks for current file
map <Leader>wL :call <SID>NotesLinksForFile()<CR>
" view summary for current wiki page
map <Leader>wS :call <SID>NotesMeta()<CR>
map <Leader>. :call <SID>VimwikiMakeLink()<CR>
map <Leader>J :call <SID>VimwikiJumpToPage()<CR>
@ -1096,7 +1106,7 @@ let mapleader = ","
" Make a link from an fzf-found page or known tag name:
function! s:VimwikiMakeLink()
call fzf#run({
\ 'options': ["--reverse", "--multi", "--preview=notes-tag-summary {}"],
\ 'options': ["--reverse", "--multi", "--preview=notes-tag-summary --color {}"],
\ 'sink': function("<SID>AppendAtCursorAsVimwikiLink"),
\ 'source': "notes-tag-index",
\ 'up': '50%'
@ -1117,7 +1127,7 @@ let mapleader = ","
" Jump to an fzf-found page or known tag name:
function! s:VimwikiJumpToPage()
call fzf#run({
\ 'options': ["--reverse", "--multi", "--preview=notes-tag-summary {}"],
\ 'options': ["--reverse", "--multi", "--preview=notes-tag-summary --color {}"],
\ 'sink': function("<SID>VimwikiGotoPage"),
\ 'source': "notes-tag-index",
\ })
@ -1149,6 +1159,20 @@ let mapleader = ","
lopen
endfunction
" Jump to an fzf-found page or known tag name:
function! s:NotesMeta()
let realpath = system('readlink -fn ' . shellescape(expand('%')))
let hash = sha256(realpath)
echom 'Finding logs for ' . realpath
botright new
" XXX: This should use the current wiki, not a harcoded path:
execute 'edit ~/notes/vimwiki/_logscratch/meta-' . hash . '.wiki'
1,$d " delete everything in file
execute '$read !' . 'notes tag-summary --file ' . shellescape(realpath)
0delete " delete blank first line - get rid of this if you need debug msgs
1
endfunction
" get a list of key bindings, along with where they were defined, and
" open it in a tab. this variant of redir and map seen at:
" https://stackoverflow.com/questions/7642746/is-there-any-way-to-view-the-currently-mapped-keys-in-vim#7642762
@ -1178,7 +1202,8 @@ let mapleader = ","
" colorscheme peppers
" colorscheme inkpot
" colorscheme ingretu
colorscheme iceberg
" colorscheme iceberg
colorscheme impact
" colorscheme earthburn
" }}}


|||||||
x
 
000:0
Loading…
Cancel
Save