basyura's blog

あしたになったらほんきだす。

inkdrop - narrow tag

Inkdrop v5.8 のβを動かしたら、 React.Component を継承してて refs を使っている plugin が動かなくなっていた。常に使っているので勉強がてら関数 hook 式?に修正。

switch-notebookswitch-note を元に fork してそれぞれに作っていたけど、タグ版が無いのでまずはリリース。switch-tag の名前でずっと個人的に使っていたけど、note と book も合わせてリリースしようと考えているのでプレフィックスを narrow にした。

Inkdrop v5.8 で嬉しい機能はカーソル位置を覚えてくれるようになったことかな。ノートを行き来することがまぁまぁあって、

'ctrl-o': 'core:navigate-back'
'ctrl-i': 'core:navigate-forward'

のキーで移動することがあるけど、カーソルが一番上に戻るのは微妙だなぁと前から思っていた。致命傷というほどではないけど。

Remember the scroll positions
When writing a note while referring to other notes, it was frustrating to always get the cursor and scroll positions to be reset when going back to the note. In order to help you work with multiple notes efficiently, v5.8.0 now remembers the cursor and scroll positions in the navigation history.

In the above example, when clicking a backlink, the cursor position is already where the new link is created.

複数ノートを扱うときの効率性は継続検討中。