Seamlessly switch between absolute and relative line numbers with a single command. Perfect for developers who need both numbering styles in their workflow.
Features
🔄 Dynamic Line Number Toggle
One-Click Switch: Instantly toggle between absolute and relative line numbers
Context-Aware: Use absolute numbers when discussing code, relative numbers for quick navigation
Preserves Settings: Remembers your original line number settings when deactivated
🎯 Enhanced Go to Line
Jump to any line using absolute or relative numbers
Use +N or -N for relative jumps (e.g., +5 to jump 5 lines down)
Perfect complement to relative line numbers for precise navigation
Usage
Toggle Line Numbers
Press Cmd/Ctrl + Shift + P to open the command palette
Type "Toggle Line Numbers Mode" and select the command
Go to Line
Press Alt/Option + G (default keybinding)
Type a number for absolute jump (e.g., "15")
Or type +/- for relative jump (e.g., "+5" or "-3")
Why Hybrid Line Numbers?
Code Reviews: Use absolute numbers when referencing specific lines in pull requests
Efficient Navigation: Switch to relative numbers for quick up/down movements
Best of Both Worlds: No need to choose between absolute and relative - have both at your fingertips
Installation
Open VS Code
Go to Extensions (Cmd/Ctrl + Shift + X)
Search for "Hybrid Line Numbers"
Click Install
Extension Settings
This extension contributes the following commands:
hybrid-line-numbers.toggle: Toggle between absolute and relative line numbers
hybrid-line-numbers.gotoLine: Open enhanced Go to Line dialog