Nano syntax highlighting: catch-all syntax for configuration files

After years of using nano, I only recently learned that it supports syntax coloring... (Why would they turn that off by default? ) Well, I thought I'll make up for it by making extra good use of it from now on...
Unfortunately it didn't ship a highlighting syntax for the the kind of files that I use nano the most for: system configuration files.
So I wrote my own, and after tweaking a bit here and there whenever I encountered a config file for which the highlighting wasn't satisfactory at first, I think the result is now good enough (screenshots below) that it's worth sharing with my fellow Arch users:
Code & Instructions:
Here is the syntax definition:
# config file highlighting
syntax "conf" "(\.(conf|config|cfg|cnf|rc|lst|list|defs|ini|desktop|mime|types|preset|cache|seat|service|htaccess)$|(^|/)(\w*crontab|mirrorlist|group|hosts|passwd|rpc|netconfig|shadow|fstab|inittab|inputrc|protocols|sudoers)$|conf.d/|.config/)"
# default text
color magenta "^.*$"
# special values
icolor brightblue "(^|\s|=)(default|true|false|on|off|yes|no)(\s|$)"
# keys
icolor cyan "^\s*(set\s+)?[A-Z0-9_\/\.\%\@+-]+\s*([:]|\>)"
# commands
color blue "^\s*set\s+\<"
# punctuation
color blue "[.]"
# numbers
color red "(^|\s|[[/:|<>(){}=,]|\])[-+]?[0-9](\.?[0-9])*%?($|\>)"
# keys
icolor cyan "^\s*(\$if )?([A-Z0-9_\/\.\%\@+-]|\s)+="
# punctuation
color blue "/"
color brightwhite "(\]|[()<>[{},;:=])"
color brightwhite "(^|\[|\{|\:)\s*-(\s|$)"
# section headings
icolor brightyellow "^\s*(\[([A-Z0-9_\.-]|\s)+\])+\s*$"
color brightcyan "^\s*((Sub)?Section\s*(=|\>)|End(Sub)?Section\s*$)"
color brightcyan "^\s*\$(end)?if(\s|$)"
# URLs
icolor green "\b(([A-Z]+://|www[.])[A-Z0-9/:#?&$=_\.\-]+)(\b|$| )"
# XML-like tags
icolor brightcyan "</?\w+((\s*\w+\s*=)?\s*("[^"]*"|'[^']*'|!?[A-Z0-9_:/]))*(\s*/)?>"
# strings
color yellow "\"(\\.|[^"])*\"" "'(\\.|[^'])*'"
# comments
color white "#.*$"
color blue "^\s*##.*$"
color white "^;.*$"
color white start="<!--" end="-->"
To install, save the above above code snippet as a file called conf.nanorc in the folder /usr/share/nano/ (or /usr/local/share/nano/ or similar if you feel strongly about the /usr <--> /usr/local separation), and then add the following to the end of the file /etc/nanorc:
## Configuration files (catch-all syntax)
include "/usr/share/nano/conf.nanorc"
Hints:
The colors I chose look good (imo) with the terminal background and color settings that I use, but might not look good, or even readable, with yours, so simply change the color names in the code snippet to whatever you prefer - valid color names are:
If you use a console with white background, you'll have to change at least the white color I chose for comments and punctuation.
The first code line in the snippet includes a regular expression that defines for which file names this syntax highlighting should be used. Whenever you encounter a config file that is not matched by this, but you would still like to open it with syntax highlighting, you can manually select this syntax with nano's -Y switch, like so:
nano -Y conf myConfigFile
Technical Note:
It's implemented as a single catch-all syntax, since nano chooses which syntax to apply based on the filename, and in the case of config files usually not much can be learned about the content format from the file name extension (.conf can by anything from flat key/value tuples to XML, .ini can be the official INI format or something else, etc...).
This means that some compromises have been made, so with this highlighting syntax probably no config file looks 100% as good as a highlighting syntax that would be specifically optimized for one kind of config format, but all in all the vast majority of config files should look pretty good.
Screenshots:
/etc/rc.conf,  /etc/hosts:
/etc/pacman.conf,  /etc/group:
xorg.conf,  some .desktop file:
httpd.conf (Apache config),  php.ini:
More screenshots:
/etc/fonts/fonts.conf (uses XML)
/etc/inittab
/etc/fstab
/etc/inputrc
/etc/mime.types
/etc/protocols
/etc/xinetd.conf
See Also:
nano syntax highlighting: GNU makefiles
Update [2012-01-28]: Made some more improvements to the syntax definition (see post)
Last edited by sas (2012-02-01 15:26:43)

