3 ms·
I have my own preferred color scheme, won't bore you. At bottom, it's GhostWhite on black. I don't like tabs! ;; destroy all tabs (setq-default indent-tab
by msg 16y ago
I have my own preferred color scheme, won't bore you. At bottom, it's GhostWhite on black.
I don't like tabs!
;; destroy all tabs
(setq-default indent-tabs-mode nil)
(defun untab-writable-non-makefiles-and-csv ()
(if (and
(not buffer-read-only)
(not (loop for re in '("[Mm]akefile" "\\.mk" "\\.csv" "\\.txt")
if (string-match re buffer-file-name)
do (return t)
finally (return nil))))
(untabify (point-min) (point-max))))
(add-hook 'find-file-hook 'untab-writable-non-makefiles-and-csv)
Emacsclient is a real must.
;; use this to start server for emacsclient
(if (not (boundp 'server-process))
(server-start))
All my shells run inside of Emacs. So they're named, I get completions, and so on. That includes remote shells, using tramp and ssh-mode.
;; tramp mode...
(setq load-path (cons "~/emacs/tramp" load-path))
(require 'tramp)
(setq tramp-default-method "ssh")
;; remote shell! Hooray!
(require 'ssh)
(add-hook 'ssh-mode-hook 'ssh-directory-tracking-mode)
Here's what I use for session.
;; back to emacswiki.org/emacs/DeskTop
(setq *foo-desktop-dir* (expand-file-name "~/emacs/desktop"))
(setq desktop-dir *foo-desktop-dir*)
(setq desktop-path (list *foo-desktop-dir*))
(desktop-save-mode 1) ;; Switch on desktop.el
(setq *foo-desktop-file* (concatenate 'string desktop-dir
"/" desktop-base-file-name))
(setq *foo-desktop-lock* (concatenate 'string desktop-dir
"/" desktop-base-lock-name))
(defun desktop-in-use-p ()
(and (file-exists-p *foo-desktop-file*) (file-exists-p *foo-desktop-lock*)))
(defun autosave-desktop ()
(if (desktop-in-use-p) (desktop-save-in-desktop-dir)))
(add-hook 'auto-save-hook 'autosave-desktop)