atom / fuzzy-finder

Find and open files quickly
MIT License
276 stars 138 forks source link

Add feature to insert a file's relative path into the active document #186

Open matiasdelgado opened 8 years ago

matiasdelgado commented 8 years ago

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

magicdawn commented 4 years ago

Atom have exist plugins for

But since I used that vscode plugin, that's more convenient.