"Files && folders in the current directory
Let g:netrw_winsize=35
Let g:netrw_liststyle=1
Nmap <silent> <S-l>:sexplore!<cr>
The Generate class
function! Lu_class ()
Call Append (0, "<?php")
Call Append (1, "")
Call Append (2, "/**")
Call Append (3, "* File:". Expand ("%:t"). " Date: ". Strftime ("%y/%m/%d "))
Call Append (4, "* @author Lucifer <[email protected]>")
Call Append (5, "*/")
Call Append (6, "class A extends B {")
Call Append (7, "")
Call Append (8, "/** */")
Call Append (9, "Public function __construct ($id, $module =null) {")
Call Append (10, "")
Call Append (11, "")
Call Append (12, "")
|...call Append (13, "}")
Call Append (14, "")
Call Append (15, "}")
Endfunction
The Build method
function! Lu_func ()
Let L = Line (".")
Call Append (l+0, "/**")
Call Append (l+1, "* note")
Call Append (l+2, "*")
Call Append (l+3, "* @param ...")
Call Append (L+4, "* @author Lucifer <[email protected]>")
Call Append (l+5, "* @return void")
Call Append (L+6, "*/")
Call Append (l+7, "Public function f () {")
Call Append (L+8, "")
Call Append (L+9, "")
Call Append (L+10, "")
Call Append (l+11, "}")
Call Append (l+12, "")
Endfunction
function! Lu_single ()
Let L = Line (".")
Call Append (L, "/** Note * * *")
Call Append (L+1, "")
Endfunction
function! Lu_var ()
Let L = Line (".")
Call Append (l+0, "/**")
Call Append (l+1, "* note")
Call Append (l+2, "* @var type")
Call Append (l+3, "*/")
Call Append (L+4, "")
Endfunction
Map <S-f>: Call Lu_func () <CR>
Map <S-c>: Call Lu_class () <CR>
Map <S-v>: Call Lu_var () <CR>
Vim Automatic generation