This VSCode extension allows the user to run actions (such as format, organize imports) on one or multiple files from the context menu.
- Run actions on one or multiple files from Explorer Context Menu
- Run actions on one or multiple files from SCM Context Menu
- Run actions on one file from Editor File Tile Context Menu
This extension contributes the following settings:
contextMenuActions.save
: enable/disable saving after applying actions (default:true
).contextMenuActions.close
: enable/disable closing closing after saving (default:false
). This does nothing unless you have enabled saving after formatting.contextMenuActions.actions
: a list of vscode actions to run for each file. Default:
[
"editor.action.organizeImports",
"editor.action.formatDocument"
]
WARNING: While contextMenuActions
technically supports any editor/workspace action in VSCode, it is only tested for organize imports and formatting the document. Use other values at your own risk!
Forked from Format in context menus