Skip to content

Commit

Permalink
Merge pull request #79 from kamecha/refacter/delete-default-keymap
Browse files Browse the repository at this point in the history
デフォルトキーマップを廃止して色々整理
  • Loading branch information
kamecha authored Jul 5, 2024
2 parents a1cc784 + 3592c53 commit ac5b55f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 22 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ ddu-ui-filer
ddcとの連携
![image](https://user-images.githubusercontent.com/50443168/221398079-da91a873-5f8d-4c5a-af1c-650e4b88e09b.png)

## 設定

```vim
" for keymap
autocmd FileType traqvim call s:traqvim_setting()
function s:traqvim_setting()
omap <buffer> im
\ <Plug>(traqvim-motion-message)
nmap <buffer> <LocalLeader>y
\ <Plug>(traqvim-operator-message-yank-link)
nmap <buffer> <LocalLeader>Y
\ <Plug>(traqvim-operator-message-yank-markdown)
nmap <buffer> <LocalLeader>d
\ <Plug>(traqvim-operator-message-delete)
nmap <buffer> <LocalLeader>p
\ <Plug>(traqvim-operator-pin-toggle)
endfunction
```

## 今後の展望

WebSocketとか実装して、手動リロードしなくてもいいようにしたいなぁ...
16 changes: 16 additions & 0 deletions doc/traqvim.jax
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ g:traqvim#token_file_path
<Plug>(traqvim-prev) *<Plug>(traqvim-prev)*
前のメッセージへカーソルを移動させます

<Plug>(traqvim-motion-message) *<Plug>(traqvim-motion-message)*
カーソル下の該当メッセージの始まり・終わりを選択します
レイアウトで表示されるものが選択されます

<Plug>(traqvim-operator-message-yank-link) *<Plug>(traqvim-operator-message-yank-link)*
該当メッセージのリンクをヤンクします

<Plug>(traqvim-operator-message-yank-markdown) *<Plug>(traqvim-operator-message-yank-markdown)*
該当メッセージのリンクをマークダウン形式でヤンクします

<Plug>(traqvim-operator-message-delete) *<Plug>(traqvim-operator-message-delete)*
該当メッセージを削除します

<Plug>(traqvim-operator-pin-toggle) *<Plug>(traqvim-operator-pin-toggle)*
該当メッセージのピンをトグルします

------------------------------------------------------------------------------
レイアウト *traqvim-channel-layout*

Expand Down
2 changes: 0 additions & 2 deletions ftplugin/traqvim-message.vim

This file was deleted.

25 changes: 5 additions & 20 deletions ftplugin/traqvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,18 @@ nnoremap <buffer><silent> <Plug>(traqvim-next)
nnoremap <buffer><silent> <Plug>(traqvim-prev)
\ <Cmd>call traqvim#message_prev()<CR>
nnoremap <buffer><expr> <Plug>(traqvim-yank-message-link-operator)
nnoremap <buffer><expr> <Plug>(traqvim-operator-message-yank-link)
\ traqvim#registerYankMessageLink()
nnoremap <buffer><expr> <Plug>(traqvim-yank-message-markdown-operator)
nnoremap <buffer><expr> <Plug>(traqvim-operator-message-yank-markdown)
\ traqvim#registerYankMessageMarkdown()
nnoremap <buffer><expr> <Plug>(traqvim-delete-message-operator)
nnoremap <buffer><expr> <Plug>(traqvim-operator-message-delete)
\ traqvim#registerDeleteMessage()
nnoremap <buffer><expr> <Plug>(traqvim-toggle-pin-operator)
nnoremap <buffer><expr> <Plug>(traqvim-operator-pin-toggle)
\ traqvim#registerTogglePin()
onoremap <silent> <Plug>(traqvim-message-motion)
onoremap <buffer><silent> <Plug>(traqvim-motion-message)
\ :<C-u>call traqvim#message_motion()<CR>
omap <buffer> im
\ <Plug>(traqvim-message-motion)
nmap <buffer> <LocalLeader>y
\ <Plug>(traqvim-yank-message-link-operator)
nmap <buffer> <LocalLeader>Y
\ <Plug>(traqvim-yank-message-markdown-operator)
nmap <buffer> <LocalLeader>d
\ <Plug>(traqvim-delete-message-operator)
nmap <buffer> <LocalLeader>p
\ <Plug>(traqvim-toggle-pin-operator)
command! -buffer -nargs=0 TraqYankMessageLink
\ call denops#request('traqvim', 'yankMessageLink', [traqvim#get_message()])
command! -buffer -nargs=0 TraqYankMessageMarkdown
Expand Down

0 comments on commit ac5b55f

Please sign in to comment.