Add PHP/Perl template
This commit is contained in:
5
.vim/template/production.php
Normal file
5
.vim/template/production.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
call_user_func(function(){
|
||||||
|
});
|
||||||
|
|
||||||
11
.vim/template/production.pl
Normal file
11
.vim/template/production.pl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use 5.010;
|
||||||
|
|
||||||
|
INIT {
|
||||||
|
}
|
||||||
|
|
||||||
|
__END__
|
||||||
11
.vimrc
11
.vimrc
@@ -35,6 +35,17 @@ highlight Search cterm=none ctermbg=blue
|
|||||||
nmap <Esc>[Z <C-w>W
|
nmap <Esc>[Z <C-w>W
|
||||||
nmap <Tab> <C-w>w
|
nmap <Tab> <C-w>w
|
||||||
"
|
"
|
||||||
|
" template
|
||||||
|
function LoadPHPTemplate()
|
||||||
|
0r ~/.vim/template/production.pl
|
||||||
|
endfunction
|
||||||
|
function LoadPerlTemplate()
|
||||||
|
0r ~/.vim/template/production.php
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
autocmd BufNewFile *.pl call LoadPerlTemplate()
|
||||||
|
autocmd BufNewFile *.php call LoadPHPTemplate()
|
||||||
|
"
|
||||||
" other
|
" other
|
||||||
au BufNewFile,BufRead *.psgi setf perl
|
au BufNewFile,BufRead *.psgi setf perl
|
||||||
au BufNewFile,BufRead Makefile set noexpandtab
|
au BufNewFile,BufRead Makefile set noexpandtab
|
||||||
|
|||||||
Reference in New Issue
Block a user