nxml-mode is a more powerful xml-mode. To use by default: (add-to-list 'auto-mode-alist '("\\.xml\\'" . nxml-mode)) when deleted a file goes to the OS's trash folder: (setq delete-by-moving-to-trash t) whitespace-mode ;; to see tabs and spaces delete-matching-lines ;;removes lines matching a regex C-s C-w ;; search for the word under the cursor, multiple C-w widens search target (setq mouse-wheel-scroll-amount '(1)) ;; set the mouse scroll wheel to move 1 line per event (setq fill-column 72) ;; set the wrap margin column (setcdr (nthcdr (1- (length my-list)) my-list) nil) ;; kill last item in list C-u - M-xfont-lock-modeRET ;; turns off any mode (font-lock-mode is example) C-u 1 M-xfont-lock-modeRET ;; turns on any mode describe-mode ;; tells all about the current minor and major modes copy-to-buffer ;; copies current region to a file M-xedit-options ;; to see all the user definable variables - way cool C-Xb *ftp[TAB] ;;; to get to the ftp buffer C-XC-E eval-last-sexp in a lisp buffer C-y then M-y ;;; to go thru the yank ring In keyboard macros, if you need to copy part of a block of text and then paste it later, you can you something like, ;; move forward through the file set-mark-command ;; set the mark to be used as the beginning of region copy-region-as-kill ;;; copies the text into the clipboard ;; move to where the text is needed clipboard-yank ;; pastes the text into your buffer occur ;; shows all lines in a buffer matching a regular expression (message "howdy") (sit-for 1) ;; shows a message and waits (redisplay) ;;forces redisplay, same as (sit-for 0) (setq debug-on-error t) ;; goes into debug mode on errors (setq debug-on-quit t) ;; goes into debug mode when C-g is entered ; (buffer-string beg end) ;; returns the text within the two positions (buffer-substring (point) (mark)) ;; returns a string given two positions (setq mytext (replace-regexp-in-string "\\(public\\|private\\|protected) " " \\1 " mytext)) ;;wrap html span tags around some keywords cool functions where-is func_name;; shows all the keys bound to the function list-colors-display shows all the available colors. font-lock-face-attributes contains all the current colors set-fill-prefix ;; takes the text *on the current line* and makes it the automatic start of any wrapped lines. you need to be in fill-mode. kill-rectangle ;; deletes the rectangle defined in the highlighted region (ok its really between point and mark yank-rectangle ;; inserts the rectangular text back into the buffer. clear-rectangle ;; replaces all the text in the rectangle with spaces. open-rectangle ;; inserts spaces in the defined rectangle. indented-text-mode ;; special mode to created automatically indented paragraphs edit-picture ;; special mode to do ascii art stuff; exit with C-cC-c ;; C-c^ text goes up ;; C-c. text goes down C-c< left C-c> right C-c` C-^ C-c' ` | ' ` | ' ` | ' `|' C-c< -----------\----------- C-c> /|\ / | \ / | \ / | \ / | \ C-c/ C-c. C-c\ dired mode; D marks a file for deletion x deletes the ones marked g refreshes the buffer