Some useful functions for efficiency.
Efficiency: Convert To English Punctuation: Converts all punctuation to English punctuationEfficiency: Convert To Chinese Punctuation: Converts all punctuation to Chinese punctuation
Efficiency: Generate Markdown Table:
Convert selected text to a Markdown table or generate a default table. e.g.,
Select Text Name, Age will change it to the following:
| Name | Age |
| ---- | --- |
| | |
- Merge multiple files into one file, which is useful for providing context for Ask AI.
- Combined with this Google Chrome extension chatgpt-cli-extension to query ChatGPT with multiple files.
Settings:
efficiency.openAfterMerge: Open the merged file after merging; default istrueefficiency.shellAfterMerge: Shell to execute after merging paths. Leave empty to disable.${file}will be replaced with the merged file path.
Commands:
Efficiency: Create Merge Config File: Create a merge configuration file for theMerge Paths To Single Filecommand.Efficiency: Merge Paths To Single File: Merge all paths in the configuration file into a single file.
Settings:
efficiency.defaultShell: Default shell command to open an external terminal; default issh.exe --login -i
Commands:
efficiency.openExternalShellByWorkspaceFolder: Open an external shell by workspace folderefficiency.openExternalShellByCurrentFile: Open an external shell by current file
Bind a shell command to a keybinding, for example:
{
"key": "alt+shift+1",
"command": "efficiency.execShellCommand",
"args": {
"silent": true,
"shell": "echo ${file}"
}
}Supported variables:
| Name | Description |
|---|---|
${workspaceFolder} |
The workspace folder of the current file |
${file} |
The current file path |
${fileDirname} |
The current file’s directory |
${fileBasename} |
The current file name |
${fileBasenameNoExtension} |
The current file name without extension |
${selectionFile} |
The file which contains the selected text |
${selection} |
The selected text or the text expanded at cursor |
Automatically change the Windows path separator when pasting paths.
Settings:
efficiency.pastePathConvert.enabled: Enable automatic change of the path separator when pasting paths; default istrue
- Configure
efficiency.customShellCommandsin settings. Example:
- Run command:
Efficiency: Show Custom Shell Command List