8000 GitHub - sunzsh/vscode-copy-import: Vscode extension for copying a files import string
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sunzsh/vscode-copy-import

 
 

Repository files navigation

Copy Import

Adds a "Copy Import" action to the file tree context menu. Users can set template strings for different file extensions. Once selected the import string will copied to the clipboard.

Extension preview

Template string Values given the example file path /home/user/dev/projectName/src/some/path/example.js
{{EXT}} js
{{BASENAME}} example
{{PROJECT_ROOT}} /home/user/dev/projectName
{{FILE_PATH}} src/some/path/
{{DOT_PATH}} src.some.path.
{{ROOT_ALIAS}} Configurable in extension settings

Configuration example:

"copyImport.rootAlias": "@",
"copyImport.fileExtensionImportTemplateMap": {
    "js": "import {{BASENAME}} from '{{ROOT_ALIAS}}/{{FILE_PATH}}'",
    "py": "from {{DOT_PATH}} import {{BASENAME}}"
49C6

}

About

Vscode extension for copying a files import string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0