Answer the question
In order to leave comments, you need to log in
How to add a semicolon to the end of a line?
How can I set up hotkeys to add a semicolon to the end of a line without moving the cursor from the current position?
Answer the question
In order to leave comments, you need to log in
sublimetext.info/docs/en/extensibility/macros.html
Google
https://www.google.ru/webhp?sourceid=chrome-instan...
For example, write a plugin by adding User.py to the Plugins/User folder. Add a class there
class AppendSemicolon(sublime_plugin.TextCommand):
def run(self, edit):
for s in self.view.sel(): # пройтись по всем селекциям
ins = self.view.line(s) # находим регион, соответствующий текущей строке
self.view.insert(edit, ins.b, ";") # вставляем в конце точку с запятой
[
{ "keys": ["ваш биндинг"], "command": "append_semicolon" }
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question