Author Topic: URI link jump to line  (Read 486 times)


  • Junior Community Member
  • Posts: 3
  • Hero Points: 1
URI link jump to line
« on: October 12, 2017, 06:06:52 pm »
I've been trying to wrestle with this for a while with no luck, so I thought I would ask if anyone has found a way to do it.  I'd like to add some links to my code to jump to a particular line in a particular file.

For example:

The closest method I could find to do that was to change the "Open Application" In "Options>Languages>File Extension Manager" to point to a batch file I made which parses out the line number and calls "vs "%Filename%" "-#goto-line %LineNumber%"".
The problem is that it seems I can't even get my batch file called because the file protocol recognizes that "path\to\file#line=475" isn't a file, giving me the error "Windows cannot find 'file...' Make sure you typed the name correctly, and then try again."

Does anyone have another way of doing something like this?  Should I make this some feature request?

I am running SlickEdit 2012 (v17.0.3.0 64-bit)


  • Senior Community Member
  • Posts: 2125
  • Hero Points: 261
Re: URI link jump to line
« Reply #1 on: October 13, 2017, 10:44:54 am »
Not sure if this is what you're looking for but if you put the cursor on the line with file:// and run the command flink it will open that file at the specified line.  If the line starts with http it will open it in a browser.  Right click in slick edit window and select "edit this menu" and add the flink command to the menu if you want to be able to do right click -> flink.

Code: [Select]
_command void flink() name_info(',')
   _str s1, s2, s3;
   if ( pos('http',s1) == 1  ) {
   parse s1 with 'file://' s2 '#line=' s3;
   s2 = maybe_quote_filename(s2);
   if ( file_exists(s2) ) {
   else {
      message("no such file " :+ s2);


  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 328
Re: URI link jump to line
« Reply #2 on: October 13, 2017, 11:22:39 pm »
If your target file is in your workspace and is something that has tagging (or can have tags, like HTML or XML with the "id" tag), you could use tagging to make this work for you:

<mytag id="JUMP_TO_ME">

// JUMP_TO_ME  <-- Ctrl+Dot here