Skip to content

lixiuran/dot_files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VIM as a PHP IDE

  1. vim 编写php文件如何添加class注释或function注释?
git clone https://github.com/lixiuran/dot_files.git

cp ./vim/php-doc.vim /usr/share/vim/vim73/autoload/php-doc.vim [注意你的vim的版本]

vim ~\.vimrc

source /usr/share/vim/vim73/autoload/php-doc.vim
inoremap <C-P> <ESC>:call PhpDocSingle()<CR>i
nnoremap <C-P> :call PhpDocSingle()<CR>
vnoremap <C-P> :call PhpDocRange()<CR> 

然后保存退出,随便编写一个php文件,在class或function所在的行按下 control+p 看看发生了什么?

  1. vim 编写php,java,python 时如何向IDE一样自动提示函数?
unzip ./vim/neocomplcache-8.0.zip -d ./neocomplcache 

sudo cp -rfv ./neocomplcache/autoload/* /usr/share/vim/vim73/autoload/
sudo cp -rfv ./neocomplcache/plugin/* /usr/share/vim/vim73/plugin/
sudo cp -rfv ./neocomplcache/doc/* /usr/share/vim/vim73/doc/

vim ~/.vimrc

if &term=="xterm"
  set t_Co=8
  set t_Sb=^[[4%dm
  set t_Sf=^[[3%dm
endif
let g:neocomplcache_enable_at_startup = 1

然后保存退出,随便编写一个php文件,任意写个php自带的函数,看看有没有提示!

About

LINUX DOT RELATE FILE OF CONFIG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published