doug piston wrote:I deal with alot of .mk files and would love to see it there.
You mean GNU makefiles?
I'm afraid they might be out of scope for this generic config-file syntax.
Logically they're not system config files, and technically they're a pretty specialized and complex format (different "types" of rules, rules spanning multiple lines, rules containing arbitrary Bash code, etc.).
This is how an .mk file currently looks with this highlighting syntax:
$ nano -Y conf /usr/lib/httpd/build/rules.mk
And apart from highlighting variables of the form $$abc or $(abc), I'm not sure how much can be improved here without breaking the highlighting for more conventional config files.
It would probably be better to create a specialized highlighting syntax just for .mk files.
EDIT: I sat down and did just that, here's the result: nano syntax highlighting: GNU makefiles, and here is how the above makefile snipped looks with it:
Last edited by sas (2012-02-01 15:18:52)

Similar Messages

  • Would like to use syntax highlighting in body text for code snippets

    I have a feeling this isn't actually possible without a whole lot of manual work, but I want to preserve syntax highlighting in code examples in my online help. Like this:
    All I can do is black text. |:^(
    I am using Robohelp 7, generating to WebHelp.
    Thanks for any help anyone can pass on!

    Hi all
    I'm not sure if it's a feasible solution for you, but what about displaying the code (complete with color coding - oops, that's colour coding for you English chaps) in whatever application you use. Then grab a screen capture of the relevant area and insert as an image in RoboHelp.
    My thought here is that you could maintain the code in the other app in case you need to change it at some point. Then if it does change, just snag another image.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Bloody newb: use syntax highlighting in Eclipse 3 for *.jsp?

    Hi all
    I'm developing in Java with Eclipse 3 and now I'm learning JSP on my own. I'd like to use the great Features of Eclipse 3 (like syntax completion etc) also in JSP files, but there's whether syntax highlighting nor completion or stuff.
    Can you help me out how to use Eclipse with all its features as a JSP IDE? Thank you.
    Josh

    You need a plugin which supports JSP.
    MyEclipse does (along with a lot of other stuff)
    Lomboz also provides a jsp editor
    You can find a whole lot of eclipse plugins at
    http://www.eclipseplugincentral.com/
    http://eclipse-plugins.2y.net/eclipse/index.jsp
    Cheers,
    evnafets

  • Best place for configuration files

    I am creating an application that gets installed into the the [ProgramFiles] directory. The application writes to a config file every time it closes and the user also has the ability to write a config file at any point in time. After the application is installed no configuration files can be written. I am getting the following error:  "LabVIEW:  File permission error. You do not have the correct permissions for the file."
    1. What do I need to do to be able to write config files to the directory where the application is installed?
    2. If I wanted to save the files in some users folder, how can I keep track of this path from the development environment, to the exe and then across different OS's?
    3. Is there a general convention/location for config files that the application needs to write to?
    I know during the build installer phase we can put data in all these different Microsoft folders. But is there a way to get the paths to these folders in my application? (see image below)
    I am running Windows 7 and LabVIEW 8.5.
    Thanks for your help
    -Anthony M.

    Win32 consists of several DLLs. It is not .Net but the original interface in Windows to access operation system functions. It is available on every Windows PC because it implements Windows. The LV VI "File Dialog" is just a wrapper for the Win32 function FileOpenEx Which every program uses to select a file.
    Storing user settings in the registry is outdatet. Modern Visual Studio programs store setting in files with .config extention.
    Settings may be stored in various places depending of their need.
    Settings which apply only to this special PC are stored where the application is installed. These settings are set during setup and won't change afterwards whithout any changes to the PC.
    Settings which are common to different Windows users are stored in the All users\Appdata folder. The path to this folder is in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common AppData. Typical data stored there are test setups or serial numbers of external devices.
    Data files which are common to different Windows users are stored in the All users\Data folder. The path to this folder is in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Documents. Typical data may be test result protocolls.
    Settings which are unique to different Windows users are stored in the<username> \Appdata folder. The path to this folder is in the registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData. Typical data may be personal number, department number.
    Data files which are unique to different Windows users are stored in the <username>\Data folder. The path to this folder is in the registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal.
    It is normal that the user has full acces to the last for paths and read access to the first path.
    Use the Example Finder to find the registry VI examples.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • 11g ER: Checkbox "Don't ask me again" for Configure File Type Associations

    Hi JDev team
    On opening JDev 11g the Configure File Type Associations dialog opens each time, allowing me to associate JDev with 4 different file types. I don't want to associate the file types with JDev, I haven't found an option to turn this off and it's starting to get annoying. Can you raise an ER to include a check box to ask "Don't ask me again" please?
    Cheers,
    CM.

    Ok I've done some digging and I think I've tracked down the issue - I'm guessing that you're running on Vista? This all has to do with the need to have elevated permissions to write to the registry on Vista.
    What I suggest you do is manually run JDeveloper as an administrator, having first deleted the Jdeveloper.jprFile, Jdeveloper.jpwFile, Jdeveloper.jspFile, and
    Jdeveloper.javaFile entries in the registry. Once you've run JDeveloper in this way you'll ok the dialog. Then on subsequent runs you should be able to run JDeveloper as a normal user without being troubled by the question.
    Normally we automatically handle the permission elevation on the first run, but I'm guessing that because you've had previous pre-production builds of JDveloper on your machine that's prevented that from occurring.
    Phew, this makes Unix permissions seem simple...

  • Apropriate location for configuration files.

    What are the issues with placing configuration files in /etc? In particular, with regards to configuration files shared between multiple applications.
    Would you rather see these files in /opt/companyname or /usr/local? Why?
    Further, does anyone know where I could find any standards documentation on exactly what types of files belong in which directories?
    Thanks!

    Take a look at the following documentation on docs.sun.com:
    -- docs.sun.com -> Solaris 7 -> System Admin Guide I -> Managing File System -> chapter 32.
    http://docs.sun.com:80/ab2/coll.47.8/SYSADV1/@Ab2PageView/idmatch(FSFILESYSAPPX-94408)#FSFILESYSAPPX-94408?Ab2Lang=C&Ab2Enc=iso-8859-1
    You will find that /etc/opt -> Configuration information for optional packages. Another typical location where such configuration files are kept are /var/opt -> Root of a subtree for varying files associated with software packages.
    You can also find alot of specific/additional information for files in /etc directory in 'man' pages (eg. man networks, etc). An example search order of configuration file by application for your reference.
         $HOME---->/var/opt/xyz---->/etc/opt/xyz---->/opt/xyz
    (most customizable)---------------------(least customizable)
    user specific--------------------------factory default
    config-----------------------------------config
    chulsoo
    DTS

  • How do I setup a catch-all account for a email account

    I have hundreds in fact thousands of email accounts from one domain. How do I setup a single account to download all the emails from orangehome.co.uk, eg. [email protected], [email protected] etc.

    ''rhogg4768 [[#question-1040523|said]]''
    <blockquote>
    I have hundreds in fact thousands of email accounts from one domain. How do I setup a single account to download all the emails from orangehome.co.uk, eg. [email protected], [email protected] etc.
    </blockquote>
    I have a similar situation with multiple accounts on a freeserve domain. This all worked fine up with Thunderbird up until about a month ago - not sure exactly when it stopped retrieving any mail apart from the main name items. I've never had to set anything up with the Freeserve/Orange servers as the response suggests - some setting in Thunderbird has been changed!

  • How to catch all logs to one file with rsyslog?

    Hi,
    I have this config in rsyslog:
    # cat /etc/rsyslog.conf
    # Minimal config
    $ModLoad imuxsock # provides support for local system logging
    $ModLoad imklog # provides kernel logging support
    $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
    $FileOwner root
    $FileGroup root
    $FileCreateMode 0640
    $DirCreateMode 0755
    $Umask 0022
    $WorkDirectory /var/spool/rsyslog
    $IncludeConfig /etc/rsyslog.d/*.conf
    # Un sol log
    *.* /var/log/missatges.log
    # Si hi ha notificacions crítiques (pànic), enviar per consola a tots els usuaris
    *.emerg :omusrmsg:*
    [root@serviedre ~]#
    but in 'missatges.log' there is no systemd-timesyncd output:
    # journalctl -n
    -- Logs begin at Fri 2010-01-01 01:00:05 CET, end at Mon 2014-12-08 18:33:08 CET. --
    Dec 08 18:31:20 serviedre systemd[162]: Starting Default.
    Dec 08 18:31:20 serviedre systemd[162]: Reached target Default.
    Dec 08 18:31:20 serviedre systemd[162]: Startup finished in 168ms.
    Dec 08 18:31:20 serviedre systemd[1]: Started User Manager for UID 0.
    Dec 08 18:31:44 serviedre systemd-timesyncd[129]: Using NTP server 86.59.80.170:123 (2.europe.pool.ntp.org).
    Dec 08 18:31:31 serviedre systemd[162]: Time has been changed
    Dec 08 18:31:31 serviedre systemd-timesyncd[129]: interval/delta/delay/jitter/drift 32s/-12.456s/0.115s/0.000s/+0ppm
    Dec 08 18:31:31 serviedre systemd[1]: Time has been changed
    Dec 08 18:32:03 serviedre systemd-timesyncd[129]: interval/delta/delay/jitter/drift 64s/+0.001s/0.113s/0.000s/+0ppm
    Dec 08 18:33:08 serviedre systemd-timesyncd[129]: interval/delta/delay/jitter/drift 128s/+0.004s/0.114s/0.001s/+15ppm
    [root@serviedre ~]# cat /var/log/missatges.log | grep drift
    [root@serviedre ~]#
    Why?
    Last edited by xanb (2014-12-17 09:54:50)

    This happens with a lot of info: `journalctl -b` prints:
    Dec 17 09:36:16 serviedre systemd[6276]: Received SIGRTMIN+24 from PID 6328 (kill).
    Dec 17 09:36:16 serviedre systemd[6277]: pam_unix(systemd-user:session): session closed for user root
    Dec 17 09:36:16 serviedre systemd[1]: Stopped User Manager for UID 0.
    Dec 17 09:36:16 serviedre systemd[1]: Stopping user-0.slice.
    Dec 17 09:36:17 serviedre systemd[1]: Removed slice user-0.slice.
    Dec 17 09:41:38 serviedre systemd-timesyncd[133]: interval/delta/delay/jitter/drift 2048s/-0.000s/0.099s/0.000s/+55ppm
    Dec 17 09:55:51 serviedre sshd[6333]: Accepted password for root from 172.26.0.7 port 35114 ssh2
    Dec 17 09:55:51 serviedre sshd[6333]: pam_unix(sshd:session): session opened for user root by (uid=0)
    Dec 17 09:55:51 serviedre systemd[1]: Starting user-0.slice.
    Dec 17 09:55:51 serviedre systemd[1]: Created slice user-0.slice.
    Dec 17 09:55:51 serviedre systemd[1]: Starting User Manager for UID 0...
    Dec 17 09:55:52 serviedre systemd[1]: Starting Session c2 of user root.
    Dec 17 09:55:52 serviedre systemd-logind[137]: New session c2 of user root.
    Dec 17 09:55:52 serviedre systemd[6335]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
    Dec 17 09:55:52 serviedre systemd[1]: Started Session c2 of user root.
    Dec 17 09:55:52 serviedre systemd[6335]: Starting Paths.
    Dec 17 09:55:52 serviedre systemd[6335]: Reached target Paths.
    Dec 17 09:55:52 serviedre systemd[6335]: Starting Timers.
    Dec 17 09:55:52 serviedre systemd[6335]: Reached target Timers.
    Dec 17 09:55:52 serviedre systemd[6335]: Starting Sockets.
    Dec 17 09:55:52 serviedre systemd[6335]: Reached target Sockets.
    Dec 17 09:55:52 serviedre systemd[6335]: Starting Basic System.
    Dec 17 09:55:52 serviedre systemd[6335]: Reached target Basic System.
    Dec 17 09:55:52 serviedre systemd[6335]: Starting Default.
    Dec 17 09:55:52 serviedre systemd[6335]: Reached target Default.
    Dec 17 09:55:52 serviedre systemd[6335]: Startup finished in 143ms.
    Dec 17 09:55:52 serviedre systemd[1]: Started User Manager for UID 0.
    Dec 17 10:15:46 serviedre systemd-timesyncd[133]: interval/delta/delay/jitter/drift 2048s/-0.000s/0.100s/0.000s/+55ppm
    Dec 17 10:19:43 serviedre systemd[1]: Reloading.
    Dec 17 10:19:44 serviedre systemd[1]: Unknown serialization item 'subscribed=:1.0'
    but
    [root@serviedre ~]# tail /var/log/missatges.log
    Dec 14 18:33:12 localhost kernel: [ 4.959569] mmcblk0: p1
    Dec 14 18:33:12 localhost kernel: [ 6.833607] EXT4-fs (sda1): re-mounted. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 9.783482] EXT4-fs (sda8): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 9.885975] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 10.004117] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 10.109992] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 10.243718] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 10.596835] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: discard
    Dec 14 18:33:12 localhost kernel: [ 12.914250] sunxi_emac sunxi_emac.0: eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
    Dec 14 18:33:22 localhost kernel: [ 23.247589] eth0: no IPv6 routers present
    [root@serviedre ~]#

  • Syntax Highlighting w/ Swing Text Package

    I have a question for you that I hope ever so much that you could answer just in the most abstract sense, I will figure out the code from what you have said hopefully. Any relavent parts that you think I should know, please point out.
    My question is, I'm trying to implement Syntax Highlighting for a code editor in Java (yes I know, like everyone else. It would REALLY be helpful if you did an updated Demo of a SyntaxEditor for JDK 1.4 BTW) anyway, I have already implemented Syntax Highlighting by overriding the PlainView and changing its drawLine method to parse the line, find the key words then draw them accordingly. However I cannot get over the sinking feeling that there is a better way to do this in JDK 1.4, I'm not worried about backward compatability. I'm only interested in the "sexiest" way to do this with Java. I started looking into the GlyphView, and that seems more of what I want, it has more control over the text elements and strong drawing abilities, I also noticed the GlyphPainter1 and GlyphPainter2, I tried to extend GlyphPainter2 and use it with my extended GlyphView and just change its paint method to parse the lines, but the class complains about not being public, even though in the source its class definition is "public class GlyphPainer2 extends GlyphView.GlyphPainter" which confused me.
    But at any rate, my basic question is how would YOU, implement Syntax Highlighting (code coloring) if you could do it from scratch with all the facilities of the 1.4 JDK. ALso, should I look into the Java2D API or is this over kill for what I'm doing? I just need a basic code color'er, nothing fancy. But I need the fonts and styles to be able to change, that's all. And international support would be nice.
    The type of answer I'm hoping for is something like "Create a new editor kit and then extend the GlyphView class and override its XYZ method to do your line parsing and then override the ABC method to do the actual painting of the line, this is the best way to do this in java"
    Best wishes,
    -rsk123

    I am searching for text highlighting code in java during 7 days.
    And I also agree with Mr. rsk123 's thought.
    I want to make editor to highlight code using java's general text package.
    But I can't find good source or class to satisfy me.
    Some code run well but it's not use the original java text package.
    Some code was made by using java text package but have a bug and not run pefectly.
    Now, I must choice a code for text highlighting.
    But until now I can't find a free code or comecial code for it.
    Anyway, I summarize my suffing result until now.
    ** I have stuied,
    . About java's text package in Swing Connection site.
    It's useful a little to understand the text package structure.
    (http://java.sun.com/products/jfc/tsc/articles/index.html)
    . How to make own EditorKit in 'Java Swing' book chapter 24.
    I think it's good. But difficult to read.
    (published by O'REILLY. Robert Eckstein)
    ** I have found program and have tested.
    1) JEdit (http://www.jedit.org)
    2) Jext(http://www.jext.org)
    3) Sun's sample using the JavaEditorKit
    (http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/index.html)
    4) Ostermiller's Syntax editor (http://ostermiller.org/syntax/editor.html)
    5) j (http://armedbear-j.sourceforge.net/)
    6) je 1.66 (http://mathsrv.ku-eichstaett.de/MGF/homes/grothmann/je/)
    *** Detail descriptions of the test
    1. May be run well but not use java text package.
    ==> JEdit (http://www.jedit.org), Jext(http://www.jext.org)
    - I executed JEdit and Jext program. it works very well.
    I think It's greate programs.
    - The editor class for these programs are
    org.gjt.sp.jedit.textarea.JEditTextArea class.
    The JEditTextArea class extends JComponent, not java text component.
    - JEditTextArea class started from 'jedit syntax package project'.
    You can download the syntax package if you only use syntax highlighting
    from http://syntax.jedit.org/ .
    - JEdit and Jext use for editor 'jedit syntax package' but have upgrade that
    package their own effort(may be)
    - For me, It's an only product run well without error.
    But unfortunately it's not use java text component.
    So I hesitane to use it.
    Because I should make almost code to support general editor function which
    supported in JTextComponent.
    2. Provided by Sun's developer site.
    ==> JavaEditorKit (http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/index.html)
    - It's made using JEditorPane. Great!!
    And have a good architecture. (I think)
    - But It use Scanner class which located in tools.jar package and
    have a bug which not supporting well comment syntax /* */.
    (Refer to http://developer.java.sun.com/developer/bugParade/bugs/4323090.html)
    Futhermore it display terrible exception message when typed "/*" string
    in the end position of java file. (I tested it)
    - I heard in the forum, someone made the own scanner class.
    (http://forum.java.sun.com/thread.jsp?thread=120564&forum=57&message=316083)
    He said,(he = rofshi)
    I wrote for my purposes a scanner based on the StreamTokenizer
    cl*** and set a corresponding object in the JavaView cl*** of
    the JavaKitTest.
    Then I placed the method of my Scanner cl*** that parses the
    given string and paints tokens in the method drawUnselected
    Text (instead of previous code).
    Of course, I erased all of the previous code related to the
    java Scanner.
    - For me, I like this style code and want to use it.
    But Scanner class have some bug and I can't cure that bug. Terrible...
    3. using JTextPane
    ==> http://ostermiller.org/syntax/editor.html
    - At first it's too slow.
    My computer is PentiumIII 350MHz Ram:256M Windows2000Por
    But when I press pgDown key quickly the display couldn't follow it.
    - And may be not support unicode.
    When I typed international code, exceptions displayed.
    (too much exceptios. may be caused repeating by thread.)
    (ArrayIndexOutOfBoundsException in JavaLexer.java 1022 ?)
    - For me, supporting international code is essential.
    So I can't use it.
    4. Do work well. But it use not understandable code for me.
    (not use general java text package)
    1)http://armedbear-j.sourceforge.net/
    2)http://www.rene-grothmann.de
    *** Finally, I have plan to make my own code using Mr rsk123's idea.
    (using GlyphView in jdk1.3 or jdk1.4)
    *** If you have a good information for text highliting of free code or
    comecial code pleas notify me.
    My address is [email protected]

  • Syntax highlighted program code in keynote?

    Is there any easy way insert programming code (in my case Ruby code) into a slide so it shows up with syntax highlighting and formating suitable for the code?
    I.E. so it looks like the highlighted code in Textmate or other gui editors?

    TextWrangler (and thus presumably BBEdit) do preserve their syntax colouring when PDFed, as does Taco HTML Edit. My guess is that this is capability is an app-by-app feature.
    If you were desperate for a PDF output to Keynote, you could always copy the text from Textmate and paste it into the freeware TextWrangler. You would likely have to adjust the default syntax colouring to match Textmate, but that would be relatively straightforward.

  • Catch-all configuration

    I am running multiple virtual domains with users associated with these domains and all is fine.
    I need to configure a 'catch-all' account for all emails sent to *@domain.com where * is users that are not defined.
    I tried the 'copy all undeliverable mail' option in system admin but get partial results? some emails get redirected to the mailbox I specified while others bounce back with a 550 'user unknown' error.
    I need a fool-proof way to do this - any guidance would be much appreciated
    Thanks

    Thanks for your assistance - here is the output (minus domain name which I masked for this post)
    stitch:/etc/postfix root# postconf -n
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    html_directory = no
    inet_interfaces = all
    localrecipientmaps =
    luser_relay = avik
    mail_owner = postfix
    mailboxsizelimit = 0
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mapsrbldomains =
    messagesizelimit = 104857600
    mydestination = $myhostname,localhost.$mydomain,localhost
    mydomain = localhost
    mydomain_fallback = localhost
    myhostname = stitch.domain.com - (masked for the purpose of this post)
    mynetworks = 127.0.0.0/8
    mynetworks_style = host
    newaliases_path = /usr/bin/newaliases
    ownerrequestspecial = no
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdclientrestrictions = permit_mynetworks rejectrblclient dnsbl.njabl.org permit
    smtpdpw_server_securityoptions = login,cram-md5,plain
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpdtls_certfile = /etc/certificates/Default.crt
    smtpdtls_keyfile = /etc/certificates/Default.key
    smtpduse_pwserver = yes
    smtpdusetls = yes
    unknownlocal_recipient_rejectcode = 550
    virtualmailboxdomains = hash:/etc/postfix/virtual_domains
    virtual_transport = lmtp:unix:/var/imap/socket/lmtp
    stitch:/etc/postfix root#

  • What causes JBO-33001: Cannot find the configuration file /common/bc4j.xcfg

    I know that the jbo exception message:
    JBO-33001: Cannot find the configuration file /common/bc4j.xcfg
    can be caused by several things including the file really not being there. But in my current case, I know it is there and can be found throgh the classpath, because I actually find it using Configuration.buildConfigurationFileNameFromClassPath and
    Configuration.getConfiguration just before calling Configuration.createRootApplicationModule. Is there any way to turn on a diagnostic to find out what is really wrong?
    I would also like to request an enhancement to give meaningful messages in the jbo exception.
    Roger

    This is on jdev 903 with patch running a local application attempting to connect to standalone OC4J 903. I think the error occurs before there is ever any attempt to make the connection to OC4J. Having one big catch-all exception for everything that can go wrong in creating the AM is pretty poor. I know in the past I have done manual editing of bc4j.xcfg and XML sentax errors cause exactly the same exception as not having the file at all. That is why I would at least like a list of all the causes behind the exception so I can go through and check them all.
    Thanks,
    Roger

  • XML Configuration Files Batch Processing

    Greetings All,
    I have configuration file in XML as follow:
    <property>
    <name> world.wide.web.complexity.level </name>
    <value> 10 </value>
    <description> describes how complex the web is getting, see exitement for related values</description>
    </property>
    So, I would like to write a java program, that will generate several copies of the above file but with different values for one or several properties.
    I have discovered JDOM, SAX, apache configuration and so many technologies but didn't find a simple solution to this simple problem at a first pass.
    Many thanks in advance for your help

    Here is a way to set global container properties.
    You can get your container to read a properties file by modifying opmn.xml as follows:
    <process-type id="ct01" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="oc4j-options" value="-p /filepath/properties.file"/>
    These can then be read in with a System.getProperty() command.

  • Faces-config.xml is the only configuration file or we can keep more

    Hi All,
    1) faces-config.xml is the only name specification allowed in JSF for configuration file or can we use another name for this configuration (like as struts) ?
    2) can we have multiple configuration files in JSF like as struts contains multiple configuration files for navigation ?
    Thanks,
    Rajesh Yarlagadda

    http://one-size-doesnt-fit-all.blogspot.fi/2007/01/using-multiple-faces-configxml-files-in.html
    Edited by: Nik on Sep 25, 2012 1:13 AM

  • WUC-5 No webtil configuration File specified

    Hi,
    I have a problem using Webutil.
    It gives me "WUC-5 No webtil configuration File specified" while running the form.
    The formsweb.cfg, webutil.env and all locations(in configuration files and classpath) are fine and
    Java Console output is
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 90290
    java.lang.ClassNotFoundException:oracle.forms.webutil.clientInfo.GetClientInfo
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    and so on ...
    I'm working on winXP and Forms (32) 9.0.2.9.0
    It would be really appreciated if somebody helps me out.
    Regards,
    Ali

    Hi,
    double check your configfuration settings and compare them with the configurations mentioned in the documentation. If webutil.cfg can't be found then the archives wont be either.
    Frank

Maybe you are looking for