Browse Source

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 years ago
parent
commit
a0078532a8
5 changed files with 68 additions and 66 deletions
  1. 2 2
      Makefile
  2. 6 4
      README
  3. 6 6
      ftdetect/kamailio.vim
  4. 54 0
      syntax/kamailio.vim
  5. 0 54
      syntax/ser.vim

+ 2 - 2
Makefile

@@ -3,5 +3,5 @@ all:
 install:
 install:
 	mkdir -p ~/.vim/ftdetect
 	mkdir -p ~/.vim/ftdetect
 	mkdir -p ~/.vim/syntax
 	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
README

@@ -1,15 +1,15 @@
 Overview
 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.
 enable syntax highlighting for them.
 
 
 Install
 Install
 -------
 -------
 
 
 Run 'make install' in this folder, or:
 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
 Usage
 -----
 -----
@@ -17,4 +17,6 @@ Usage
 - autodetection is based on .cfg extension and match of #!SER,
 - autodetection is based on .cfg extension and match of #!SER,
 #!KAMAILIO (and other variants), modparam or route keywords in
 #!KAMAILIO (and other variants), modparam or route keywords in
 first 400 lines of file. You can enable syntax highlighting for files
 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
ftdetect/ser.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() 
 func! s:cfgType() 
    let max = line("$") > 400 ? 400 : line("$") 
    let max = line("$") > 400 ? 400 : line("$") 
    for n in range(1, max) 
    for n in range(1, max) 
       if getline(n) =~ '^\s*#!\(KAMAILIO\|OPENSER\|SER\|ALL\|MAXCOMPAT\)' 
       if getline(n) =~ '^\s*#!\(KAMAILIO\|OPENSER\|SER\|ALL\|MAXCOMPAT\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
          return 
       elseif getline(n) =~ '^\s*#!\(define\|ifdef\|endif\|subst\|substdef\)' 
       elseif getline(n) =~ '^\s*#!\(define\|ifdef\|endif\|subst\|substdef\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
          return 
       elseif getline(n) =~ '^\s*!!\(define\|ifdef\|endif\|subst\|substdef\)' 
       elseif getline(n) =~ '^\s*!!\(define\|ifdef\|endif\|subst\|substdef\)' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
          return 
       elseif getline(n) =~ '^\s*modparam\s*(\s*"[^"]\+"' 
       elseif getline(n) =~ '^\s*modparam\s*(\s*"[^"]\+"' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
          return 
       elseif getline(n) =~ '^\s*route\s*{\s*' 
       elseif getline(n) =~ '^\s*route\s*{\s*' 
-         set filetype=ser 
+         set filetype=kamailio
          return 
          return 
       endif 
       endif 
    endfor 
    endfor 

File diff suppressed because it is too large
+ 54 - 0
syntax/kamailio.vim


File diff suppressed because it is too large
+ 0 - 54
syntax/ser.vim


Some files were not shown because too many files changed in this diff