I'm suprised there wasnt a file for .conf syntax highlighting for Apache users. So we can edit our settings easily. If someone has made one please post it here and share with the others ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, totally.
httpd.conf, .htaccess, for all this stuff I would love to have dedicated syntax colors.
I can use XML instead, but it only does half of the job.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very nice and useful indeed! Thank you for sharing.
My 0.2p: replace <UserLang name="Apache Conf" ext="conf"> with <UserLang name="Apache Conf" ext="conf htaccess">, so .htaccess files are recognized automatically.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is an official Scintilla lexer for .conf; you can easily create your own external lexer to use it.
Or use the NppExternalLexer plugin which includes the official .conf lexer (and custom PowerShell that is much better than the built in one, imo - but I'm a little biased ;) ). In section II of the readme included with that plugin is a step by step for making your own if you want, iirc it is a 10 step process and might take about 15-20 minutes if you already have a windows dev environment setup.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After checking my own httpd.conf I found some more keywords:
RewriteMap AddDefaultCharset DefaultLanguage RewriteLog RewriteLogLevel User Group AddLanguade AddCharset ForceType php_flag
and some other relevant only if you have mod_security:
SecRuleEngine SecRequestBodyAccess SecResponseBodyAccess SecResponseBodyMimeType SecResponseBodyLimit SecDefaultAction SecServerSignature SecComponentSignature SecUploadDir SecUploadKeepFiles SecRule SecAuditEngine SecAuditLogRelevantStatus SecAuditLogType SecAuditLog SecAuditLogParts SecArgumentSeparator SecCookieFormat SecRequestBodyInMemoryLimit SecDebugLog SecDebugLogLevel SecDataDir SecTmpDir LimitRequestBody LimitRequestFields LimitRequestFieldSize LimitRequestLine
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm suprised there wasnt a file for .conf syntax highlighting for Apache users. So we can edit our settings easily. If someone has made one please post it here and share with the others ;)
Here's a "quick hack" syntax highlighting file for Apache .conf files.
Please note: the list of keywords is not complete ...
<NotepadPlus>
<UserLang name="Apache Conf" ext="conf">
<Settings>
<Global caseIgnored="no" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">"00"00</Keywords>
<Keywords name="Folder+"><Directory <Folder <IfModule <FilesMatch <Files <VirtualHost <Location <Limit <LimitExcept</Keywords>
<Keywords name="Folder-"></Directory </Folder </IfModule </FilesMatch </Files </VirtualHost </Location </Limit </LimitExcept</Keywords>
<Keywords name="Operators">" + ></Keywords>
<Keywords name="Comment">1 2 0#</Keywords>
<Keywords name="Words1">ServerRoot ThreadsPerChild MaxRequestsPerChild Listen LoadModule DocumentRoot ServerAdmin ServerName ErrorLog LogLevel CustomLog Options AllowOverride Order Deny Allow Satisfy DirectoryIndex LogFormat ScriptAlias DefaultType TypesConfig AddType AddHandler AddOutputFilter MIMEMagicFile ErrorDocument SSLRandomSeed NameVirtualHost ServerAlias SetHandler ExtendedStatus UserDir Alias IndexOptions AddIconByEncoding AddIconByType AddIcon DefaultIcon ReadmeName IndexIgnore HeaderName Timeout KeepAlive MaxKeepAliveRequests KeepAliveTimeout UseCanonicalName AccessFileName ServerTokens ServerSignature HostnameLookups AliasMatch SetEnvIf RedirectMatch LanguagePriority ForceLanguagePriority DavLockDB Dav AuthType AuthName AuthUserFile AuthGroupFile Require BrowserMatch PidFile LockFile StartServers MinSpareServers MaxSpareServers MaxClients MinSpareThreads MaxSpareThreads StartThreads MaxRequestsPerThread ThreadStackSize MaxThreads MaxMemFree Require SSLRandomSeed SSLPassPhraseDialog SSLSessionCache SSLSessionCacheTimeout SSLMutex TransferLog SSLEngine SSLCipherSuite SSLCertificateFile SSLCertificateKeyFile SSLCertificateChainFile SSLCACertificatePath SSLCACertificateFile SSLCARevocationPath SSLCARevocationFile SSLVerifyClient SSLVerifyDepth SSLRequire SSLOptions Redirect ScriptInterpreterSource EnableMMAP EnableSendfile</Keywords>
<Keywords name="Words2">Include</Keywords>
<Keywords name="Words3">none warn from allow,deny deny,allow all None Deny,Allow Allow,Deny On on GET POST OPTIONS MultiViews SymLinksIfOwnerMatch IncludesNoExec Limit FileInfo AuthConfig FancyIndexing HTMLTable VersionSort Off off EMail Full full Prefer user Fallback prefer fallback Digest digest Basic basic redirect-carefully default builtin permanent temporary registry</Keywords>
<Keywords name="Words4">FollowSymLinks Includes Indexes ExecCGI MultiViews StdEnvVars</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
</NotepadPlus>
I'm looking for the same thing as well.
I might actually work on this provided I'm not hungover.
Yes, totally.
httpd.conf, .htaccess, for all this stuff I would love to have dedicated syntax colors.
I can use XML instead, but it only does half of the job.
sorry, didn't notice there are more replies. In the search results it only showed the starting post.
I'm going to try the solution by hrs.
It works!
I added a few keywords for my htaccess:
RewriteRule RewriteBase RewriteCond php_value ExpiresActive ExpiresDefault RewriteEngine
Very nice and useful indeed! Thank you for sharing.
My 0.2p: replace <UserLang name="Apache Conf" ext="conf"> with <UserLang name="Apache Conf" ext="conf htaccess">, so .htaccess files are recognized automatically.
Will update the hosted file tonight, cannot do so from office.
CChris
There is an official Scintilla lexer for .conf; you can easily create your own external lexer to use it.
Or use the NppExternalLexer plugin which includes the official .conf lexer (and custom PowerShell that is much better than the built in one, imo - but I'm a little biased ;) ). In section II of the readme included with that plugin is a step by step for making your own if you want, iirc it is a 10 step process and might take about 15-20 minutes if you already have a windows dev environment setup.
After checking my own httpd.conf I found some more keywords:
RewriteMap AddDefaultCharset DefaultLanguage RewriteLog RewriteLogLevel User Group AddLanguade AddCharset ForceType php_flag
and some other relevant only if you have mod_security:
SecRuleEngine SecRequestBodyAccess SecResponseBodyAccess SecResponseBodyMimeType SecResponseBodyLimit SecDefaultAction SecServerSignature SecComponentSignature SecUploadDir SecUploadKeepFiles SecRule SecAuditEngine SecAuditLogRelevantStatus SecAuditLogType SecAuditLog SecAuditLogParts SecArgumentSeparator SecCookieFormat SecRequestBodyInMemoryLimit SecDebugLog SecDebugLogLevel SecDataDir SecTmpDir LimitRequestBody LimitRequestFields LimitRequestFieldSize LimitRequestLine
Seems that I can't type straight tonight: change AddLanguade into AddLanguage