windows下emacs的自動補全

來源:互聯網
上載者:User

標籤:style   blog   http   io   ar   使用   sp   檔案   div   

  emacs是一款神器,懂的人自然懂,但是未經任何配置的emacs卻很不好用,尤其是沒有自動補全功能的時候,這也是很多人放棄emacs而去選擇sublime等易上手的編輯器的原因,當然有些人認為sublime比emacs好用,用emacs和vim只是為了裝逼,但是真正的大牛隻用emacs和vim而不使用IDE,可是我既不是大牛也不是為了裝逼,只是單純地喜歡emacs的tab鍵設定,用習慣之後覺得其他編輯器都不好用,但是為了讓emacs更加實用,還得做很多雜七雜八的配置,其中我覺得最重要的就是自動補全了。

  為什麼是windows下的配置呢,接觸emacs不應該都是在linux下麼,其中一點是linux略微乏味,不想來回切系統。

  要配置emacs,先得知道.emcas這個檔案,.emacs是emacs的設定檔,進入emacs按ctrl+x+f然後輸入~/.emacs即可開啟.emacs檔案,有個別版本可能初始沒有設定檔,那就開啟之後點開set default font,隨便設定一個字型,然後save options,這樣就有.emacs檔案了。

  首先下載補全工具http://cx4a.org/pub/auto-complete/auto-complete-1.3.1.zip

  隨便解壓到一個路徑,比如我的是D:\auto-complete-1.3.1\

  然後在你要安裝的地方建立一個檔案夾,路徑記下來,比如我的是D:\emacs-24.3\lisp\auto-complete-1.3.1

1.開啟emacs執行安裝,操作是按alt+x load-file,

2.輸入安裝檔案的路徑,也就是etc檔案夾下的install.el,

3.然後就會讓你輸入要安裝的路徑,就寫之前建立檔案夾的地方,

4.在上面的buffer會提示你將幾行代碼拷到.emacs裡面

5.拷過去之後重啟emacs就行了~ 以下是

 

最後附上我的emacs配置:

(require ‘molokai-theme)(show-paren-mode 1)(custom-set-variables ‘(show-paren-mode t))(custom-set-faces ‘(default ((t (:family "Courier New" :foundry "outline" :slant normal :weight normal :height 120 :width normal)))))(switch-to-buffer buffer-file-name)(delete-other-windows)(setq inhibit-startup-message t)(scroll-bar-mode nil)(setq-default indent-tabs-mode nil) (setq-default c-basic-offset 4) (setq-default tab-width 4)(require ‘linum)(global-linum-mode)(global-set-key [?\C-c ?\C-c] ‘comment-or-uncomment-region)  (add-to-list ‘load-path "d:/emacs-24.3/lisp/auto-complete-1.3.1/")(require ‘auto-complete-config)(add-to-list ‘ac-dictionary-directories "d:/emacs-24.3/lisp/auto-complete-1.3.1//ac-dict")(ac-config-default)

  

  

  

windows下emacs的自動補全

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.