Emacs高亮设置:Hi-Lock mode笔记

来源:互联网 发布:淘宝店铺代运营方案 编辑:程序博客网 时间:2024/04/20 02:50

Hi-Lock mode

  1. 相关命令      #+CAPTION:键绑定

    Key bindingCommand NameDescriptionM-s h lhighlight-lines-matching-regexpHighlights all lines matching a regular expressionM-s h phighlight-phraseHighlights everything matching a phraseM-s h rhighlight-regexpHighlights everything matching a regular expressionM-s h uunhighlight-regexpDeletes the highlighter under pointM-s h whi-lock-write-interactive-patternsInserts a list of Hi-Lock patterns into the bufferM-s h fhi-lock-find-patternsSearches for Hi-Lock patterns in the buffer to use.
  2. 保存高亮设置

    使用命令M-s h w会把当前的高亮设置用注释的方式写在当前文件的头部.

    当Emacs进入hi-lock-mode后,会自动搜索文件头部的10000个字节(由变量`hi-lock-file-patterns-range`决定)找到高亮信息并执行高亮操作

    Emacs进入hi-lock-mode后,若搜索到有高亮设置信息,会提示你是否应用该高亮信息,若想自动应用该高亮信息在.emacs中添加如下配置项

    (global-hi-lock-mode 1)(setq hi-lock-file-patterns-policy #'(lambda (dummy) t))


0 0