浏览代码

utils/misc/vim: vim specific files migrated to name kamailio

- vim syntax and autodetect files use now kamailio, to be easier
  correlated with the name of packaged distribution
- syntax highlighting is identified now my kamailio (e.g., 'setf kamailio')
Daniel-Constantin Mierla 11 年之前
父节点
当前提交
e4b6e43605

+ 2 - 2
utils/misc/vim/Makefile

@@ -3,5 +3,5 @@ all:
 install:
 	mkdir -p ~/.vim/ftdetect
 	mkdir -p ~/.vim/syntax
-	cp ftdetect/ser.vim ~/.vim/ftdetect/
-	cp syntax/ser.vim ~/.vim/syntax/
+	cp ftdetect/kamailio.vim ~/.vim/ftdetect/
+	cp syntax/kamailio.vim ~/.vim/syntax/

+ 6 - 4
utils/misc/vim/README

@@ -1,15 +1,15 @@
 Overview
 --------
 
-Vim scripts to auto-detect SER and Kamailio configuration files and
+Vim scripts to auto-detect Kamailio configuration files and
 enable syntax highlighting for them.
 
 Install
 -------
 
 Run 'make install' in this folder, or:
-	- copy ftdetect/ser.vim to ~/.vim/ftdetect/ser.vim
-	- copy syntax/ser.vim to ~/.vim/syntax/ser.vim
+	- copy ftdetect/kamailio.vim to ~/.vim/ftdetect/kamailio.vim
+	- copy syntax/kamailio.vim to ~/.vim/syntax/kamailio.vim
 
 Usage
 -----
@@ -17,4 +17,6 @@ Usage
 - autodetection is based on .cfg extension and match of #!SER,
 #!KAMAILIO (and other variants), modparam or route keywords in
 first 400 lines of file. You can enable syntax highlighting for files
-not auto-detected with vim command: "setf ser".
+not auto-detected with vim command:
+
+  setf kamailio

+ 6 - 6
utils/misc/vim/ftdetect/ser.vim → utils/misc/vim/ftdetect/kamailio.vim

@@ -1,22 +1,22 @@
-" Copy this file to $HOME/.vim/ftdetect/ser.vim
+" Copy this file to $HOME/.vim/ftdetect/kamailio.vim
 
 func! s:cfgType() 
    let max = line("$") > 400 ? 400 : line("$") 
    for n in range(1, max) 
       if getline(n) =~ '^\s*#!\(KAMAILIO\|OPENSER\|SER\|ALL\|MAXCOMPAT\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
       elseif getline(n) =~ '^\s*#!\(define\|ifdef\|endif\|subst\|substdef\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
       elseif getline(n) =~ '^\s*!!\(define\|ifdef\|endif\|subst\|substdef\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
       elseif getline(n) =~ '^\s*modparam\s*(\s*"[^"]\+"' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
       elseif getline(n) =~ '^\s*route\s*{\s*' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
       endif 
    endfor 

文件差异内容过多而无法显示
+ 54 - 0
utils/misc/vim/syntax/kamailio.vim


文件差异内容过多而无法显示
+ 0 - 54
utils/misc/vim/syntax/ser.vim


部分文件因为文件数量过多而无法显示