Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 469974

Summary: Syntax highlighting for .gitignore and .cfignore
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Carolyn_MacLeod, curtis.windatt.public
Version: 8.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2015-06-11 12:08:07 EDT
In a production environment, I observed that the 2 most frequently opened unregistereed file types were: 

 .gitignore
 .cfignore

We should have syntax highlighting for these. The format is trivial, but it does have comments, operators, negated patterns, etc.
Comment 1 Mark Macdonald CLA 2015-06-11 12:10:16 EDT
Also, the next 2 file types in the list are:

 .git
 config

Which implies that users are going into their .git/config file and editing it manually to change their repo configuration. So the Git 'config' format would be another great one to highlight.
Comment 2 Carolyn MacLeod CLA 2015-06-11 12:13:16 EDT
Grant is the syntax highlighting guy.  :)
Comment 3 Curtis Windatt CLA 2015-06-23 17:06:40 EDT
Marking as 9.0 since we don't have a 10.0 milestone yet.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4edcc1e1d29c6ac475fa6523b7681371ca6c7096

Pushed an initial attempt for the .gitignore and config files.  Straightforward to get inline comments with # working, but the same code for ; comments in config files doesn't work.  Had similar issues working with [] and other reserved characters (I am aware that you have to double backslash to escape).

Grant, can you take a peek and make sure I didn't do anything foolish.  If you have time and can take a crack at adding ; comments and mark [] categories with some colouring that would be great.

From what I read on Pivotal's site .cfignore follows the same guidelines as .gitignore but I didn't see anything on whether it allows # comments.
Comment 4 Grant Gayed CLA 2015-06-25 00:50:32 EDT
Thanks for the initial work on this Curtis, I've pushed a follow-up that takes care of the remaining issues for .gitignore, .cfignore and config files: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=2cb6676bec1025dab00c32ce9687e079fc01f1b1 .