2

Why Sublime Text 2 Ctrl+P doesn't work on some projects while it works on other projects?

Thanks for skuroda's tips, the log in console after hitting ctrl+p is as folows:

command: show_overlay {"overlay": "goto", "show_files": true}
Unable to auto detect encoding, using fallback encoding Western (Windows 1252)
Unable to auto detect encoding, using fallback encoding Western (Windows 1252)
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 175, in on_load
    callback.__module__, "on_load", EVENT_TIMEOUT)
  File ".\sublime_plugin.py", line 154, in run_timed_function
    ret = f()
  File ".\sublime_plugin.py", line 174, in <lambda>
    run_timed_function(lambda: callback.on_load(v),
  File ".\sublime_gbk.py", line 51, in on_load
  File ".\sublime_gbk.py", line 36, in gbk2utf8
Boost.Python.ArgumentError: Python argument types in
    Window.focus_view(Window, NoneType)
did not match C++ signature:
    focus_view(class SP<struct edit_window::reference>, class SP<class TextBufferView>)
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 175, in on_load
    callback.__module__, "on_load", EVENT_TIMEOUT)
  File ".\sublime_plugin.py", line 154, in run_timed_function
    ret = f()
  File ".\sublime_plugin.py", line 174, in <lambda>
    run_timed_function(lambda: callback.on_load(v),
  File ".\sublime_gbk.py", line 51, in on_load
  File ".\sublime_gbk.py", line 36, in gbk2utf8
Boost.Python.ArgumentError: Python argument types in
    Window.focus_view(Window, NoneType)
did not match C++ signature:
    focus_view(class SP<struct edit_window::reference>, class SP<class TextBufferView>)
feisky
  • 1,443
  • 3
  • 12
  • 16

1 Answers1

7

It's hard to offer any additional help without more information. With that being said, try opening on the console ctrl+backtick or View -> Show Console. In there enter sublime.log_commands(True). Every time you hit ctrl+p, it should print something like command: show_overlay {"overlay": "goto", "show_files": true} . If it doesn't please specify what it does say. In addition, you can verify the input ST is receiving by entering sublime.log_input(True) in the console. This should always return something like key evt: control+p.

Hopefully with those two commands you can provide some additional information. I'll edit my answer appropriately if/when you update.

Edit:

It looks like a plugin is causing issues. I'm guessing it's sublime-gbk, but I'm just guessing. You can try creating an issue on the developer's page and hope it gets addressed. The only thing I could advise is disabling the plugin. You could try modifying the plugin also. This may break something, but in def gbk2utf8(view):, you can do something like

if view is None:
    return

before the try except block. Of course, aligning the spacing as necessary so it's valid Python.

skuroda
  • 18,561
  • 4
  • 47
  • 34