Use Olivetti and define-word!

Added `ignore-errors` such that this won't fail when there is no
connection to the internet.

Also renamed the section from Package to Packages.
This commit is contained in:
Lars Tveito 2015-08-06 17:02:56 +02:00
parent 606cb5f199
commit 0207821219

View File

@ -127,7 +127,7 @@
(load-file private-file))))) (load-file private-file)))))
#+END_SRC #+END_SRC
** Package ** Packages
Managing extensions for Emacs is simplified using =package= which is Managing extensions for Emacs is simplified using =package= which is
built in to Emacs 24 and newer. To load downloaded packages we need to built in to Emacs 24 and newer. To load downloaded packages we need to
@ -155,44 +155,46 @@
installed. To ensure we install missing packages if they are missing. installed. To ensure we install missing packages if they are missing.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(let* ((packages (let* ((packages
'(ace-jump-mode ; quick cursor location minor mode '(ace-jump-mode ; quick cursor location minor mode
auto-compile ; automatically compile Emacs Lisp libraries auto-compile ; automatically compile Emacs Lisp libraries
centered-window-mode ; Center the text when there's only one window centered-window-mode ; Center the text when there's only one window
company ; Modular text completion framework cider ; Clojure Interactive Development Environment
diminish ; Diminished modes from modeline company ; Modular text completion framework
elscreen ; window session manager define-word ; display the definition of word at point
expand-region ; Increase selected region by semantic units diminish ; Diminished modes from modeline
idle-require ; load elisp libraries while Emacs is idle elscreen ; window session manager
geiser ; GNU Emacs and Scheme talk to each other expand-region ; Increase selected region by semantic units
haskell-mode ; A Haskell editing mode idle-require ; load elisp libraries while Emacs is idle
helm ; Incremental and narrowing framework geiser ; GNU Emacs and Scheme talk to each other
helm-projectile ; Helm integration for Projectile haskell-mode ; A Haskell editing mode
helm-company ; Helm interface for company-mode helm ; Incremental and narrowing framework
jedi ; Python auto-completion for Emacs helm-projectile ; Helm integration for Projectile
js2-mode ; Improved JavaScript editing mode helm-company ; Helm interface for company-mode
magit ; control Git from Emacs jedi ; Python auto-completion for Emacs
markdown-mode ; Emacs Major mode for Markdown-formatted files js2-mode ; Improved JavaScript editing mode
matlab-mode ; MATLAB integration with Emacs magit ; control Git from Emacs
monokai-theme ; A fruity color theme for Emacs markdown-mode ; Emacs Major mode for Markdown-formatted files
move-text ; Move current line or region with M-up or M-down matlab-mode ; MATLAB integration with Emacs
multiple-cursors ; Multiple cursors for Emacs. monokai-theme ; A fruity color theme for Emacs
org ; Outline-based notes management and organizer move-text ; Move current line or region with M-up or M-down
paredit ; minor mode for editing parentheses multiple-cursors ; Multiple cursors for Emacs.
powerline ; Rewrite of Powerline olivetti ; Minor mode for a nice writing environment
pretty-lambdada ; the word `lambda' as the Greek letter. org ; Outline-based notes management and organizer
projectile ; Manage and navigate projects in Emacs easily paredit ; minor mode for editing parentheses
slime ; Superior Lisp Interaction Mode for Emacs powerline ; Rewrite of Powerline
undo-tree ; Treat undo history as a tree pretty-lambdada ; the word `lambda' as the Greek letter.
try)) ; Try out Emacs packages projectile ; Manage and navigate projects in Emacs easily
;; Remove all packages already installed slime ; Superior Lisp Interaction Mode for Emacs
(packages (remove-if 'package-installed-p packages))) try)) ; Try out Emacs packages
(when packages ;; Remove all packages already installed
(package-refresh-contents) (packages (remove-if 'package-installed-p packages)))
(mapcar 'package-install packages) (when packages
;; This package is only relevant for Mac OS X. (ignore-errors (package-refresh-contents)
(when (memq window-system '(mac ns)) (mapcar 'package-install packages)
(package-install 'exec-path-from-shell)))) ;; This package is only relevant for Mac OS X.
(when (memq window-system '(mac ns))
(package-install 'exec-path-from-shell)))))
#+END_SRC #+END_SRC
** Mac OS X ** Mac OS X
@ -1163,6 +1165,19 @@
"A keymap for custom bindings.") "A keymap for custom bindings.")
#+END_SRC #+END_SRC
Bindings for [[https://github.com/rnkn/olivetti][olivetti]].
#+BEGIN_SRC emacs-lisp
(define-key custom-bindings-map (kbd "C-c [") 'olivetti-shrink)
(define-key custom-bindings-map (kbd "C-c ]") 'olivetti-expand)
#+END_SRC
Bindings for [[https://github.com/abo-abo/define-word][define-word]].
#+BEGIN_SRC emacs-lisp
(define-key custom-bindings-map (kbd "C-c D") 'define-word-at-point)
#+END_SRC
Bindings for [[https://github.com/magnars/expand-region.el][expand-region]]. Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp