Regarding _buffer_add prefix, if you search slick source code for call_list whole word only, you'll see all of the prefixes that are available. It's an undocumented feature. You'll see there's a prefix _switchbuf_ that is for when you switch to a different buffer, also _cbsave_ for when you save a buffer. This should really be in the help - or maybe in SlickCMacroBestPractices.pdf
agreed, SlickEdit is extremely powerful and it is a pity that a user someimes has to go out of their way to seek out all its features. the help could also benefit from a few examples to get people going with Slick-C this way new users can get up to speed quicker with the language and macros in SlickEdit.
For arg-shift-selection, it is in the help. One way to find things like this is go to help in the main menu, then "macro functions by category" then "selection functions". The function names give you a pretty good idea what the function will do.
noted, Thank you for the suggestion.
For tool windows - Slick V23 introduced save_named_layout and load_named_layout commands. These allow you to save and restore all your tool-windows and toolbars with a particular layout - you get prompted for a name for each layout. So if you call save_named_layout from the command line and save a layout as "t1" you can create a command to load that layout like this - and bind a key to it.
_command void t1() name_info(',')
{
load_named_layout("t1");
}
https://community.slickedit.com/index.php/topic,17426.msg71156.html#msg71156
this looks promising. i've tested it with the extension restricting code you posted and it works when a specified fileype is tied to a saved layout
if ( !(get_extension(p_buf_name) == "html"))
return;
load_named_layout("minimal");
but i've run into an issue.
- i would like to open html files in a minimal environment that has no toolbars and tool-windows. i've created such a layout and named it "Minimal".
- i've also created a layout called "Default" for all other files other than html's that i would like to view/edit with the toolbars and tool-windows i've configured visible.
when i open a html file the layout "minimal" is loaded. but unless "default" is re-loaded, all other files other than html's will be loaded in the "minimal" layout. this is where i need help. i've determined that the best option would be to have .html files open a new window with the "minimal" layout. but i foresee some issues:
- how would other html files opened from the system be assigned to the new window using the "minimal" layout ?
- how would files that i would not want to be opened in the window running the "minimal" layout be assigned to the default window running the "default" layout ?
to illustrate the two questions with a use case:
- open a .ini file and it opens in a window running the "default" layout.
- open a .txt file and it will open in the same window.
- open a .html file and a new window will open running the "minimal" layout.
- open an xml file and it will be opened in the window with the "default" layout
- open another .html file and it will open in the window with the "minimal" layout
in total there should be two windows(is it even possible to accomplish this in one window ?) with multiple edit tabs. the default layout window with three tabs(.ini, .txt, .xml) and the minimal layout window with two tabs(.html and .html)
i appreciate your continued patience with me in sharing your knowledge as it is inspiring me to do more with Slick-C.