Discussion:
jumping to a specific line / column
Joshua Haas
2015-02-25 19:49:33 UTC
Permalink
Hi! I'm trying to edit an extremely wide file (minified javascript) and
would like to be able to move my cursor to a specific line / col location.
Is there a way of doing this? the Line / Col indicator in the status bar
seems to be readonly....

Thanks!

--Josh
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Den Dowling
2015-02-25 22:51:02 UTC
Permalink
If you hit command-J (jump), type a line number, hit enter
- that will position your cursor at the beginning of that line.

Under the top menu "Go" you will also find windows for
"Jump Points" and "Markers". Jump Point window shows your recent jumps.

You can create Markers, like bookmarks, of cursor positions
by doing a right-click in your text for contextual menu and
choosing "Set Marker".

- Den.
Post by Joshua Haas
Hi! I'm trying to edit an extremely wide file (minified
javascript) and would like to be able to move my cursor to a
specific line / col location. Is there a way of doing this?
the Line / Col indicator in the status bar seems to be readonly....
Thanks!
--Josh
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Joshua Haas
2015-02-26 03:48:41 UTC
Permalink
Okay, for posterity, if you want to set both column and line numbers, the
following applescript seems to work:

*on* *run*

* display dialog* "Line?" default answer 0

* set* start_line *to* (text returned *of* result) *as* *integer*

* display dialog* "Column?" default answer 0

* set* start_column *to* (text returned *of* result) *as* *integer*

* tell* *application* "BBEdit"

* tell* *window* 1

* select* *character* ((characterOffset *of* (*line* start_line)) +
start_column - 1)

* end* *tell*

* end* *tell*

*end* *run*
Post by Den Dowling
If you hit command-J (jump), type a line number, hit enter
- that will position your cursor at the beginning of that line.
Under the top menu "Go" you will also find windows for
"Jump Points" and "Markers". Jump Point window shows your recent jumps.
You can create Markers, like bookmarks, of cursor positions
by doing a right-click in your text for contextual menu and
choosing "Set Marker".
- Den.
Post by Joshua Haas
Hi! I'm trying to edit an extremely wide file (minified
javascript) and would like to be able to move my cursor to a
specific line / col location. Is there a way of doing this?
the Line / Col indicator in the status bar seems to be readonly....
Thanks!
--Josh
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Joshua Haas
2015-02-26 03:19:15 UTC
Permalink
Thanks Den... do you know if there's a way of jumping to a column as well
as a line? When I do command-J it just asks for line number...
Post by Den Dowling
If you hit command-J (jump), type a line number, hit enter
- that will position your cursor at the beginning of that line.
Under the top menu "Go" you will also find windows for
"Jump Points" and "Markers". Jump Point window shows your recent jumps.
You can create Markers, like bookmarks, of cursor positions
by doing a right-click in your text for contextual menu and
choosing "Set Marker".
- Den.
Post by Joshua Haas
Hi! I'm trying to edit an extremely wide file (minified
javascript) and would like to be able to move my cursor to a
specific line / col location. Is there a way of doing this?
the Line / Col indicator in the status bar seems to be readonly....
Thanks!
--Josh
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Watts Martin
2015-02-26 19:35:14 UTC
Permalink
There's actually a way to do this already without using AppleScript, but
it's kind of sneaky: turn on "Emulate Emacs key bindings." Then you can use
Emacs' count prefix command (^U) to jump to a column. If you're at the
start of a line (column 1) and you want to move to column 100, you'd type:
^U 9 9 ^F (count 99, move forward).

Also, the live Search command can be handy for quick navigation --
Opt-Command-F, or if you have those Emacs key bindings enabled, just ^S.
Post by Joshua Haas
Thanks Den... do you know if there's a way of jumping to a column as well
as a line? When I do command-J it just asks for line number...
Post by Den Dowling
If you hit command-J (jump), type a line number, hit enter
- that will position your cursor at the beginning of that line.
Under the top menu "Go" you will also find windows for
"Jump Points" and "Markers". Jump Point window shows your recent jumps.
You can create Markers, like bookmarks, of cursor positions
by doing a right-click in your text for contextual menu and
choosing "Set Marker".
- Den.
Post by Joshua Haas
Hi! I'm trying to edit an extremely wide file (minified
javascript) and would like to be able to move my cursor to a
specific line / col location. Is there a way of doing this?
the Line / Col indicator in the status bar seems to be readonly....
Thanks!
--Josh
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Patrick Woolsey
2015-02-26 16:47:51 UTC
Permalink
Post by Joshua Haas
Thanks Den... do you know if there's a way of jumping to a
column as well as a line? When I do command-J it just asks for
line number...
At present this command accepts only a line number (though that
may change in future :-).


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Loading...