This is a plug-in for SiYuan Note that can highlight the currently edited block and automatically scroll it to the center of the editing area.
-
Focus Display
-
Show the currently edited block (block where the cursor is located) in the editor
- Each currently edited block (cell in a table) in the editor will have the attribute
data-plugin-focus="true"
- The currently edited block (cell where the cursor is located) will have the
id
attributeplugin-focus-unique-id
- Each currently edited block (cell in a table) in the editor will have the attribute
-
CSS
style variables can be modified in SiYuan Settings > Appearance > Code Snippet-
:root { /* Focus shadow blur radius */ --custom-focus-shadow-blur: 0.25em; /* Focus shadow color */ --custom-focus-shadow-color: var(--b3-theme-secondary); /* Global unique focus shadow color */ --custom-focus-unique-shadow-color: var(--b3-theme-primary); /* Outline width of the table row with focus */ --custom-focus-table-row-outline-width: 1px; /* Outline color of the table row with focus */ --custom-focus-table-row-outline-color: var(--b3-theme-on-surface); /* Shadow blur radius of the table cell with focus */ --custom-focus-table-cell-shadow-blur: 0.25em; }
-
-
-
Typewriter Mode
-
Keep the currently edited block (block where the cursor is located) in the middle of the editor
- If the cursor is in a table block, the cell where the cursor is located can be kept in the middle of the editor
- If the cursor is in a code block, the line where the cursor is located can be kept in the middle of the editor
-
This mode can be enabled/disabled in the following ways
- This Plugin Settings Panel > Typewriter Settings > Enable Typewriter Mode
Typewriter Mode
button in the top-right corner of the menu bar- Shortcut key Shift + Alt + T
- Command Palette option
Toggle Typewriter Mode
-
-
General Settings
-
Reset Settings
- This button will reset all settings to their default values
- The page will be refreshed after resetting
-
-
Focus Settings
-
Display Current Focus
-
When enabled, the currently edited block will be highlighted in the editor (outline will be added to the currently edited block)
- The element of the currently edited block will have attributes
data-plugin-focus="true"
andid="plugin-focus-unique-id"
- The element of the currently edited block will have attributes
-
When disabled, the currently edited block will no longer be highlighted
- All attributes
data-plugin-focus="true"
andid="plugin-focus-unique-id"
will be removed
- All attributes
-
This option does not apply the features of Typewriter Mode
-
-
-
Typewriter Settings
-
Enable Typewriter Mode
- When enabled, the block where the cursor is located will automatically scroll to the middle of the editor while editing
-
Code Block Line Focus Follow
- When enabled, the line of code where the cursor is located will be scrolled to the middle of the editor while editing a code block
- When disabled, the code block will be scrolled to the middle of the editor while editing a code block
-
Table Block Cell Focus Follow
- When enabled, the table cell where the cursor is located will be scrolled to the middle of the editor while editing a table block
- When disabled, the table block will be scrolled to the middle of the editor while editing a table block
-
Database Block Cell Focus Follow
- When enabled, the cell where the cursor is located will be scrolled to the middle of the editor while editing a database block (property view).
- When disabled, the entire database block will be scrolled to the middle of the editor while editing a database block (property view).
-
Scroll Delay
- After the cursor moves to another block, the block where the cursor is located will scroll to the middle of the editor after a certain delay
- Unit: Milliseconds
-