Emacs configuration

This commit is contained in:
Bob Mottram 2014-08-24 09:53:09 +01:00
parent 51ad0e59ec
commit 7a462c1f7a
1 changed files with 72 additions and 0 deletions

View File

@ -7526,6 +7526,78 @@ deb http://repo.ajenti.org/debian main main debian
#+END_SRC #+END_SRC
*** Emacs *** Emacs
An example Emacs configuration file. This should be saved to */home/myusername/.emacs* and */root/.emacs*
#+BEGIN_SRC: bash
(add-to-list 'load-path "~/.emacs.d/")
;; ===== Remove trailing whitepace ======================================
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; ===== Press CTRL-L to go to a line number ============================
(global-set-key "\C-l" 'goto-line)
;; ===== Show line numbers ==============================================
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
;; ===== Enable line wrapping in org-mode ===============================
(add-hook 'org-mode-hook
'(lambda ()
(visual-line-mode 1)))
;; ===== Enable shift select in org mode ================================
(setq org-support-shift-select t)
;; ===== Set standard indent to 4 spaces ================================
(setq standard-indent 4)
(setq-default tab-width 4)
(setq c-basic-offset 4)
;; ===== Support Wheel Mouse Scrolling =================================
(mouse-wheel-mode t)
;; ===== Place Backup Files in Specific Directory ======================
(setq make-backup-files t)
(setq version-control t)
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
;; ===== Make Text mode the default mode for new buffers ===============
(setq default-major-mode 'text-mode)
;; ===== Line length ===================================================
(setq-default fill-column 72)
;; ===== Enable Line and Column Numbering ==============================
(line-number-mode 1)
(column-number-mode 1)
;; ===== Turn on Auto Fill mode automatically in all modes =============
;; Auto-fill-mode the the automatic wrapping of lines and insertion of
;; newlines when the cursor goes over the column limit.
;; This should actually turn on auto-fill-mode by default in all major
;; modes. The other way to do this is to turn on the fill for specific
;; modes via hooks.
(setq auto-fill-mode 1)
;; ===== Enable GPG encryption ========================================
(require 'epa)
(epa-file-enable)
#+END_SRC
*** Boot (uEnv.txt) *** Boot (uEnv.txt)
An example of the uEnv.txt file within the BOOT partition on the microSD card of the BBB. An example of the uEnv.txt file within the BOOT partition on the microSD card of the BBB.