Author Topic: How to use Slick as an notepad style editor...  (Read 1127 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1715
  • Hero Points: 169
  • Text
How to use Slick as an notepad style editor...
« on: November 05, 2014, 12:38:57 am »
There are a couple of things I need an editor for from the command line or batch file.
The script or tool expects to invoke the editor, then wait for the editor to quit.


Slick of course generally "quits" right away - handing the file off to the already running instance of Slickedit.


On Windows I used a simple wrapper bat file that did
    vs %1 
    pause


Is there a better way?


"vs -new" maybe, but that used to always complain about the state file.

jporkkahtc

  • Senior Community Member
  • Posts: 1715
  • Hero Points: 169
  • Text
Re: How to use Slick as an notepad style editor...
« Reply #1 on: November 05, 2014, 12:47:56 am »
OK, so it is "+new".


But, when I do this Slick doesn't always put focus on the correct editor.


Setup Slick with two side-by-side tabs.
Exit
Start VS again.


From the cmdline run
   vs +new someFile.c


Sometimes the new instance of Slick puts the keyboard focus on the wrong edit window, and not on the "someFile.c" edit window.


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 401
Re: How to use Slick as an notepad style editor...
« Reply #2 on: November 05, 2014, 01:10:28 am »
You can avoid the state file warnings by also providing the option "-st0" (st zero).

Also, if you want to go the whole nine yards, try "-snoconfig" to prevent it from writing anything to the configuration directory, and "-snorestore" or "-fn" to skip restoring previously open files.

jporkkahtc

  • Senior Community Member
  • Posts: 1715
  • Hero Points: 169
  • Text
Re: How to use Slick as an notepad style editor...
« Reply #3 on: November 05, 2014, 03:20:40 pm »
Thanks, that seems to work pretty well.