Swak Heading Jump

by keigookubo
5
4
3
2
1
Score: 50/100

Description

Align headings to the top of the editor when jumping from the Obsidian outline.

Reviews

No reviews yet.

Stats

0
stars
10
downloads
0
forks
4
days
4
days
4
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
1
commits

Latest Version

5 days ago

Changelog

Initial release. Aligns headings to the top of the editor when you jump to them from the outline in Live Preview or Source mode. / 編集モードで目次から見出しへ移動したとき、見出しを画面の一番上にそろえます。

README file from

Github

Swak Heading Jump

GitHub release License: MIT

Overview / 概要

English

In Live Preview and Source mode, clicking a heading in the Outline sometimes moves the cursor without bringing the heading to the top of the editor. Swak Heading Jump aligns the heading to the top every time.

日本語

ライブプレビュー・ソースモードで目次の見出しをクリックしても、カーソルだけが移動して見出しが画面の上に来ないことがあります。Swak Heading Jumpは、見出しを毎回画面の一番上にそろえます。

How it works / 動き

English

  • Click a heading in the Outline (or press Enter) to place it 8px below the top of the editor.
  • Tables and callouts that finish rendering late can shift the position. The plugin keeps checking for about 0.6 seconds and corrects the shift.
  • Scrolling, clicking, or typing during that time stops the correction.
  • Reading view keeps Obsidian's standard behavior.

日本語

  • 目次の見出しをクリック(またはEnter)すると、その見出しを画面上端から8pxの位置にそろえます。
  • 表やコールアウトの描画が遅れて位置がずれる分は、約0.6秒のあいだ確認して補正します。
  • 補正中にスクロール・クリック・キー操作をすると、そこで補正をやめます。
  • 閲覧モードはObsidian標準の動きのままです。

Privacy and safety / 安全性

English

  • No network access.
  • Does not read or write note files. Heading positions come from Obsidian's heading index.
  • No settings file is created.

日本語

  • 通信は行いません。
  • ノートファイルの読み書きは行いません。見出しの位置はObsidianの見出し一覧から取得します。
  • 設定ファイルも作りません。

Installation / 導入

English

Install from Community plugins in Obsidian, or place main.js and manifest.json in .obsidian/plugins/swak-heading-jump/ in your vault and enable the plugin.

日本語

Obsidianのコミュニティプラグインからインストールするか、main.js と manifest.json をVaultの .obsidian/plugins/swak-heading-jump/ に置いて有効にしてください。

Development / 開発

npm install
npm test

The test uses CodeMirror 6 with blocks that grow after rendering. It checks that headings align to the top, that user input stops the correction, and that outline text matches heading text.

テストは、描画後に高さが伸びる部品を含むCodeMirror 6で、見出しが上端にそろうこと、利用者の操作で補正が止まること、目次の表示文字と見出しの照合を確認します。

License

MIT © Swak Inc.