mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Added nanorc for Dockerfiles
Signed-off-by: Matt Bentley <matt@docker.com>
This commit is contained in:
		
							parent
							
								
									a242ceaa09
								
							
						
					
					
						commit
						76bc44fb91
					
				
					 2 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										26
									
								
								contrib/syntax/nano/Dockerfile.nanorc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								contrib/syntax/nano/Dockerfile.nanorc
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
## Syntax highlighting for Dockerfiles
 | 
			
		||||
syntax "Dockerfile" "Dockerfile[^/]*$"
 | 
			
		||||
 | 
			
		||||
## Keywords
 | 
			
		||||
icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]"
 | 
			
		||||
 | 
			
		||||
## Brackets & parenthesis
 | 
			
		||||
color brightgreen "(\(|\)|\[|\])"
 | 
			
		||||
 | 
			
		||||
## Double ampersand
 | 
			
		||||
color brightmagenta "&&"
 | 
			
		||||
 | 
			
		||||
## Comments
 | 
			
		||||
icolor cyan "^[[:space:]]*#.*$"
 | 
			
		||||
 | 
			
		||||
## Blank space at EOL
 | 
			
		||||
color ,green "[[:space:]]+$"
 | 
			
		||||
 | 
			
		||||
## Strings, single-quoted
 | 
			
		||||
color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
 | 
			
		||||
 | 
			
		||||
## Strings, double-quoted
 | 
			
		||||
color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
 | 
			
		||||
 | 
			
		||||
## Single and double quotes
 | 
			
		||||
color brightyellow "('|\")"
 | 
			
		||||
							
								
								
									
										32
									
								
								contrib/syntax/nano/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								contrib/syntax/nano/README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
Dockerfile.nanorc
 | 
			
		||||
=================
 | 
			
		||||
 | 
			
		||||
Dockerfile syntax highlighting for nano
 | 
			
		||||
 | 
			
		||||
Single User Installation
 | 
			
		||||
------------------------
 | 
			
		||||
1. Create a nano syntax directory in your home directory:
 | 
			
		||||
 * `mkdir -p ~/.nano/syntax`
 | 
			
		||||
 | 
			
		||||
2. Copy `Dockerfile.nanorc` to` ~/.nano/syntax/`
 | 
			
		||||
 * `cp Dockerfile.nanorc ~/.nano/syntax/`
 | 
			
		||||
 | 
			
		||||
3. Add the following to your `~/.nanorc` to tell nano where to find the `Dockerfile.nanorc` file
 | 
			
		||||
  ```
 | 
			
		||||
## Dockerfile files
 | 
			
		||||
include "~/.nano/syntax/Dockerfile.nanorc"
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
System Wide Installation
 | 
			
		||||
------------------------
 | 
			
		||||
1. Create a nano syntax directory: 
 | 
			
		||||
  * `mkdir /usr/local/share/nano`
 | 
			
		||||
 | 
			
		||||
2. Copy `Dockerfile.nanorc` to `/usr/local/share/nano`
 | 
			
		||||
  * `cp Dockerfile.nanorc /usr/local/share/nano/`
 | 
			
		||||
 | 
			
		||||
3. Add the following to your `/etc/nanorc`:
 | 
			
		||||
  ```
 | 
			
		||||
## Dockerfile files
 | 
			
		||||
include "/usr/local/share/nano/Dockerfile.nanorc"
 | 
			
		||||
  ```
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue