Comments (8)
Thanks for your Feedback.
Hitting relative auto completion should always insert paths relative from your current file. I probably did not mention explicitly that it has to be called before the suggestions are displayed (the shortcut opens the suggestions window). In your case the suggestions window is already opened. Meaning, the selected rule will determine the path type.
Either adjust the ruleset to your specific needs or start the query by hitting the shortcut for relative auto completion.
I hope this helps.
Just let me know if something is missing.
from fuzzyfilepath.
Hey @sagold, thanks for the quick reply.
I'm still seeing the path relative to the project root. I've tried many combinations. I'm hitting the default "ctrl+alt+space" shortcut before the suggestions are displayed. I haven't overridden any of the default package or keyboard settings. Is there a different way to trigger relative auto completion without the keyboard shortcut?
Here's a gif of what I'm trying: http://i.imgur.com/3x7lfCo.gif
The first time I try auto autocomplte, the second time I specifically use the relative auto complete shortcut.
Default Keybindings:
[
{
"keys": ["ctrl+alt+space"],
"command": "insert_path",
"args": {
"type": "relative"
}
},
{
"keys": ["ctrl+shift+space"],
"command": "insert_path",
"args": {
"type": "absolute"
}
},
{
"keys": ["alt+enter"],
"command": "ffp_goto_file"
}
]
from fuzzyfilepath.
Hi Breck.
Would you mind to post some more information so that i may reproduce or solve the problem?
- Which Sublime Text Version are you using
- Which OS
- What is the current scope on the given path (alt+super+p)
- What is the content of the following tool, if executed on your path: { "keys": ["alt+y"], "command": "ffp_show_context" }
Thank you for your efforts. The animated gif is very helpful.
from fuzzyfilepath.
- Sublime 3083
- Windows 10 (hope this isn't the problem as I'm on a daily build)
- I don't see the ffp_show_context command. And alt+super+p doesn't seem to do anything.
I'll give it a shot on my mac at home and see if it works on there.
Thanks @sagold!
from fuzzyfilepath.
It looks like I'm having the same issue. I'm on Windows 7 and Subliime 3083.
When I'm trying to autocomplete filename for require()
it's always insterted as absolute. Neither ./
nor ../
prefixes don't work.
Here's my config (pretty copied from standard one)
{
// js - require("") and define([""])
"scope": "source\\.js.*string", // 1. ignore if scope at cursor does not match expression (super+alt+p)
"prefix": ["require", "define"], // 2. trigger only if: require(<cursor>, define([<cursor>
// if 1 & 2 are true:
"auto": true, // auto suggest filepaths, else only by shorctut
"extensions": ["js"], // show only .js files
"relative": true,
"base_directory": false, // insert absolute from the set base directory (above)
"replace_on_insert": [
["\\.js$", ""], // after insertion, remove .js from path
["([^.])\\/index$", "\\1"] // nodejs will load index.js by default => also remove index
]
},
from fuzzyfilepath.
Hi breck, hi fetis.
Thank you both for helping me find the problem. Obviously i am neglecting tests on windows. The problem was twofold:
- missing treatment of windows paths
- strange default settings for the require-trigger
Both problems have been fixed, tested and released 3e0e063.
I hope you can confirm that this issue is solved.
from fuzzyfilepath.
It looks like problem was fixed. But I had to completely remove the plugin and made fresh installation.
Thanks for your work!
from fuzzyfilepath.
It works! Thanks @sagold !
from fuzzyfilepath.
Related Issues (20)
- Crash on sublimeText 3, build 3126 release 23rd Sep 2016 HOT 3
- [Feature request] Add full relative paths for JavaScript files by default HOT 3
- [Bug] GotoFile failed finding file HOT 3
- Breaks snippet HOT 2
- Line 641, in __getitem__ raise IndexError() HOT 2
- Lag while opening a new project, FuzzyFilePath cached ... files in ... HOT 2
- Insert path relative to the current file HOT 1
- Add JS "import ... from" statement to default prefixes
- Image Sourcing Bug HOT 1
- FFP post cleanup path:' merge set ' ~~> ' merge set '
- Error when attempting to "Find All"
- Python from completion not being erased and filled with spaces
- Not working for SCSS files HOT 1
- omit extension? HOT 1
- Not detecting new files HOT 2
- Doesn't work in latest version HOT 3
- [Question] How does it work? HOT 7
- How to "replace_on_insert" on key binding, not auto_complete_trigger HOT 1
- path is on mount, start on mount..
- Not working (Mac, Sublime 3, Build 4126)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuzzyfilepath.