Friday, July 11, 2008

emacs

TRAMP (opening remote files)
Add the followig to .emacs
(require 'tramp) (setq tramp-default-method "scp")

now you can open a remote file like this
/kin:~/re/test.py

Moving to buffers
Next : Ctrl+X+right arrow key
Previous : Ctrl+X+left arrow key

Word wrapping
To toggle the fill mode
M+x auto-fill-mode
If we are in the fill mode then "fill" will appear in the status bar.
At fill mode, line wrapping causes a new line char to be inserted.
(not good, have to reformat)

To format/wrap
M+q (do this on top of text)

Setting the scroll bar on the right
put the following two lines in the .emacs file
(setq scroll-bar-mode-explicit t)
(set-scroll-bar-mode 'right)

Enable backspace
(global-set-key "\C-h" 'backward-delete-char)

Markup/delete/insert
press Ctrl+space to start mark-up a region.
Now move the curser down/up left/right to mark a rectangle.
press Ctrl+x and then r then t now it will turn to
String-rectangle mode. Type what you want to insert

To delete,
markup the rectangle with Ctrl+space and then
Ctrl+x and r k
k is to kill

emacs fonts

To check all availabe font options run, xfontsel from the command line.
You can try diiferent fonts and their options.

One example would be,

(set-frame-font "-adobe-helvetica-*-r-normal-*-14-*-75-75-*-77-*-u")


Add this line to your .emacs file.
To set the geometry of the window (size) add the following line
to ~/.Xresources

Emacs.geometry:31x48

Then run,
xrdb -merge ~/.Xresources

The next time you start emacs, things will be nice!!!

No comments:

Post a Comment

Continuously monitor GPU usage

 For nvidia GPUs do the follwing: nvidia-smi -l 1