Scrolling

approved

by omeyenburg

Improve scrolling and keep your cursor exactly where you want it.

21 stars3,870 downloadsUpdated 1mo agoMIT
View on GitHub

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
  • Code Wrapping: Disable code wrapping & allow horizontal scrolling
  • Remember Scroll Position: Auto-save and restore scroll/cursor position
  • Image Zooming: Scroll to zoom images with Ctrl key
  • MathJax: Allow horizontal scrolling of long inline MathJax
  • File Tree: Allow horizontal scrolling in the file tree
  • Line Length: Customize maximum line width for readability
  • Scrollbars: Hide, show, or auto-show scrollbars
  • Reading Mode Keybinds: Vim-like navigation in reading mode
  • Mouse & Touchpad Scrolling: Customize mouse & touchpad scroll speed

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

Image Zooming

  • Hover over an image, hold Ctrl and scroll to zoom in where your mouse points
  • Desktop only
Image zoom 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

Mouse & Touchpad Scrolling

  • Adjust scroll speed and smoothness for mouse and touchpad
  • Desktop only

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.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.