| 
									
										
										
										
											2017-12-24 13:22:00 +01:00
										 |  |  | " Vim filetype plugin | 
					
						
							|  |  |  | " Language:    CMake | 
					
						
							|  |  |  | " Maintainer:  Keith Smiley <keithbsmiley@gmail.com> | 
					
						
							| 
									
										
										
										
											2018-09-02 21:07:30 +02:00
										 |  |  | " Last Change: 2018 Aug 30 | 
					
						
							| 
									
										
										
										
											2024-04-20 17:53:08 +02:00
										 |  |  | " 2024 Apr 20  - add include and suffixadd (Vim Project) | 
					
						
							| 
									
										
										
										
											2017-12-24 13:22:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Only do this when not done yet for this buffer | 
					
						
							|  |  |  | if exists("b:did_ftplugin") | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-02 21:07:30 +02:00
										 |  |  | " save 'cpo' for restoration at the end of this file | 
					
						
							|  |  |  | let s:cpo_save = &cpo | 
					
						
							|  |  |  | set cpo&vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-24 13:22:00 +01:00
										 |  |  | " Don't load another plugin for this buffer | 
					
						
							|  |  |  | let b:did_ftplugin = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-20 17:53:08 +02:00
										 |  |  | let b:undo_ftplugin = "setl inc< sua< commentstring<" | 
					
						
							| 
									
										
										
										
											2017-12-24 13:22:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-02 21:07:30 +02:00
										 |  |  | if exists('loaded_matchit') | 
					
						
							|  |  |  |   let b:match_words = '\<if\>:\<elseif\>\|\<else\>:\<endif\>' | 
					
						
							|  |  |  |         \ . ',\<foreach\>\|\<while\>:\<break\>:\<endforeach\>\|\<endwhile\>' | 
					
						
							|  |  |  |         \ . ',\<macro\>:\<endmacro\>' | 
					
						
							|  |  |  |         \ . ',\<function\>:\<endfunction\>' | 
					
						
							|  |  |  |   let b:match_ignorecase = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   let b:undo_ftplugin .= "| unlet b:match_words" | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-20 17:53:08 +02:00
										 |  |  | setlocal include=\s*include | 
					
						
							|  |  |  | setlocal suffixesadd=.cmake,-config.cmake | 
					
						
							| 
									
										
										
										
											2017-12-24 13:22:00 +01:00
										 |  |  | setlocal commentstring=#\ %s | 
					
						
							| 
									
										
										
										
											2018-09-02 21:07:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | " restore 'cpo' and clean up buffer variable | 
					
						
							|  |  |  | let &cpo = s:cpo_save | 
					
						
							|  |  |  | unlet s:cpo_save |