Re: Feature Request: Enabling opening files externally at a particular line number



On 23 March 2013 19:34, Angel Ezquerra <angel ezquerra gmail com> wrote:
On Sat, Mar 23, 2013 at 1:56 AM, Aaron Schrab <aaron schrab com> wrote:
At 16:17 +0100 21 Mar 2013, Konstantin <starojitski gmail com> wrote:

"$external_editor $file_path:$current_line_number"
would open the file at the right point! At least on Linux and probably on
Mac


That would be a feature of the editor, not the OS.  And that method doesn't
work for either of the traditionally popular Unix/Linux editors (emacs and
vi).  In fact I'd consider any editor that did that to be broken since a
colon is a perfectly valid part of a file name.

However both of those support:

"$external_editor +$current_line_number $file_path"

FWIW in TortoiseHg you can define an external editor. When you do so
you can define the command line that will be called when the editor is
open. In it you can use a few "variables", such as $FILE and $LINENUM.
With that you can customize how the editor is open, and _if_ your
editor command line contains $LINENUM you TortoiseHg will open the
file at the selected line number.
<snip>

If we did anything to support opening at a given line, I think it
would be something like this. We'd just make a mini-syntax for passing
arguments to the custom editor and document the flags.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]