Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>w4Buttons in ContextNew to Visual Studio Code? Get it now.
w4Buttons in Context

w4Buttons in Context

w4b.co.uk limited

|
5 installs
| (0) | Free
Context-sensitive editor toolbar buttons for Back, Forward, Save, Save All, Revert, Revert All, and Word Wrap in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

w4Buttons in Context

w4Buttons in Context keeps high-value VS Code editor toolbar buttons visible when they are actually useful.

It adds context-sensitive editor toolbar buttons for:

  • Back
  • Forward
  • Save File
  • Save All
  • Revert File
  • Revert All
  • Word Wrap

Instead of permanently occupying toolbar space, each button appears only when its action is relevant. This helps other editor actions stay visible when you need them.

Why Install It

  • keeps common editor toolbar actions close at hand
  • reduces extra clicks to the overflow menu
  • keeps the editor toolbar cleaner than always-on button sets
  • lets you enable or disable each contributed button individually

Why Not Use Always-On Toolbar Extensions?

VS Code's editor toolbar has limited visible space. When several extensions contribute editor actions, useful built-in buttons and extension buttons can move into the overflow menu.

w4Buttons in Context improves reachability by only showing editor toolbar buttons when they are useful in the current editor state.

What Appears When?

Button Appears when Action
Back Navigation is available and the button is enabled Runs VS Code's back navigation command
Forward Navigation is available and the button is enabled Runs VS Code's forward navigation command
Save File The active editor has unsaved changes and the button is enabled Saves the active file
Revert File The active editor has unsaved changes and the button is enabled Reverts the active file
Save All Another dirty file exists outside the active tab and the button is enabled Saves all dirty files
Revert All Another dirty file exists outside the active tab and the button is enabled Reverts open dirty text files across tab groups
Word Wrap The active editor contains a line longer than the configured threshold and the button is enabled Toggles word wrap and reflects the current wrap state

Features

Navigation When History Exists

Back and Forward are added to the editor toolbar when navigation is available, giving you access to editor history without opening menus.

Save And Revert For The Active File

Save File and Revert File appear when the active editor is dirty, so the actions you need for the current file are available when the file needs attention.

Save And Revert Across Other Dirty Files

Save All and Revert All appear when there is at least one dirty file outside the active tab. This helps when the file you are editing has no changes or is not the only file with pending changes.

Word Wrap For Long Lines

Word Wrap appears when the active document contains a line longer than the configured line length threshold.

The icon changes with the current wrap state:

  • dimmed if word wrap is off
  • undimmed when word wrap is on

Uses Native VS Code Actions

This extension surfaces native VS Code editor actions in the editor toolbar. It does not replace save, revert, navigation, or word wrap with a separate workflow.

Configuration

Every contributed button can be enabled or disabled individually in Settings.

Setting Default Effect
w4buttons-context.showBackButton true Shows the Back button
w4buttons-context.showForwardButton true Shows the Forward button
w4buttons-context.showRevertAllButton true Shows the Revert All button
w4buttons-context.showRevertFileButton true Shows the Revert File button
w4buttons-context.showSaveAllButton true Shows the Save All button
w4buttons-context.showSaveFileButton true Shows the Save File button
w4buttons-context.showWordWrapButton true Shows the Word Wrap button
w4buttons-context.wordWrapLineLength 120 Minimum line length before the Word Wrap button appears

Example:

{
  "w4buttons-context.showRevertAllButton": false,
  "w4buttons-context.wordWrapLineLength": 100
}

Known Issues

There are no known issues.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft