Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass line/col number to external editor from grepwin?

Tags:

grep

notepad++

After I get search results in grepwin, I would like to open in an external editor notepad++ at specified line/col number so it automatically jumps to that location.

How can I do this?

Ideally, something like:

# (inspired by PowerGREP)
notepad++.exe -n%LINE% -c%COL% filetoedit.txt

would be nice.

like image 286
Level1Coder Avatar asked Feb 16 '12 03:02

Level1Coder


1 Answers

grepWin 1.5.6 already supports external editors. Just click "Settings" and use

C:\Program Files\Notepad++\notepad++.exe -n%line% "%path%"

Note that "line" and "path" must be lower case.

like image 70
rojanu Avatar answered Oct 03 '22 05:10

rojanu