在vim中,我們可以使用dotvim文件中的「設置cursorline」來打開它。有沒有辦法在emacs中做到這一點?emacs:突出顯示當前行的下劃線
14
A
回答
2
我不認爲裏面有完全相同的內容。您可以使用hl-line-mode來突出顯示當前行,並且定製該模式可讓您將突出顯示設置爲下劃線而不是默認的不同背景色 - - 但是下劃線你會在行內文本的末尾停下來,而不是繼續到窗口的邊緣。
18
12
有一個關於這個話題的好博客文章:M-x all-things-emacs
下面的代碼(輸入機智M-:或在〜/的.emacs)使用RGB代碼#222爲背景色(如果你在256-color mode!)並在當前行上加下劃線。取消設置前景色使用默認顏色,例如在突出顯示的行上保留C++顏色。
(global-hl-line-mode 1)
(set-face-background 'highlight "#222")
(set-face-foreground 'highlight nil)
(set-face-underline-p 'highlight t)
您可以檢查您是否需要更改highlight
或(據我所知以上)hl-line
用M-x和:
describe-face <RET> highlight
describe-face <RET> hl-line
此命令會顯示用於高亮顯示當前行的字體外觀的所有設置。你應該得到這樣的輸出:
Face: highlight (sample) (customize this face)
Documentation:
Basic face for highlighting.
Family: unspecified
Foundry: unspecified
Width: unspecified
Height: unspecified
Weight: unspecified
Slant: unspecified
Foreground: unspecified
Background: #222
Underline: t
Overline: unspecified
Strike-through: unspecified
Box: unspecified
Inverse: unspecified
Stipple: unspecified
Font: unspecified
Fontset: unspecified
Inherit: unspecified
相關問題
- 1. 在emacs中,我該如何突出顯示當前幀中的當前行?
- 2. 突出顯示當前行中的JTextPane
- 3. Visual Studio 2010當前行突出顯示
- 4. gridview突出顯示當前行
- 5. VIM突出顯示整個當前行
- 6. 突出顯示emacs中的行
- 7. 突出顯示或加下劃線所選的TabPageIndicator
- 8. 文本下劃線顯示下劃線
- 9. emacs magit diff突出顯示
- 10. Emacs區域突出顯示
- 11. 括號突出顯示 - emacs
- 12. 刪除Emacs突出顯示
- 13. 文字下劃線,並突出顯示PDF渲染
- 14. 突出顯示當前的鏈接Javascript
- 15. DataGrip當前語句突出顯示
- 16. JQuery突出顯示當前菜單項
- 17. jQuery當前頁面突出顯示
- 18. css突出顯示當前頁面
- 19. YUI日曆突出顯示當前daty
- 20. 突出顯示當前標籤頁?
- 21. 突出顯示當前分頁頁面?
- 22. Emacs上的Scaml語法突出顯示
- 23. 奇怪的Emacs突出顯示問題
- 24. 在emacs中突出顯示的Python
- 25. 突出顯示當前側邊欄中的當前菜單項
- 26. 在高地圖中劃線時,突出顯示區域線圖
- 27. 在Vim中突出顯示當前行的第70個字符
- 28. 如何關閉Netbeans中的當前行突出顯示?
- 29. C# - 突出顯示RichTextBox中的當前行
- 30. 如何突出顯示Text小部件的當前行?