Flash VSCode
Table of Contents
Overview
Flash VSCode is a minimal port of the flash.nvim Neovim plugin, bringing fast, label-based code navigation to Visual Studio Code.
Installation
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X on Windows/Linux or Cmd+Shift+X on macOS).
- Search for Flash VSCode.
- Click Install.
- Reload VS Code if prompted.
Usage
Activate Navigation:
Flash VSCode provides two main functionalities:
flash-vscode.start: Moves the cursor directly to the selected target.
flash-vscode.startSelection: Extends the selection from the original position to the target.
Cancel Navigation:
- Press
Backspace to remove the last character of your query, or press Escape to exit jump mode.
Configuration
Case Sensitivity
By default, flash-vscode's search is case sensitive. To change this behavior, add to your settings:
{
"flash-vscode.caseSensitive": false
}
VSCodeVim Integration
To invoke Flash VSCode commands from VSCodeVim, in your settings.json, add entries to "vim.normalModeKeyBindingsNonRecursive" as follows:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["s"],
"commands": ["flash-vscode.start"]
},
{
"before": ["S"],
"commands": ["flash-vscode.startSelection"]
},
{
"before": [ "<BS>" ],
"commands": [ "flash-vscode.backspace" ]
},
]
This configuration triggers Flash VSCode when you press s or S in normal mode.
Appearance Customization
The following configuration options allow you to customize the visual appearance of Flash VSCode:
{
"flash-vscode.dimColor": "rgba(128, 128, 128, 0.5)",
"flash-vscode.matchColor": "rgb(0,191,255)",
"flash-vscode.matchFontWeight": "normal",
"flash-vscode.labelColor": "black",
"flash-vscode.labelBackgroundColor": "#a3be8c",
"flash-vscode.labelQuestionBackgroundColor": "#ebcb8b",
"flash-vscode.labelFontWeight": "normal"
}
flash-vscode.dimColor: Color used to dim text.
flash-vscode.matchColor: Color used for matched text.
flash-vscode.matchFontWeight: Font weight for matched text.
flash-vscode.labelColor: Color used for label text.
flash-vscode.labelBackgroundColor: Background color for labels.
flash-vscode.labelQuestionBackgroundColor: Background color for question labels.
flash-vscode.labelFontWeight: Font weight for label text.
Acknowledgements