Hi,
The nature of my query makes it difficult to figure out if the
question has been asked already. If so, I'd be grateful if you could
direct me to that thread.
I have a shell script (yaourt on Arch Linux) that launches a text
editor for some files (the names could be PKGBUILD, *.install, or
something else). The opened file is either a Bash script or has a bash-
like syntax. If I want syntax highlighting, I have to click on
Language->Shell. What command-line arguments could I use to launch
scite such that the subsequent "-open:xxx" would pre-select the Shell
lexer for xxx?
> I have a shell script (yaourt on Arch Linux) that launches a text
> editor for some files (the names could be PKGBUILD, *.install, or
> something else). The opened file is either a Bash script or has a bash-
> like syntax.
Thank you for the reply. But I can't really control the content of
these files.
Here is some more context: Arch Linux has a package build system that
calls various shell scripts, and these scripts are not meant to be
executed on their own, and so, do not have the #! line. Also, these
scripts are written by many (hundreds of?) people, and in a very
specific format. The scripts sets a few specific variables, defines a
few specific functions, etc. The package installer that I use launches
my chosen editor to let me quickly examine or modify these files
before I install each package.
On Aug 3, 11:47 pm, Neil Hodgson <nyamaton...@me.com> wrote:
> > I have a shell script (yaourt on Arch Linux) that launches a text
> > editor for some files (the names could be PKGBUILD, *.install, or
> > something else). The opened file is either a Bash script or has a bash-
> > like syntax.
> Here is some more context: Arch Linux has a package build system that
> calls various shell scripts, and these scripts are not meant to be
> executed on their own, and so, do not have the #! line.
You can try setting the lexer for files called * but that will interfere with settings for particular extensions:
lexer.*=bash
> Thank you for the reply. But I can't really control the content of
> these files.
> Here is some more context: Arch Linux has a package build system that
> calls various shell scripts, and these scripts are not meant to be
> executed on their own, and so, do not have the #! line. Also, these
> scripts are written by many (hundreds of?) people, and in a very
> specific format. The scripts sets a few specific variables, defines a
> few specific functions, etc. The package installer that I use launches
> my chosen editor to let me quickly examine or modify these files
> before I install each package.
If the others suggestions don't suit you, you can use a solution to reduce the inconvenience: if you look into the global properties file, you will find keyText and some other definitions used in the menu.language property.
You can copy these definitions into your user properties file and modify it to your taste (I have my own set of language choice.
And I defined, for example, a
keyJava=Ctrl+Shift+F12
property that I used in the Java entry:
&Java|java|$(keyJava)|\
You can do the same for your language, thus after opening it you will see it in plain text, but with a key hit (eg. F12 for quick access) you will switch to your language. That's an additional operation, so not as convenient as a default setting, but that becomes a minor annoyance.
> If the others suggestions don't suit you, you can use a solution to
> reduce the inconvenience: if you look into the global properties file,
> you will find keyText and some other definitions used in the
> menu.language property.
> You can copy these definitions into your user properties file and modify
> it to your taste (I have my own set of language choice.
> And I defined, for example, a
> keyJava=Ctrl+Shift+F12
> property that I used in the Java entry:
> &Java|java|$(keyJava)|\
> You can do the same for your language, thus after opening it you will
> see it in plain text, but with a key hit (eg. F12 for quick access) you
> will switch to your language. That's an additional operation, so not as
> convenient as a default setting, but that becomes a minor annoyance.
On 05/08/2012, Neil Hodgson <nyamaton...@me.com> wrote:
> Prash:
>> Here is some more context: Arch Linux has a package build system that
>> calls various shell scripts, and these scripts are not meant to be
>> executed on their own, and so, do not have the #! line.
> You can try setting the lexer for files called * but that will interfere
> with settings for particular extensions:
> lexer.*=bash
Hi Prash
I also use Arch and occasionally use Scite to edit PKGBUILD files. In
my “.SciTEUser.properties” file I have the following line which
automatically sets the lexer: