slhsxcmy / vscode-double-line-numbers

Display both absolute and relative line numbers in VSCode.
https://marketplace.visualstudio.com/items?itemName=slhsxcmy.vscode-double-line-numbers
GNU General Public License v3.0
9 stars 0 forks source link
visual-studio-code vscode vscode-extensions

Double Line Numbers

This is a Visual Studio Code extension that allows you adjust the display of line numbers to a combination of absolute and relative settings.

This should be helpful if you use one of the Vim plugins VSCodeVim, or are learning Vim like me.

The Visual Studio Code API doesn't support a great way to display anything on the left of the built-in line numbers. Therefore, "gutterIcon" is used to display the left line numbers as SVGs.

Any feedback or ideas are appreciated. If you find any bugs, please let me know through issues!

Installation

Commands

Open the command palette (Cmd/Ctrl + Shift + P) and run one of the following commands:

Known Issues

  1. Displaying gutter icons hides breakpoints. If you need to use breakpoints, you can do either of the following:

    • Turn off the left line numbers temporarily
    • Use the Relative + Absolute setting. The currently selected line does not have any gutter icon, so you can select the line first, then toggle the breakpoint.
  2. The gutter width cannot be adjusted, so if the left line number has more than 4 digits, the digits become really squeezed and slim. Hopefully your not editing such a long file... Related issues:

Acknowledgment

License

Links