FuzzyFilePath icon indicating copy to clipboard operation
FuzzyFilePath copied to clipboard

Insert path relative to the current file

Open gtaifu opened this issue 9 years ago • 1 comments

Maybe due to I am a newbie to use this package, I did not find the way to insert the path of a file relative to the current file. I would like to ask this question, so the issue might be the best place for me to ask this question. Is it possible to do so?

To be more precise, see the following example: Suppose I have the following directory structure:

.
+-- README.md
+-- src
|   +-- moduleA
|   |   +-- main.ccp
|   |   +-- a.lib
|   |   +-- ...
|   +-- moduleB
|   |   + fileA.cpp
|   |   + fileB.cpp
+-- others

When I work in the file main.cpp, I would like to insert the relative path to fileA.cpp. So I would like to insert ../moduleB/fileA.cpp into the file main.cpp.

gtaifu avatar Sep 11 '17 14:09 gtaifu

Well. We are all newbies because the configuration of triggers is currently too complex. Have you seen the Tutorial for Python? This might help a bit.

Basically you need to add a custom trigger for your scope in a c-source. Those triggers are found in FuzzyFilePath-Settings-Default in the property scopes. Your autocomplete-action, either done by the key-shortcut or the auto-option in a trigger (an object in scopes), will check for a matching scope and propose the given file-types defined in the objects extensions list.

Just ask the next question. This week will be tough, but i try to continue this discussion until it is resolved.

Regards, sagold

sagold avatar Sep 16 '17 20:09 sagold