isildur
isildur

Reputation: 43

Sublime Text 2 issue with open parenthesis not typing at end of function calls

I setup Sublime Text 2 with a few packages for Python development. Starting entering some code like:

al_filename = tkinter.filedialog.askopenfilename()

When I typed that first '(' nothing happened, it would not type for some reason. Out of a hunch, I typed a [ then hit ( and it worked. So I typed my open/close parens and removed the brackets. I am not sure what's going on, checked the console for errors and it's clean.

Installed Packages

Case Conversion
CaseConversion
Cheat Sheets
Clojure
Color Scheme - Default
CSS
D
Default
Diff
Erlang
fnkr-sublimepascal-18483dbc6260
Git
GitGutter
Github Tools
Go
Graphviz
Groovy
Haskell
HTML
Java
JavaScript
Jedi - Python autocompletion
Language - English
LaTeX
Lisp
Lua
Makefile
Markdown
Matlab
Neon Color Scheme
Objective-C
OCaml
Package Control
Pascal
Perl
PHP
Python
PythonTidy
R
Rails
Regular Expressions
RestructuredText
Ruby
Scala
ShellScript
SidebarEnhancements
SQL
Sublime Text 2 Snippets
SublimeCodeIntel
sublime-js-snippets
SublimePythonTidy
SublimeREPL
sublime-text-2-clipboard-history
Sublime-Text-2-Stackoverflow-Plugin
SublimeText-Sublime-Text-2-Snippets
SublimeTODO
sublime-todomanager
TCL
Text
Textile
Theme - Default
Theme - Soda
Theme - Tomorrow
User
Vintage
XML
YAML
ActionScript
All Autocomplete
AppleScript
ASP
AutoHotKey
Batch File
C#   

Any ideas? I am not new to Sublime Text 2 per se, but I am new to using it as a development environment for python vs just a python syntax-highlighting editor. My google-fu found nothing similar. Thanks for any input on this issue. :)

Upvotes: 1

Views: 1082

Answers (4)

Mohideen bin Mohammed
Mohideen bin Mohammed

Reputation: 20147

Step 1: go to Preference-> Package Control

or

ctrl + shift + p

Step 2: Select or search,

Disable pacakge

and then,

Step 3: Search package called Jedi - python auto completion. that's all your issue resolved.

Reason is,

Jedi python override open paranthesis command with its own keyword, sublime_jedi_params_autocomplete

you can trace it by ctrl+` and enter sublime.log_commands (True)

Upvotes: 0

sha12
sha12

Reputation: 1687

I faced the same issue. It was due to Jedi Package. Just disabling and enabling the package solved the issue.

Open package control (Preferences -> package control)

Disable Package: Jedi

Enable Package: Jedi

Finding the root cause:

With sublime console, you can easily identify the culprit for this kind of issues. Open sublime console (view -> show console) and enter the below command.

sublime.log_commands(True)

It shows the log for all the commands you are typing in sublime. In my case if I enter '(' it was referring something related to Jedi Auto complete package. So I got to know that issue is with Jedi Package.

Upvotes: 1

Tanmay Agrawal
Tanmay Agrawal

Reputation: 87

For Mac Users:

Sublime Text -> Preferences -> Package Settings -> Jedi -> Keymap -> Default -> Change line #12:

{"command": "sublime_jedi_params_autocomplete", "keys": ["("],

to

{"command": "sublime_jedi_params_autocomplete", "keys": ["super+ctrl+j"],

Upvotes: 3

martineau
martineau

Reputation: 123473

Sublime Text 2 works OK in this respect for me.

While I didn't compare every package you listed as installed to my own list, I noticed that you had one calledJedi - Python autocompletionwhich I don't — so that might be a good place to start.

Here's a complete list of the packages I do have installed on my Windows system:

ActionScript                            Markdown
AppleScript                             Matlab
ASP                                     Objective-C
Batch File                              OCaml
C#                                      Package Control
C++                                     Perl
Clojure                                 PHP
Color Scheme - Default                  Python
CSS                                     Python Pep8 Lint
D                                       R
Default                                 Rails
Diff                                    Regular Expressions
Erlang                                  RestructuredText
Go                                      Ruby
Graphviz                                Scala
Groovy                                  ShellScript
Haskell                                 SQL
HTML                                    TCL
Java                                    Text
JavaScript                              Textile
Language - English                      Theme - Default
LaTeX                                   User
Lisp                                    Vintage
Lua                                     XML
Makefile                                YAML

Upvotes: 1

Related Questions