Emacs region highlighting

后端 未结 2 962
悲&欢浪女
悲&欢浪女 2021-01-13 12:25

Is there a way to highlight a string in a text (but not ALL such strings) in a buffer where font-lock-mode is on.

Let\'s imagine I have a buffer with SQL mode and

相关标签:
2条回答
  • 2021-01-13 13:15

    Have a look at http://www.emacswiki.org/emacs/HighlightTemporarily.

    Both MarkerPens and Highlight provide functions to highlight a region.

    0 讨论(0)
  • 2021-01-13 13:19

    Maybe this helps:

    • open ***scratch* buffer and enter:
    
    (with-current-buffer "foo" (add-text-properties 1 10 '(comment t face highlight)))
    
    • then evaluate with C-j

    Characters 1-10 will be highlited in buffer "foo".

    0 讨论(0)
提交回复
热议问题