#226 Language detection for scripts via "#!"

Feature_Request
closed-fixed
SciTE (625)
5
2006-03-27
2004-08-18
No

When opening (or creating) scripts with a 'shebang' in
the first
line SciTE does not detect the language, though this
would be
relatively easy to achieve -- and very comfortable, as
I think I am
not the only person writing shell scripts, e.g., that
do not end with .sh

Would be nice if this could be included.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2004-08-19
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-duplicate
     
  • Neil Hodgson

    Neil Hodgson - 2004-08-19

    Logged In: YES
    user_id=12579

    I will accept a well written implementation but will nbot
    work on this myself.

     
  • John Belmonte

    John Belmonte - 2005-12-08

    Logged In: YES
    user_id=282299

    Is there any way to implement this in Lua (i.e. SciTE
    scripting)?

     
  • Neil Hodgson

    Neil Hodgson - 2005-12-09

    Logged In: YES
    user_id=12579

    It may be possible but it would require quite a bit of
    exploration within the source code to make this work
    reliably. Start with hooking OnOpen and setting the lexer.

     
  • John Belmonte

    John Belmonte - 2005-12-30

    Logged In: YES
    user_id=282299

    I'm starting to tinker with this. How can I do the
    equivalent of selecting an item from the Language menu from
    Lua? The best I've been able to do is set the lexer via
    editor.Lexer, but this leaves the keywords and coloring
    wrong. I'm not sure what input editor:SetLexerLanguage and
    SetKeyWords are expecting.

     
  • Neil Hodgson

    Neil Hodgson - 2006-03-27
    • status: open-duplicate --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2006-03-27

    Logged In: YES
    user_id=12579

    Implemented in 1.68.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks