A VS Code extension that allows you to highlight and manage selected lines in your code through a dedicated sidebar view.
Problem Statement
Developers frequently have to move between different areas of the codebase when working on multiple files, particularly when refactoring or comprehending intricate business logic. It can be annoying and time-consuming to constantly switch between tabs and scroll through lengthy documents. It's simple to forget crucial code segments you were working on, which can reduce output and add to mental strain.
FocusLn addresses this issue by offering a specific sidebar view that facilitates:
Maintain track of crucial code segments in several files; swiftly move between your main points of interest
Preserve context without becoming bogged down in tabs and scroll positions
Effectively arrange your areas for work-in-progress.
Features
Highlight selected lines with a customizable background
View all highlighted lines in a dedicated sidebar tree view
Support for multiple line selections
Optional persistence of highlighted lines between VS Code sessions
Quick navigation to highlighted lines
Usage
Highlighting Lines
Select the lines you want to highlight in your code
Either:
Click the "Highlight" (Bookmark icon) button in the FocusLn sidebar
Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) and type "FocusLn: Highlight"
The selected lines will be highlighted and appear in the FocusLn sidebar
Managing Highlighted Lines
The FocusLn sidebar provides several ways to manage your highlighted lines:
View all highlighted lines organized by file
Click on any highlighted line to navigate to it
Use the "X" button next to each line to remove it
Use the "Clear All" button in the toolbar to remove all highlights
Persistence
The extension can optionally persist highlighted lines between VS Code sessions:
Open VS Code Settings (Ctrl+, or Cmd+,)
Search for "FocusLn"
Enable "Persist Highlights" to save highlighted lines between sessions
When enabled (default), your highlighted lines will be restored when you reopen VS Code
Requirements
VS Code version 1.85.0 or higher
Extension Settings
This extension contributes the following settings:
focusln.persistHighlights: Enable to persist highlighted lines between VS Code sessions
And the following commands:
focusln.highlightLines: Command to highlight selected lines
focusln.clearLines: Command to clear highlighted lines in the current document
focusln.clearAllLines: Command to clear all highlighted lines in all documents