Author Topic: extension specific saves w/o trailing spaces  (Read 4994 times)

witness9

  • Community Member
  • Posts: 54
  • Hero Points: 2
extension specific saves w/o trailing spaces
« on: September 22, 2006, 11:28:42 PM »
Our project normally uses 'strip-trailing-spaces' on Save.  However, one file type we use needs each line to end in a space.  I created a simple macro that seems to work OK to save w/this parameter off and then reset it:
_command save_wo_strip()
{
  def_save_options='... -S ...';
  execute('save','');
  def_save_options='... +S ...';
  return(0);
}
I couldn't find what parameter to change, so I started by recording the steps and then cutting out what I supposed were unnecessary steps.  Is there a better way?

More importantly, is there a way to make this the way all files with a certain extension are saved automatically?


Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: extension specific loads w/o converting tabs?
« Reply #1 on: September 23, 2006, 01:36:56 AM »
While we're at it, could SE maybe make "Expand tabs to spaces" an extension-specific behavior?  It would make the occasional makefile wrangling a lot less of a hassle when I that file option is selected.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: extension specific saves w/o trailing spaces
« Reply #2 on: September 25, 2006, 04:25:42 PM »
No way to do this yet.  I'll file a feature request.  The real work here is in modifying the Extension Options dialog.

The build_load_options() macro function handles almost all load/save options.  This is where any new extension specific load/save options would have to be processed.  This would be pretty trivial code.