Completions are not suggested and fix doesn't work
Hi, I'm on Windows and latest version of Sublime. I get suggestions only if I force them, I tried the "scopes" fix adding this to the user settings:
{
"scopes": [
{
"scope": ".",
"auto": true,
// add your extensions here:
"extensions": ["css", "html", "js"]
}
]
}
but it doesn't work. If I use keyboard shortcuts to insert paths it works. Can somebody help me with this?
Anyone?
Hi Cooperdale.
Your settings seem correct for testing purposes. With auto: true, FuzzyFilePath responds to Sublimes completion query. Testing the above setting, Sublime does not trigger autocompletions in some html contexts, but within a css-file i immediately receive a popup. Maybe it would help testing it in a stylesheet file.
In any case, check the console for notifications or errors. But since it basically works, you should set debug: true in your FFP settings to receive some more information. To evaluate your current context (cursor position) you could also open a popup with more description as described here.
Thanks for the answer. It actually doesn't come up with css either, but I think it comes from some bigger problem, since suggestions don't automatically show up for css rules either. I have to press Ctrl+Alt+Space each time. That's strange because it's a new and totally clean install.
Hi Cooperdale.
Just wondering, are the default completions (words occuring in the texfile or completion-list) opened? You can force them by control + space. Does your console show any relevant messages or errors?
@sagold ctrl + space also does't work :(
Doesn't work for me too now. The console shows:
FFP PROJECT rebuild filecache of
FFP cache START adding files in
Exception in thread Thread-7:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 33, in run
File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 49, in read
FileNotFoundError: [Errno 2] No such file or directory: ''
@jiayihu is it possible that you have an invalid entry in your project settings? Something like
{
"folders":
[
{
"path": "."
},
{
"path": ""
}
@sagold As far as I know I dont' have any project settings or .sublime-project file inside the folder, but it may be something related to the settings.
This is a more detailed console error:
FFP -WARNING- PROJECT project directory in settings in not a valid folder
FFP PROJECT new project created
FFP PROJECT Base directory at ''
FFP cache START adding files in
Exception in thread Thread-13:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 33, in run
File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 49, in read
FileNotFoundError: [Errno 2] No such file or directory: ''
The first line FFP -WARNING- PROJECT project directory in settings in not a valid folder refers to an invalid project_directory either in the user settings or some weird state that causes the directory to be empty.
Could you check your settings files for an entry "project_directory": "". This should either be an empty string or any valid folder (relative, based from your opened folder as is "app")? If it is missing, add it If everything seems fine, i require some detailed information:
- sublime version
- os
- opened folderpath
- multiple folders?
Thanks.
@Cooperdale sublime may be further configured to open the autocompletion panel: https://www.granneman.com/webdev/editors/sublime-text/top-features-of-sublime-text/auto-completion-in-sublime-text/. i.e.
"auto_complete_triggers":
[
{
"characters": "abcdefghijklmnopqrstuvwxyz",
"selector": "string.quoted.double.html"
}
]
@sagold Thanks, after tinkering with those autocompletion setting it works quite better. One more question, probably off topic but I have to ask: why does the plugin had a "/" in front of every root subfolder? That is, if I tell the plugin to go with "images/blog01.jpg", it will actually write "/images/blog01.jpg" and the image will not show on the page.
Absolute paths start with a / to prevent any misinterpretation. adding a regex to replace_on_insert should work around the other cases.