python - sublime differentiate between single line comments and multiline comments -
i use sublime text 2 php , python. there can distinguish between single line , multi line comments. instanse, if type:
/* [enter] sublime autocompletes to:
/* [cursor here] */ this doesn't work php equivalent single line comments:
// comment [enter] resutls in:
// comment [cursor here] i have behaviour in python well. in python however, if use "#" single line comment this:
# comment [enter] results in:
# comment # [cursor here] this annoyting since have backspace twice undo it. multiline comment triple quotes doesn't work @ all. (it highlights correctly, not autocomplete)
how can change this? there keybinding can change or syntax specific thing?
edit: installed packages: - package control - docblockr - sidebarenhancements - sublimelinter - synchronized scrolling
ok, think i've figured out - doesn't have docblockr. first, open packages/python/miscellaneous.tmpreferences (where packages folder opened when going preferences -> browse packages...) , delete following lines (they should lines 19-24):
<dict> <key>name</key> <string>tm_comment_start</string> <key>value</key> <string># </string> </dict> save file. next, create new file (with xml syntax, if want highlighting) following contents:
<?xml version="1.0" encoding="utf-8"?> <!doctype plist public "-//apple computer//dtd plist 1.0//en" "http://www.apple.com/dtds/propertylist-1.0.dtd"> <plist version="1.0"> <dict> <key>name</key> <string>comments</string> <key>scope</key> <string>source.python</string> <key>settings</key> <dict> <key>shellvariables</key> <array> <dict> <key>name</key> <string>tm_comment_start</string> <key>value</key> <string># </string> </dict> </array> </dict> <key>uuid</key> <string>a67a8bd9-a951-406a-9175-018dd4b52fd1</string> </dict> </plist> save file packages/python/comments.tmpreferences. restart sublime, , should set.
Comments
Post a Comment