Add a new shortcut to launch the fuzzy-finder, but instead of opening the selected file, just insert the relative path into the document. This would be useful when working with less files (to reference other less files) or importing ES6 modules.
Example:
Press cmd-shift-i
The fuzzy-finder is displayed
select a file
Calculate the relative path of the file, according to the active document
insert relative path
Folder structure example
document.js
style.less
folder
document2.js
style2.less
If the document2.js is the active one, I'd like to be able to select the document.js using the fuzzy-finder, and insert the text ../document where the cursor is located.
This feature would help to write: import MyClass from "../document".
Similarly with the less file: @import "../style"
I do not expect it to write the entire line, but just the path of the file. The way I envision this feature, it would be necessary to remove the file extension.
Add a new shortcut to launch the fuzzy-finder, but instead of opening the selected file, just insert the relative path into the document. This would be useful when working with less files (to reference other less files) or importing ES6 modules.
Example:
Folder structure example
If the document2.js is the active one, I'd like to be able to select the document.js using the fuzzy-finder, and insert the text
../document
where the cursor is located. This feature would help to write:import MyClass from "../document"
. Similarly with the less file:@import "../style"
I do not expect it to write the entire line, but just the path of the file. The way I envision this feature, it would be necessary to remove the file extension.This feature is implemented in this VSCode plugin