SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Did you know? => Topic started by: Lisa on August 14, 2007, 01:29:51 pm

Title: The SlickEdit® Command Line
Post by: Lisa 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.
Title: Re: The SlickEdit® Command Line
Post by: hs2 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
Title: Re: The SlickEdit® Command Line
Post by: devprof 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.
Title: Re: The SlickEdit® Command Line
Post by: Lisa 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.
Title: Re: The SlickEdit® Command Line
Post by: devprof 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!