簡體   English   中英

org-mode 是否解決了這 5 個 `hi-lock` 問題?

[英]Does org-mode solve these 5 `hi-lock` problems?

對於很多參考文件,我相當沉迷於hi-locktext-mode和非常簡單的 TAB 實用程序的組合。

這是一個簡單的例子。 文件

hi-lock: (("===^^^===" (0 (quote compilation-line-number) t)))
hi-lock: (("http.?://.*" (0 (quote browse-url-button) t)))
===^^^===

===^^^===
Flutter Navigation
    Routes and Navigation
        Navigator       https://api.flutter.dev/flutter/widgets/Navigator-class.html
        Named Routes        https://docs.flutter.dev/cookbook/navigation/named-routes
===^^^===
etc..
===^^^===

呈現如下。

Emacs 上的 hi-lock 和文本模式

這很好用。

  • 我可以插入線條來突出顯示部分之間的划分。
  • 我看到 HTTP 鏈接清楚地突出顯示(即使我仍然需要剪切和粘貼才能訪問它們)。
  • 如前所述,TAB 提供了足夠的“節”和“子節”語義。
  • 這只是文字。 這不是一個微不足道的優勢,因為我的操作系統 (macOS) 索引.txt文件。 可能有一種方法可以推動它索引其他擴展。 盡管如此,任何其他文件格式(尤其是 LaTeX)的命令都會成為障礙。

但也存在幾個問題。

  • 我需要為每個文件手動維護(否則不必要) hi-lock header。
  • 我需要維護正則表達式(盡管這對於棘手的情況可能很有趣)。
  • hi-lock的語義是可疑的。 (為什么選擇compilation-line-number作為分隔線?)
  • colors 之后,保持合理的配色方案變得困難。
  • 使用 TAB 保持縮進很費力(正如您從 URL 的未對齊中看到的那樣)。

org-mode 是否解決了這些問題,同時保持了text-modehi-lock的優勢?

如果您對 ORG 感到滿意,我特別想看看如何使用 ORG 以同樣(或更好)的方式呈現上面的代碼片段。

有關的:

問題的精神是:

  1. 我懶得這么頻繁地寫配置。
  2. 我正在尋找最大的信噪比。

以下是一個補救(工作)解決方案,用於從text-modehi-lock的組合遷移到org-mode的路徑。

使用以下.emacs文件。

(add-to-list 'default-frame-alist '(background-color . "black"))
(add-to-list 'default-frame-alist '(foreground-color . "white"))
(set-frame-font "-*-*-medium-r-normal--24-*-*-*-*-*-*-*")

(setq org-startup-indented t)
(require 'org-superstar)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))

以下幾行

* Flutter Navigation
** Routes and Navigation
- Navigator     https://api.flutter.dev/flutter/widgets/Navigator-class.html
- Named Routes  https://docs.flutter.dev/cookbook/navigation/named-routes

* etc..

渲染如下。

呈現的組織模式框架

盡管這既不解決分隔線也不解決制表符問題。

分隔線很容易,如果它們用於 output(PDF 等)而不是 Emacs 顯示本身。

還...

  • 使用系統范圍的瀏覽器 ( 1 , 2 ) 打開 URL。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM