Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
默认情况下,mumamo alt php标记模式_Php_Html_Emacs - Fatal编程技术网

默认情况下,mumamo alt php标记模式

默认情况下,mumamo alt php标记模式,php,html,emacs,Php,Html,Emacs,我昨天刚开始玩emacs,我正在做一个项目。无论如何,我已经开始在web开发工作中使用NXHTMLMumamo,并且一切正常,除了HTML属性包含的内容是这样写的 <element attribute="<?= _ID ?>"></element> 类似这样的东西: (add-hook 'nxhtml-mumamo-mode-hook (lambda () (mumamo-alt-php-tags-mode 1))) (add-hook 'nxhtml-m

我昨天刚开始玩emacs,我正在做一个项目。无论如何,我已经开始在web开发工作中使用NXHTMLMumamo,并且一切正常,除了HTML属性包含的内容是这样写的

<element attribute="<?= _ID ?>"></element>
类似这样的东西:

(add-hook 'nxhtml-mumamo-mode-hook (lambda () (mumamo-alt-php-tags-mode 1)))
(add-hook 'nxhtml-mumamo-mode-hook 'enable-alt-tags-in-certain-files)
(defun enable-alt-tags-in-certain-files ()
  "enable mumamo-alt-php-tags-mode in .php and .html files"
  (when (string-match "\\.php$\\|\\.html\\$" (buffer-file-name))
    (mumamo-alt-php-tags-mode 1)))
这将导致
nxhtml-mumamo模式下的所有缓冲区也处于
mumamo-alt-php-tags模式下
,如果您想将其限制为
.html
.php
缓冲区,您可以添加一些更复杂的内容,如:

(add-hook 'nxhtml-mumamo-mode-hook (lambda () (mumamo-alt-php-tags-mode 1)))
(add-hook 'nxhtml-mumamo-mode-hook 'enable-alt-tags-in-certain-files)
(defun enable-alt-tags-in-certain-files ()
  "enable mumamo-alt-php-tags-mode in .php and .html files"
  (when (string-match "\\.php$\\|\\.html\\$" (buffer-file-name))
    (mumamo-alt-php-tags-mode 1)))

太好了,谢谢。我现在要用第一个,因为它正是我想要的,但是谢谢扩展版本。如果可以的话,我会提高投票率,但我还是个新手。即使没有提高投票率的最低声誉,你也可以接受你所问问题的答案。