sublime-jsdocs icon indicating copy to clipboard operation
sublime-jsdocs copied to clipboard

Plugin not working on SublimeText 3 ?

Open p-j opened this issue 11 years ago • 32 comments

My configuration is as follow :

  • OS: Linux (Kubuntu 12.10)
  • ST3 Build 3047
  • Latest version of DocBlockr from Package Control

Now, when I write Javascript or PHP, if I type /** and hit enter or tab, it just insert a new line or a tab.

Same with /* or ///.

Here are the packages I have installed (maybe it's a conflicting problem that someone knows of).

AlignTab
CodeFormatter
DocBlockr
EditorConfig
FileDiffs
GitGutter
Handlebars
MarkdownEditing
Markdown Extended
Markdown Preview
Monokai Extended
Open URL
Package Syncing
SublimeGit
Syntax Highlighting for Sass
Syntax Manager

I just updated all of them in case it was a known and already fixed issue, but no luck.

Any idea why it's not working ?

p-j avatar Nov 08 '13 11:11 p-j

I have the same problem after update the last version

OS: Win 8.1

someok avatar Nov 14 '13 17:11 someok

remove and reinstall the plugin, It's work fine

someok avatar Nov 20 '13 12:11 someok

Not for me unfortunately...

p-j avatar Nov 20 '13 13:11 p-j

Same for me

vlakarados avatar Nov 25 '13 13:11 vlakarados

Works well when cloning, though

vlakarados avatar Nov 25 '13 13:11 vlakarados

Cloning the repo in ~/.config/sublime-text-3/Packages/DocBlockr isn't working either. It shows up in the command palette (reparsing & decorating) but nothing's working.

p-j avatar Nov 27 '13 11:11 p-j

same for me

szmtcjm avatar Nov 29 '13 05:11 szmtcjm

same for me

  • remove and reinstall the plugin doesn't work
  • cloning the repo doesn't work

Mac OS X Sublime text 3

ognjenm avatar Dec 12 '13 09:12 ognjenm

fwiw, I have had DocBlockr working in Ubuntu 12.04 and now Kubuntu 13.10 for while. Just switched over to my Windows machine for reasons that are way beyond the scope of DocBlockr, and added DocBlockr to my ST3 installation. Hitting enter within a jsdoc is failing to include a * in the new line. Alt-W does function in that it removes the new line, so it seems that something is working. Hmm.

Edit: figured out that none of the default key bindings were configured -- seems ok now. Was I supposed to need to do that manually?

laurelnaiad avatar Dec 21 '13 18:12 laurelnaiad

I can't get this to work either. After typing "/**" it won't do anything after hitting enter.

Sublime Text 3 (Build 3061) Mac OS X 10.9.1 Master & Develop branches PHP

coolhome avatar Jan 20 '14 04:01 coolhome

Really sorry to everyone for letting this linger for so long without response. In my installation (Build 3059, Ubuntu 13.10) every works fine. If you're having these issues there's a few things to check:

  1. Open the console (Ctrl+`) and see if there's any error messages when you try to invoke any docblockr command (eg: enter inside a docblock). I'd suspect that you'd only see an error if pressing enter has no effect.
  2. If pressing enter just has the default behaviour (new line, no docblock extension, etc), then in the console, run sublime.log_commands(True) and press enter there again. If you see this: command: insert {"characters": "\n"} then it's almost certainly an issue with the keybindings -- that is, docblockr isn't being invoked at all. It might be some other plugin (also) hijacking this keybinding, or some issue with sublime not registering docblockr's key map.

If anyone could report back their findings, that'd help to diagnose further. Cheers.

spadgos avatar Jan 26 '14 11:01 spadgos

Hi @spadgos

To answer your question, I've proceeded as you explained and have found exactly what you had foreseen : Nothing at first, and with sublime.log_commands(True) --> command: insert {"characters": "\n"}

I then looked at my keybindings user file and searching for enter if found :

{
    { "keys": ["enter"], "command": "insert", "args": {"characters": "\n"} },
    { "keys": ["shift+enter"], "command": "insert", "args": {"characters": "\n"} },
    { "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
    { "keys": ["shift+keypad_enter"], "command": "insert", "args": {"characters": "\n"} },

[...]

    { "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
    { "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
    { "keys": ["enter"], "command": "commit_completion", "context":
        [
            { "key": "auto_complete_visible" },
            { "key": "setting.auto_complete_commit_on_tab", "operand": false }
        ]
    },

[...]

    { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
            { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
        ]
    },
    { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
            { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
        ]
    },

    { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selector", "operator": "equal", "operand": "meta.scope.between-tag-pair", "match_all": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        ]
    },
    { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selector", "operator": "equal", "operand": "meta.scope.between-tag-pair", "match_all": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        ]
    },

[...]

}

And some find panel key bindings

p-j avatar Jan 27 '14 12:01 p-j

I have had the same problem and came to the same findings as @p-j then I tried re-installing the package and noticed this output in the console when running package install. It appears that the package doesn't get installed in my machine because after running install and getting the console output below, if I look at installled packages DocBlockr isn't there...

I'm on OSX 10.9.1 on a mid 2011 MBA and sublime text 3 (build 3059)

ignored packages updated to: [Vintage, Better CoffeeScript, CodeFormatter, Git, GitGutter, GoSublime, SublimeLinter, DocBlockr]
found 1 files for base name Default.sublime-theme
theme loaded
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Default.sublime-theme
theme loaded
ignored packages updated to: [Git, GitGutter, Vintage, Better CoffeeScript, GoSublime, CodeFormatter, SublimeLinter]
found 1 files for base name Default.sublime-theme
Exception in thread Thread-15:
Traceback (most recent call last):
  File "X/threading.py", line 639, in _bootstrap_inner
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_installer.py", line 241, in run
    self.result = self.manager.install_package(self.package)
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_manager.py", line 480, in install_package
    package_bytes = download_manager.fetch(url, 'Error downloading package.')
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/download_manager.py", line 180, in fetch
    return self.downloader.download(url, error_message, timeout, 3, prefer_cached)
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/downloaders/urllib_downloader.py", line 111, in download
    http_file = self.opener.open(request, timeout=timeout)
  File "X/urllib/request.py", line 473, in open
  File "X/urllib/request.py", line 491, in _open
  File "X/urllib/request.py", line 451, in _call_chain
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/validating_https_handler.py", line 44, in https_open
    return self.do_open(http_class_wrapper, req)
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/persistent_handler.py", line 94, in do_open
    if r.is_keep_alive():
  File "/Users/sandfox/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/debuggable_http_response.py", line 58, in is_keep_alive
    if connection.lower() == 'keep-alive':
AttributeError: 'NoneType' object has no attribute 'lower'

theme loaded
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Default.sublime-theme
theme loaded

sandfox avatar Jan 29 '14 11:01 sandfox

That seems like a bug in package control...

spadgos avatar Jan 29 '14 18:01 spadgos

errmm, yeah, my bad. I seem to have some deeper routed problems here....

sandfox avatar Jan 31 '14 15:01 sandfox

I had the same problem as sandfox. If you install via Package Control DocBlockr will not work.

I cloned it to my Packages/ directory and restarted sublime text 3. It now shows up in the prefs>package settings> list and the auto complete works.

ghost avatar Feb 01 '14 18:02 ghost

I had the same problem and found a workaround:

  1. Clone it to the Packages directory
  2. cd to the clone destination folder and open the Default.sublime-keymap and copy all the key bindings into the Preferences > Key Bindings - User file
  3. restart Sublime

That's it.

alexandrupirjol avatar May 29 '14 08:05 alexandrupirjol

alexandrupirjol solution did work, ty dude!

maxidev avatar Aug 07 '14 03:08 maxidev

I've made a fresh install recently and it works for me now. The setup is different though, I'm now running Kubuntu 14.04 and ST3 Build 3065 Feel free to close the issue.

p-j avatar Oct 14 '14 12:10 p-j

solution proposed by @alexandrupirjol works for me on Mac.

Bazm0 avatar Jan 28 '15 01:01 Bazm0

@alexandrupirjol 's solution does not work for me on OS X

friend0 avatar Jan 28 '15 02:01 friend0

Yep, solved by removing all User Key Bindings and restarting Sublime

izevg avatar Apr 26 '15 16:04 izevg

reinstall worked for me ! sublime text 3 win 8.1

ali-khabbaz avatar Nov 22 '15 08:11 ali-khabbaz

none of the above solutions worked for me. ST3083, win10x64

rickmed avatar Jan 06 '16 20:01 rickmed

Mine stopped working when I updated to ST3099. Fedora 23. Reinstalling didn't fix the issue.

oradwell avatar Jan 29 '16 13:01 oradwell

@oradwell could you post your console output (instructions in a comment above https://github.com/spadgos/sublime-jsdocs/issues/236#issuecomment-33314717)

spadgos avatar Feb 01 '16 10:02 spadgos

@spadgos There doesn't seem to be any errors and I was able to see command: insert {"characters": "\n"} in console. I don't have a user keymap file.

oradwell avatar Feb 06 '16 17:02 oradwell

That would suggest that the DocBlockr plugin isn't getting invoked. :-\

spadgos avatar Feb 08 '16 09:02 spadgos

Thanks @flyingbuddha 3102 update fixed the issue.

oradwell avatar Feb 08 '16 11:02 oradwell