Pages

Showing posts with label Emacs. Show all posts
Showing posts with label Emacs. Show all posts

Tuesday, October 8, 2013

Some useful features never used frequently in Emacs

Some useful features never used frequently in Emacs. This post includes these features for you.

[01] Reload or refresh a current file reading
If you are configuring your emacs via editing .emacs file, it should use this feature to refresh a reading file without closing and reopening it. This means that we want to keep Emacs running and to reload the files opening. Currently, I have found two ways:
The 1st way: C-x C-v Return/Enter
The 2nd way: M-x revert-buffer

[02] Set the underscore ("_") is as a part of word
You recognize the underscore not to be a part of words in Emacs. By double-clicking on the words containing underscores, you never choose whole word because the underscore is not considered as a part of word. That also shows at moving the cursor word by word. More especially, Emacs gives a incorrect result in counting the number of words in a selected region. For instance, Emacs will give 4 in the text "Agv Tgdh_p ATP".

We change Emacs by adding the line: (modify-syntax-entry ?_ "w") into .emacs configuration file.

Thursday, November 17, 2011

Slime và Emacs

Slime là công cụ để bạn giao tiếp SBCL với Emacs.

Cách thoát hoàn hảo slime khỏi emacs
http://stackoverflow.com/questions/2337573/how-to-gracefully-exit-slime-and-emacs

Kênh trao đổi trực tuyến

ERC và IRC là những công cụ giúp bạn chat trực tuyến, hỗ trợ tốt khi trao đổi công việc.

Xem ở đây cách thức cài đặt và cấu hình, sử dụng chung với Emacs
http://www.emacswiki.org/emacs/ERC
và http://searchirc.com/help/beforeyouconnect.php

Thursday, December 9, 2010

Tùy biến với emacs

Emacs được coi như một bộ editor hoàn chỉnh cho những ai thích lập trình. Nó hỗ trợ rất nhiều ngôn ngữ mà bạn có thể tùy biến các mode dễ dàng chuyển đổi.

Đối với một số ngôn ngữ có hỗ trợ định nghĩa (khái niệm) interface hay prototype, emacs cho phép chúng ta switch giữa các file một cách dễ dàng bằng việc bổ sung thêm tính năng binding-keys (là một buit-in) trong emacs [1]. Cụ thể: chỉ cần thêm đoạn mã lệnh sau vào trong file .emacs.

add-hook 'c-mode-common-hook
  (lambda() 
    (local-set-key  (kbd "C-c o") 'ff-find-other-file)))

Và tổ hợp phím C-c o để switch giữa hai file myfile.h và myfile.cpp.

Bạn có thể áp dụng cho các chuẩn khác như: .h và .cc

Thay đổi kích thước cửa sổ emacs lúc khởi động
Xem [2] để biết cách cấu hình

Tham khảo:
[1] http://emacs-fu.blogspot.com/2008/12/quickly-switching-between-header-and.html
[2] http://stackoverflow.com/questions/92971/how-do-i-set-the-size-of-emacs-window