Home Download Buy Blog Forum Support

Open file under cursor

Open file under cursor

Postby jbjornson on Mon Sep 05, 2011 10:15 am

I created a plugin from the idea posted by Marco Sordi on UserEcho.
Often a file contains the name of a second file, and you would like to open the second file.
Like "gf" command on Vim

The plugin will look for a file name in the following places (and in the following order):
  • the cursor expanded to enclosing quotes (both single and double quotes should work)
  • the selected text
  • the whole line
  • the clipboard text

If no filename can be found, the plugin will try to create a new file from the selected text.

Both relative and absolute paths should work.

Posts: 359
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Open file under cursor

Postby jbrooksuk on Mon Sep 05, 2011 3:07 pm

Finally a better attempt than mine!
Posts: 926
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Open file under cursor

Postby Suor on Mon Nov 07, 2011 8:57 am

A simpler version, just opens file at cursor
Posts: 9
Joined: Wed Oct 19, 2011 3:09 pm

Re: Open file under cursor

Postby tito on Mon Nov 07, 2011 5:40 pm

There is plugin https://github.com/SublimeText/Open-Include
Which does that. If you found more exceptions to add ( cases where included file can be opened )

There are very welcome there.
Give APIs, let the community build the rest!
Posts: 991
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests