SlickEdit Community

General => General Programming => Topic started by: williethewimp on February 07, 2017, 06:19:17 pm

Title: hotkey text added to file
Post by: williethewimp on February 07, 2017, 06:19:17 pm
Hi,

Does Slickedit support the ability to create headers/blocks of generic code and then insert it in your code when you type a hotkey or some type of trigger? I don't know what it is called, so I don't know what to look for in the menus.

Thanks!
Todd
Title: Re: hotkey text added to file
Post by: williethewimp on February 07, 2017, 06:23:36 pm
Nevermind, I guess it is just "record a macro, paste the text that you want, stop the macro and bind it".

Thanks,
Todd
Title: Re: hotkey text added to file
Post by: LBCEi on February 07, 2017, 09:09:46 pm
That is one way to do it.  You can also use the 'aliases' features.  Search the Help.  This feature is quite flexible and you can even set it up to prompt for input when expanding an alias to customize the text that gets inserted.

I use this to insert comment headers when creating a new source file, for example.
Title: Re: hotkey text added to file
Post by: williethewimp on February 08, 2017, 05:46:09 pm
I'll take a look, thanks! It would be nice to add some specific names to the code generation.

Todd
Title: Re: hotkey text added to file
Post by: Clark on February 10, 2017, 02:18:57 am
You can have an alias prompt for parameters so you can insert them in your alias text. SlickEdit also support code templates which is used to generate one or more files (not pieces of files like aliases).