Sublime Forum

Plugin: run_command move by lines does not work

#1

Sublime Text 3 build 3083 running on Windows 10

Create a new plugin and a new key map to link to it, the following two lines code can work

    self.view.run_command("goto_line", {"line": 1})
    self.view.run_command("move_to", {"to": "bol"})

but the following line code can not work,
self.view.run_command(“move”, {“by”: “lines”})

What’s the problem? And how to debug this sort of thing? Thanks!

0 Likes

#2

You also need to specify “forward”:

self.view.run_command("move", {"by": "lines", "forward": True})
0 Likes

#3

Thank you very much, FichteFoll

adding forward parameter, it works ! Thanks again! :smile:

0 Likes