SlickEdit Community

General => General Programming => Topic started by: borist on August 02, 2011, 12:54:06 pm

Title: Invoking VisualSlick with lineNumber option
Post by: borist on August 02, 2011, 12:54:06 pm
Hello everybody ;),

I'm wondering if VisualSlick has command line option to set cursor to specified line in file.
I'm trying to invoke VS with file specified by compiler and pass him line number to diplay. The help manual doesn't tell how to do it.

Thanks in forward... 
Title: Re: Invoking VisualSlick with lineNumber option
Post by: Graeme on August 02, 2011, 01:13:39 pm
Hello everybody ;),

I'm wondering if VisualSlick has command line option to set cursor to specified line in file.
I'm trying to invoke VS with file specified by compiler and pass him line number to diplay. The help manual doesn't tell how to do it.

Thanks in forward... 

Actually the help does mention this but you have to know where to look.  Look at "invocation options" in the help index.  For the -# option the help says you can do this
vs.exe test.c "-#goto-col 50"
to set the cursor to column 50. 

To set the line number you do
vs.exe test.c "-#goto-line 50"

Graeme
Title: Re: Invoking VisualSlick with lineNumber option
Post by: borist on August 03, 2011, 01:40:45 pm
Great! It works! Thank you very much Graeme :)

In fact I tried to find it in help by myself, but (probably because I'm using the old 11.0.0 version) the only stuff I found was:

-#command
 Execute command on active buffer. For example, vs test.c -#bottom-of-buffer places the cursor at the end of test.c. Use double quotes if the command has spaces (vs test.c -#goto-col 50).