Code Monkey home page Code Monkey logo

Comments (15)

sagold avatar sagold commented on August 26, 2024

Hi bencrinkle.

Could you send me your Sublime Text build and Windows version too (About: Sublime Text)?

Thank you for your feedback.

from fuzzyfilepath.

sagold avatar sagold commented on August 26, 2024

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.

bencrinkle avatar bencrinkle commented on August 26, 2024

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.

sagold avatar sagold commented on August 26, 2024

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 of require() 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.

Z-Clive avatar Z-Clive commented on August 26, 2024

@sagold Same problem here.

And for the points:

  1. no, all files are in the same project
  2. yes
  3. yes
  4. ffp_show_context:
    default
  5. current settings:
{
    "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"]
}
  1. errors: none

When trying to type path in src, it says in the status bar: FFP no file path found for xxx.

from fuzzyfilepath.

sagold avatar sagold commented on August 26, 2024

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.

Z-Clive avatar Z-Clive commented on August 26, 2024

@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.

bencrinkle avatar bencrinkle commented on August 26, 2024

@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.

Z-Clive avatar Z-Clive commented on August 26, 2024

@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.

sagold avatar sagold commented on August 26, 2024

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.

Z-Clive avatar Z-Clive commented on August 26, 2024

@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.

bencrinkle avatar bencrinkle commented on August 26, 2024

@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.

bencrinkle avatar bencrinkle commented on August 26, 2024

@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.

sagold avatar sagold commented on August 26, 2024

@bencrinkle Thank you for sharing the insights and offering your workaround

from fuzzyfilepath.

sagold avatar sagold commented on August 26, 2024

@zmLGBBM I opened a specific issue for the script import here #20

from fuzzyfilepath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.