Ctrl+P
This is vscode perltidy extension that supports VSCode's edit line only format ("editor.formatOnSaveMode": "modifications")
"editor.formatOnSaveMode": "modifications"
{ "[perl]": { "editor.defaultFormatter": "kimuson.perltidy-vscode", "editor.formatOnSaveMode": "modifications", "editor.formatOnSave": true, }, }