Author Topic: The SlickEdit® Command Line  (Read 18048 times)

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
The SlickEdit® Command Line
« on: August 14, 2007, 01:29:51 PM »
Use SlickEdit commands instead of the mouse to save time as you work. Open the SlickEdit command line by pressing Esc (in most emulations), type the command and any options, then press Enter. If you use a command frequently, bind it to a keyboard shortcut to save even more time. Type “Slickedit command line” in the Help Index (Help > Index) to learn more.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: The SlickEdit® Command Line
« Reply #1 on: August 14, 2007, 02:32:29 PM »
I fully agree - the commandline is EXTREMELY cool !
I've even added an alternate hotkey for activation and another one for 'execute-last-command' (see below) :)
Code: [Select]
/**
 * derived from gemacs.e<p>
 * last_command executes the last command that was run from the command line.<br>
 * This version CAN be run even from the command line, although it doesn't make much sense ...
 *
 * @return
 */
_command void execute_last_command () name_info(','VSARG2_READ_ONLY|VSARG2_TEXT_BOX|VSARG2_EDITORCTL)
{
   _str line="";

   // go back in retrieve buffer until a (valid) entry is found
   do
   {
      _cmdline.retrieve_skip();
      _cmdline.get_command(line);
   } while ( pos ( 'last_command', stranslate(line,'_','-') ) );

   clear_message();
   command_put(line);
   command_execute();
   _str cmsg = get_message();
   message("Command '"line "' completed" ((cmsg :== '') ? "." : " -> '" get_message() "'"));
   return;
}

HS2

devprof

  • Community Member
  • Posts: 8
  • Hero Points: 1
Re: The SlickEdit® Command Line
« Reply #2 on: August 29, 2007, 09:32:12 PM »
How do I enter the following command such as "select-mode Visual Basic"?  Note the space between "Visual" and "Basic".  I intend to put this up as one of my customized toolbar button actions.

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Re: The SlickEdit® Command Line
« Reply #3 on: August 29, 2007, 09:50:44 PM »
How do I enter the following command such as "select-mode Visual Basic"?  Note the space between "Visual" and "Basic".  I intend to put this up as one of my customized toolbar button actions.

Assuming you are trying to determine the correct text for the Command field on the Toolbar Control Properties dialog... select-mode Visual Basic seems to do the trick for me. Have you tried this?

Note: This also works on the command line.

devprof

  • Community Member
  • Posts: 8
  • Hero Points: 1
Re: The SlickEdit® Command Line
« Reply #4 on: August 29, 2007, 09:59:49 PM »
How do I enter the following command such as "select-mode Visual Basic"?  Note the space between "Visual" and "Basic".  I intend to put this up as one of my customized toolbar button actions.

Assuming you are trying to determine the correct text for the Command field on the Toolbar Control Properties dialog... select-mode Visual Basic seems to do the trick for me. Have you tried this?

Note: This also works on the command line.

Thanks, Lisa! Ignoring the quoting seems to work. I had only tried it with various quoting styles but never tried the unquoted style.  I thought it would see Basic as the second argument to the select-mode function!