ubuntu16.04下Emacs 顯示行號和更改背景顏色

Emacs 顯示行號和更改背景顏色工具

直接安裝  apt install emacs網站

Emacs 顯示行號插件

Emacs須要第三方插件顯示行號
1  下載 linum.el。在網上搜一下,許多網站都提供下載。
2  複製 linum.el 到「/usr/share/emacs/site-lisp/」code

3  配置  ~/.emacs 。若是主目錄下,沒有這個文件,須要新建。
(setq column-number-mode t)
(setq line-number-mode t)
(global-linum-mode t) emacs

--------------------------------------------------------------------------------------
4  或者在Emacs下執行 M-x linum-mode 來顯示或者取消行號
M-x : Alt + x
輸入: linum-modeit


Emacs更改背景顏色io

Emacs的配置文件在~/.emacs。如今就用Emacs打開這個文件吧,若是沒有就建立一個。首先改一下顏色配置,讓Emacs看起來更酷一些:
(set-background-color "#CCE8CF") ;; 使用蘋果綠背景
(set-foreground-color "black") ;; 使用黑色前景
(set-face-foreground 'region "green")  ;; 區域前景顏色設爲綠色
(set-face-background 'region "blue") ;; 區域背景色設爲藍色配置

------------------------------file

儘管能夠重啓Emacs使配置生效,但更快捷的方式是在打開~/.emacs的時候執行命令M-x eval-buffer,就能夠使配置文件當即生效。select

------------------------------

在emacs下,若是文件是用root權限創建的,在編輯內容的時候,不用輸入中文。切換到中文狀態下,也是輸入的英文。全部者改變一下,就能夠了,不知道是爲何??????????

 

全屏效果

 

--------------------

直接按F11

--------------------------------------------------------------------------------------------------------------------------------------------

;;設置窗口位置爲屏庫左上角(0,0)

(set-frame-position (selected-frame) 0 0)

;;設置寬和高, 1920,1080

;;分辨率的寬和高

(set-frame-width (selected-frame) 1920)

(set-frame-height (selected-frame) 1080)

 

隱藏工具欄

Add the following to your init file (~/.emacs ):

(tool-bar-mode -1)
相關文章
相關標籤/搜索