Author Topic: Create new file of same type  (Read 93 times)

cookietx

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Create new file of same type
« on: November 19, 2021, 03:54:37 pm »
I am an user of a very old version (v10) and in that version selecting to create a new file from an existing editor will select the same file type (as being edited) as the new file type by default.   In the latest version (v26) the new file dialog always opens with "automatic" as the selected type.  I have searched for a way to change this but have not found anything.   Is there anyway to make the new version mimic this behavior?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6122
  • Hero Points: 470
Re: Create new file of same type
« Reply #1 on: November 19, 2021, 06:45:02 pm »
There isn't an option to make this work the old way. The problem with the old way is that it doesn't work correctly when you specify a file extension that is mapped to a specific language. That's why this was changed. For example, in v10, if C is selected in the list and you type the filename like junk.inc and press OK you do not get C. Instead you get Intel Assembly which is not what you selected. Also, in newer versions of SlickEdit there are advanced file mappings (and STL header files which have file no extension) which further complicate things when a filename is specified.

Graeme

  • Senior Community Member
  • Posts: 2681
  • Hero Points: 335
Re: Create new file of same type
« Reply #2 on: November 22, 2021, 08:10:59 am »
I am an user of a very old version (v10) and in that version selecting to create a new file from an existing editor will select the same file type (as being edited) as the new file type by default.   In the latest version (v26) the new file dialog always opens with "automatic" as the selected type.  I have searched for a way to change this but have not found anything.   Is there anyway to make the new version mimic this behavior?

It might be possible to write a macro to do it.  Can you explain why you need it, with an example.  When you say "type" do you mean "document mode"?