Emacs for PHP setting
EmacsPHPsetting
;;打开php模式
(require 'php-mode) (add-hook 'php-mode-user-hook 'turn-on-font-lock) ;;(setq default-directory "F:/i9fox/I9fox/") ;;根据文件扩展名自动php-mode (add-to-list 'auto-mode-alist '("\\.php[34]?\\'\\|\\.phtml\\'" . php-mode)) ;;开发项目时,php源文件使用其他扩展名 (add-to-list 'auto-mode-alist '("\\.module\\'" . php-mode)) (add-to-list 'auto-mode-alist '("\\.inc\\'" . php-mode)) (setq php-completion-file "~/.emacs.d/php/php-completion-file") (global-set-key (kbd "M-/") 'php-complete-function) ;;php运行函数 (define-key php-mode-map [menu-bar php php-run] '("Run the PHP Program" . php-run)) (defun php-run () (interactive) (shell-command (concat "php -f \"" (read-file-name "Input file name: ") "\"")) ) ;;php 运行快捷键 (define-key php-mode-map "\C-c\C-r" 'php-run) ;;Personal information (setq user-full-name "Jiang Hao") (setq user-mail-address "jianghao****@gmail.com")
php-completion-file的函数列表和用如下php代码生成
<?php $extensions = get_loaded_extensions(); foreach($extensions as $each_ext){ $ext_funcs = get_extension_funcs($each_ext); foreach($ext_funcs as $func){ file_put_contents('./fun',"$func\n",FILE_APPEND); } } ?>
相关推荐
Noneyes 2020-11-10
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23