Home Download Buy Blog Forum Support

current cursor location

current cursor location

Postby dutch on Sun Jan 29, 2012 7:27 pm

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.
dutch
 
Posts: 39
Joined: Fri Jan 27, 2012 3:25 pm

Re: current cursor location

Postby C0D312 on Sun Jan 29, 2012 7:53 pm

Macros in Sublime are not very powerful. You may want to look into creating a plugin...
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: current cursor location

Postby dutch on Sun Jan 29, 2012 8:01 pm

All right. I'll have to wait on that one, I think.
Thanks.
D
dutch
 
Posts: 39
Joined: Fri Jan 27, 2012 3:25 pm

Re: current cursor location

Postby dutch on Mon Jan 30, 2012 3:29 pm

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
dutch
 
Posts: 39
Joined: Fri Jan 27, 2012 3:25 pm

Re: current cursor location

Postby jbjornson on Mon Jan 30, 2012 4:53 pm

1) Yes, plugins are created using Python
2) Nope. I would suggest editing the plugin code in ST2
3) http://sublimetext.info/docs/en/ ...more specifically, http://sublimetext.info/docs/en/extensi ... ugins.html
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: current cursor location

Postby dutch on Mon Jan 30, 2012 5:35 pm

OK, thanks for the answers.

D
dutch
 
Posts: 39
Joined: Fri Jan 27, 2012 3:25 pm

Re: current cursor location

Postby C0D312 on Mon Jan 30, 2012 8:46 pm

C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: current cursor location

Postby dutch on Mon Jan 30, 2012 9:08 pm

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. :)
dutch
 
Posts: 39
Joined: Fri Jan 27, 2012 3:25 pm


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot] and 10 guests