Sublime Forum

Fix open_url.sublime-settings

#1

Hello,

I am using the package Open_url to open text files referenced in other text files: when characters make a filepath in a file text, I set my cursor on it, I press ctrl+alt+u and sublime text opens the file of the filepath.
For example, if in a file, there are the characters “D:\path\to\my\file.txt”, sublime text will open the file D:\path\to\my\file.txt.

I need to open text files at precise lines.
It seems the package Open_url has this functionality: when I press ctrl+alt+u on characters with a format like : (example: D:\path\to\my\file.txt:10), a window with “subl: open file at line #” appears.
But when I click on “subl: open file at line #”, nothing happends!

In open_url.sublime-settings, there is
// pass other URL that matches regex “pattern” to shell commands
“other_custom_commands”: [
// { “label”: “open with filezilla”, “os”: “osx”, “pattern”: “^ftp://”, “commands”: [ “open”, “-a”, “/Applications/FileZilla.app” ] },
{
“label”: “subl: open file at line #”,
“pattern”: “:[0-9]+$”,
“commands”: [“subl”],
“kwargs”: { “cwd”: “project_root” }
}
]

I guess I must modify this code block so sublime text will open my text files at the specified line.

Somebody has an idea of what I have to modified?

Thanks a lot!

0 Likes