Emacs PHP setting
;;打开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);
}
}
?>
分享到:
相关推荐
GNU Emacs for windows
emacs for windows..........
自诞生以来,Emacs演化出了众多分支,其中使用最广泛的两种分别是:1984年由Richard Stallman发起并由他维护至今的GNU Emacs,以及1991年发起的XEmacs。XEmacs是GNU Emacs的分支,至今仍保持着相当的兼容性。它们都...
Emacs of Linux 是最权威的Emacs 说明文档
emacs for windows 23.1.........
Major mode for Emacs for editing MATLAB code, and running MATLAB in an inferior shell.zip
emacs,ide,自定义编辑器
emacs,最新版,神一样的编辑器,官网下比较慢,这里下载速度可以
irfc for emacs rfc文档
Unfortunately Emacs has quite a reputation for being difficult to learn and hard to use. With this book this will not be true for you, for the following reasons: The book is organized in a way that...
emacs for windows 23.1.........
emacs for windows 23.1.........
emacs sdcv elisp emacs sdcv elisp
Emacs Key binding for Delphi 7(親測),Delphi xe2(也可以用) 使用方法: 使用delphi安裝MyEmacs組件即可, 每次打開delphi時,需要在Key Mapping中去掉勾選【Buffer List】這個Module即可, 里面有一些我自己的快捷...
Emacs23.1 emacs config for C/C++ 最近更新
linux下emacs安装,里面有软件安装包和详细的安装文档~~
Emacs Windows版编辑器。 博文参考https://blog.csdn.net/redguardtoo/article/details/7222501/
GNU Emacs Lisp Reference Manual For Emacs Version 22.1 Revision 2.9, April 2007
Pymacs aims to employ Python as an extension language for Emacs rather than the other way around, and this asymmetry is reflected in some design choices. Within Emacs Lisp code, one may load and use ...
Emacs使用详解Emacs使用详解Emacs使用详解