SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Features and/or Improvements => Topic started by: rowbearto on September 20, 2017, 06:27:34 PM
-
I have many scripts that don't have extensions, such as python scripts or bash scripts. They start with a line as follows:
#!/usr/bin/env bash
#!/bin/bash
#!/usr/bin/env python
#!/bin/python
#!/bin/ksh
As these files don't have an extension, SE doesn't know they are a bash, python or ksh script.
It would be good if SE could look for the #! line at the top of extension-less scripts to help figure out what type of file it is, so that it can get the color coding right.
-
SlickEdit supports recognizing all of the examples you gave.
What I did noticed is that if you create the file in SlickEdit, save it, close it, and the reopen the file. You get plain text mode because SlickEdit save/restores (perfile.xml and vrestore.slk) the mode it was the last time you edited it. Just select the mode, if you create the file in SlickEdit.
-
OK - that must be the reason, as I create most of my scripts in SE.
How about creating a command to re-determine the type from the hashbang so that I don't have to go through all the clicks to re-classify the file? I can just run this new command instead (and bind it to a key).
-
Try this macro.
-
Works great! Thanks!