Skip to content

Commit

Permalink
使用例の設定をdocに追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kamecha committed Aug 30, 2024
1 parent 29eccc2 commit a98b49e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions doc/traqvim.jax
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,38 @@ type (string)
Default: "all"


==============================================================================
FAQ *traqvim-faq*


FAQ 1: |traqvim-faq-1|
How to display image with sixel?

------------------------------------------------------------------------------
*traqvim-faq-1*
Q: How to display image with sixel?

A: install `denops-sixel-view.vim` plugin. and you have to set function like
bellow.

https://github.com/gw31415/denops-sixel-view.vim

>
function s:preview_img(fileId) abort
let file = denops#request("traqvim", "getFile", [a:fileId])
call sixel_view#view_sixel(file['data'], 0, 0)
endfunction
function s:preview_cursor_img() abort
let cursor_url = getline('.')
let fileId = matchstr(cursor_url, 'https://q.trap.jp/files/\zs.*')
call s:preview_img(fileId)
endfunction
nnoremap <buffer><silent> K
\ <Cmd>call <SID>preview_cursor_img()<CR>
<

==============================================================================
TODO *traqvim-todo*

Expand Down

0 comments on commit a98b49e

Please sign in to comment.