Skip to content

About

Obsidian plugin to keep your cursor centered, disable code wrapping, remember position in a file, and more.

Topics

Resources

Contributing

Stars

28 stars

Watchers

1 watching

Forks

Repository files navigation

Scrolling

A plugin to improve and extend scrolling and navigation in Obsidian with quality-of-life features.

Quick overview:

  • Centered Cursor: Keep cursor centered while editing
  • Remember Scroll Position: Auto-save and restore scroll/cursor position
  • Horizontal Scrolling
    • Code Wrapping: Prevent code wrapping
    • MathJax: Sideways crolling of long inline MathJax
    • File Tree: Sideways scrolling in the file tree
  • Scroll buttons & Shortcuts
    • Scroll buttons & Quick commands: Adds buttons for navigating to the top and bottom of the note
    • Shortcuts for Reading Mode: Vim-like navigation shortcuts in reading mode
  • Scrollbar appearance: Always hide or show scrollbars, or dynamically show during scroll
  • Line Length: Change maximum line width for readability

All features are optional and fully configurable in plugin settings.

Features

Centered Cursor

  • Automatically scrolls the view to keep the text cursor near the center while editing or navigating
  • Also known as 'typewriter mode', 'cursor surrounding lines' in VSCode or 'scrolloff' in Vim
  • Configurable trigger distance and animation smoothness
  • Works seamlessly with Markdown tables and Vim mode

Centered cursor preview

Code Wrapping

  • Disable code wrapping and allow horizontal scrolling
  • Works in both source mode and preview mode

Code blocks preview

Remember Scroll Position

  • Saves your scroll or cursor position when closing a file
  • Restores the position when reopening the file later
  • Works for Markdown files, PDF files, and canvases

Restore scroll preview

Horizontal Scrolling of Inline MathJax

  • Make inline MathJax expressions scrollable
  • This prevents long formulas from extending the viewport

MathJax preview

Horizontal Scrolling in File Tree

  • Allow horizontal scrolling in the file tree to see long file names
  • Desktop only

Filetree preview

Scrollbar Customization

  • Adjust visibility: always show, show while scrolling, or hide
  • Adjust scrollbar width (Linux only)

Line Length

  • Set the maximum line length as pixels, characters or percentage

Line length preview

Reading Mode Keybinds

Enable Vim-like keybinds in reading mode:

  • j - Scroll down one line
  • k - Scroll up one line
  • d - Scroll down half a page
  • u - Scroll up half a page
  • G - Jump to bottom
  • g - Jump to top

Installation

From Obsidian Community Plugins

  1. Open Settings → Community Plugins in Obsidian
  2. Click Browse and search for "Scrolling"
    Or open directly: obsidian://show-plugin?id=scrolling
  3. Click Install, then Enable
  4. Configure the plugin under Settings → Community Plugins → Scrolling

Manual Installation

# Navigate to your vault's plugin directory
cd /path/to/vault/.obsidian/plugins

# Clone the repository
git clone https://github.com/omeyenburg/obsidian-scrolling.git

# Install dependencies and build
cd obsidian-scrolling
npm install
npm run build

Then enable the plugin under Community Plugins in Obsidian.

Changelog

See Releases for version history.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request. See CONTRIBUTING for further information.

Similar Projects

If you're interested in scrolling enhancements, you might also like:

License

MIT License. See LICENSE for details.

About

Obsidian plugin to keep your cursor centered, disable code wrapping, remember position in a file, and more.

Topics

Resources

Contributing

Stars

28 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages