Comments (15)
Hi bencrinkle.
Could you send me your Sublime Text build and Windows version too (About: Sublime Text)?
Thank you for your feedback.
from fuzzyfilepath.
And i am curious if it is a problem with FFP. No filepaths found means FFP cannot match the given trigger. Is it possible you changed your syntax, import statements, etc? Could you also post the scope and import declaration you are trying to autocomplete?
Thanks again.
from fuzzyfilepath.
hi sagold it's Windows 10 pro Sublime Text 3083. The syntax is set as JavaScript and i'm trying to do...
var test = require('../../../test.js');
from fuzzyfilepath.
Hi bencrinkle.
I tested your setup on a fresh install and it worked out of the box. I would suggest to remove and install FuzzyFilePath again via package control.
If the problem persists, the following points might help:
- are files resolved in another project?
- the current file is within the opened project
- there is only one entry in your project settings
"folders":[]"
- add
{ "keys": ["alt+y"], "command": "ffp_show_context" },
to your key bindings and within the brackets ofrequire()
hit the shortcut. This will show you the details of the parameters used for evaluating the current path - if some of the settings might not be correct check the command palette for
FuzzyFilePath: show current settings
- check the console for errors
Let me know if you got some more details.
from fuzzyfilepath.
@sagold Same problem here.
And for the points:
{
"AUTO_TRIGGER": true,
"BASE_DIRECTORY": false,
"DEBUG": false,
"DISABLE_AUTOCOMPLETION": false,
"DISABLE_KEYMAP_ACTIONS": false,
"ESCAPE_DOLLAR": "\\$",
"EXCLUDE_FOLDERS": [
"node\\_modules",
"bower\\_components/.*/bower\\_components"
],
"FFP_SETTINGS_FILE": "FuzzyFilePath.sublime-settings",
"INSERT_ACTION": [
"commit_completion",
"insert_best_completion"
],
"LOG": false,
"POST_INSERT_MOVE_CHARACTERS": "^[\"'\\);]*",
"PROJECT_DIRECTORY": "",
"TRIGGER": [{
"auto": true,
"base_directory": false,
"extensions": ["js"],
"prefix": ["require", "define"],
"relative": true,
"replace_on_insert": [["\\.js$", ""], ["([^.])\\/index$", "\\1"] ],
"scope": "source\\.js.*string"
}, {
"auto": true,
"base_directory": true,
"extensions": ["png", "gif", "jpg", "jpeg"],
"prefix": ["src"],
"relative": true,
"scope": "source\\.js.*string"
}, {
"auto": true,
"extensions": ["js"],
"prefix": ["from"],
"relative": true,
"scope": "source\\.js"
}, {
"auto": true,
"base_directory": true,
"extensions": ["js", "png", "gif", "jpeg", "jpg", "svg"],
"prefix": ["src", "url"],
"relative": true,
"scope": "meta.tag.*string.*\\.html"
}, {
"auto": true,
"extensions": ["css"],
"prefix": ["href"],
"relative": true,
"scope": "meta\\.tag.*string.*\\.html",
"tagName": ["link"]
}, {
"auto": true,
"base_directory": true,
"extensions": ["png", "gif", "jpeg", "jpg", "woff", "ttf", "svg", "otf"],
"prefix": ["url"],
"relative": true,
"scope": "meta\\.property.*\\.css"
}, {
"auto": true,
"extensions": ["css", "scss", "less"],
"prefix": ["import"],
"relative": true,
"replace_on_insert": [["\\.(scss|less)$", ""] ],
"scope": ".*\\.(css|sass|less)"
}, {
"auto": false,
"extensions": ["js", "html", "css", "scss", "less", "png", "gif", "jpeg", "jpg", "svg"],
"relative": true,
"scope": "source"
}],
"TRIGGER_ACTION": ["auto_complete", "insert_path"],
"TRIGGER_STATEMENTS": ["prefix", "tagName", "style"]
}
- errors: none
When trying to type path in src
, it says in the status bar: FFP no file path found for xxx.
from fuzzyfilepath.
Strange. Even with the latest changes, FFP runs fine on my virtual-box/win10/ie11 install with the latest Sublime Text (portable) version.
I will look into it. Your project settings might help.
In the meantime you could add
"debug": true,
"log": true,
to your FFP-User-Settings and check the console for any hints.
from fuzzyfilepath.
@sagold Well, I think I find out what's going on there. It works fine with the img
and the style
tag, but not script
tag.
Well, in img
or style
tag, it says(search for these extensions):
FFP search scan 89 files for i ['js', 'png', 'gif', 'jpeg', 'jpg', 'svg']
FFP | => 2 completions found
FFP
However, when in script
tag, it says(search only for these extensions, without js
):
FFP search scan 89 files for c ['png', 'gif', 'jpg', 'jpeg']
FFP | => 2 completions found
FFP
Hopefully that would help.
from fuzzyfilepath.
@sagold I'm not working within a defined sublime project just an open folder which is how i've always done it. log just says...
FFP | => no valid files found for needle: a
FFP
from fuzzyfilepath.
@sagold Well, it turns out the scope of <script src="..." ></script>
is
text.html.basic source.js.embedded.html string.quote.double.html
I think that's why it does not complete the path there.
It applied this scope here:
{
// js - *.src = ""
"scope": "source\\.js.*string",
"prefix": ["src"],
"auto": true,
"base_directory": true,
"extensions": ["png", "gif", "jpg", "jpeg"],
"relative": true
},
Also, require
in js
file works for me, but not src
(scope: source.js string.quote.double.js).
from fuzzyfilepath.
Hi.
We have to different problems here.
@bencrinkle Did you set debug to true? This should output the number of cached files. It may be that no files are indexed and thus no completions can be found. I would like to solve this issue, but as long as i cannot reproduce it locally i need some more information. I am also considering to add some more debugging helpers for this case.
@zmLGBBM the regex should match. Nevertheless i will try it out locally. Could you post a simple code example for using "src" in javascript?
Thank you for your help.
from fuzzyfilepath.
@sagold I've noticed in the settings file, you've provided:
meta.tag.*string.*\\.html
to match the given scope (at least on my machine it says this)
text.html.basic source.js.embedded.html string.quote.double.html
I don't think that would match.
Yeah, sure, a sample html
code, the link
tag works fine, but not the script
tag (which is also highlighted somehow in sublime):
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<!-- compiled css output -->
<link href="css/ionic.app.css" rel="stylesheet">
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/app.all.js"></script>
</head>
from fuzzyfilepath.
@sagold just had a look at the console again and I'm getting a filenotfound error
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:/Users/ben/Documents/Visual Studio 2013/Projects/Orsino/Orsino/Scripts\\Settings\\testing\\coverage\\PhantomJS 1.9.8 (Windows 8 0.0.0)\\Settings\\translated\\English-UnitedKingdom\\Apps\\Settings\\Components\\Account Settings\\Billing Details And Invoices\\Actions\\*.*'
can i manually exclude the coverage folder? how do i clear the cache?
from fuzzyfilepath.
@sagold don't worry...i read the manual :D added coverage to the excluded folders array and it now works as before! not sure what's causing the issue? maybe the path is too long?
from fuzzyfilepath.
@bencrinkle Thank you for sharing the insights and offering your workaround
from fuzzyfilepath.
@zmLGBBM I opened a specific issue for the script import here #20
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.