Sublime Forum

Current cursor location

#1

Next question:

What’s the best way to grab the current cursor location for use in a macro? In Word, I created a macro that lets me grab the current cursor location, then I can go do things in other parts of the document, and I can return to that cursor location with a keypress when I want to. Not sure of the best way to create this capability in ST2. Any pointers are appreciated.

0 Likes

#2

Macros in Sublime are not very powerful. You may want to look into creating a plugin…

0 Likes

#3

All right. I’ll have to wait on that one, I think.
Thanks.
D

0 Likes

#4

On the subject of creating plugins. It looks like this is going to be a handy tool for me–again, not as a programmer, but as a writer shaping ST2 into my ideal writing tool. A few questions:

  1. Plugins are created using Python, yes?

  2. Do I need to download any additional tools in order to use Python in ST2?

  3. Where’s the best place to find a nice, simple, clear introduction to doing things with Python in ST2?

THANKS
Dutch

0 Likes

#5
  1. Yes, plugins are created using Python
  2. Nope. I would suggest editing the plugin code in ST2
  3. sublimetext.info/docs/en/extensi … ugins.html
0 Likes

#6

OK, thanks for the answers.

D

0 Likes

#7

Don’t forget the API: http://www.sublimetext.com/docs/2/api_reference.html
:smile:

0 Likes

#8

All righty. I’ve got some studying to do, I think. This is the same thing I liked about Xywrite–the endless tweaking saved me from the trouble of actually toiling over much actual writing. :smile:

0 Likes