Code Monkey home page Code Monkey logo

Comments (8)

sagold avatar sagold commented on August 26, 2024

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.

breck7 avatar breck7 commented on August 26, 2024

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.

sagold avatar sagold commented on August 26, 2024

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.

breck7 avatar breck7 commented on August 26, 2024
  • 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.

fetis avatar fetis commented on August 26, 2024

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.

sagold avatar sagold commented on August 26, 2024

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.

fetis avatar fetis commented on August 26, 2024

It looks like problem was fixed. But I had to completely remove the plugin and made fresh installation.
Thanks for your work!

from fuzzyfilepath.

breck7 avatar breck7 commented on August 26, 2024

It works! Thanks @sagold !

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.