]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
separate out css mode and abbrev mode
[lib.git] / emacs_el / configuration / don-configuration.org
index abbd4cc5b94dfb0e3318fdcdda0d3473c43d7e6e..edeaae006e94ce12a49adf403fa5a4f92ad1a8e6 100644 (file)
@@ -113,6 +113,12 @@ load  [[https://github.com/jwiegley/use-package/][use-package]] even faster
   (add-hook 'minibuffer-exit-hook #'don/minibuffer-exit-hook)
 #+END_SRC
 * Modules
+** Hippie Expand
+#+BEGIN_SRC emacs-lisp
+  (use-package hippie-expand
+    :bind* (("M-<SPC>" . hippie-expand))
+    )
+#+END_SRC
 ** Flyspell 🐝 
 #+BEGIN_SRC emacs-lisp
   (use-package flyspell
@@ -862,6 +868,10 @@ This can be used to link things pretty quickly if necessary
 #+BEGIN_SRC emacs-lisp
   (use-package ess
     :ensure t
+    :commands R
+    :mode "\\.R\\'"
+    :bind (:map ess-mode-map
+                ("C-c C-R" . dla/ess-region-remote-eval))
     :config
     (defun ess-change-directory (path)
       "Set the current working directory to PATH for both *R* and Emacs."
@@ -884,11 +894,11 @@ This can be used to link things pretty quickly if necessary
                 ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3)
                 (t 1000)))
         ))
-    (add-hook 'ess-mode-hook
-              '(lambda ()
-                 (local-set-key (kbd "C-c C-R")
-                                'dla/ess-region-remote-eval)))
-
+    (defun dla/ess-region-remote-eval (start end)
+      "Evaluate region in a remote ESS instance"
+      (interactive "r")
+      (shell-command-on-region start end "eval_r" (get-buffer-create "***essregionremoteeval***"))
+      kill-buffer "***essregionremoteeval***")
     ;; Don't restore history or save workspace image
     '(inferior-R-args "--no-restore-history --no-save")
     )
@@ -959,10 +969,10 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 [[https://github.com/magnars/multiple-cursors.el][Multiple Cursors]]
 #+BEGIN_SRC emacs-lisp
   (use-package multiple-cursors
-    :bind (("C-;" . mc/mark-all-dwim)
-           ("C-<" . mc/mark-previous-like-this)
-           ("C->" . mc/mark-next-like-this)
-           ("C-S-c C-S-c" . mc/edit-lines))
+    :bind* (("C-;" . mc/mark-all-dwim)
+            ("C-<" . mc/mark-previous-like-this)
+            ("C->" . mc/mark-next-like-this)
+            ("C-S-c C-S-c" . mc/edit-lines))
     )
 #+END_SRC
 ** Web Mode
@@ -982,6 +992,42 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     :ensure f
     )
 #+END_SRC
+** Password Store
+#+BEGIN_SRC emacs-lisp
+  (use-package password-store
+    :ensure f
+    :commands password-store-edit password-store-create
+    )
+#+END_SRC
+** CSS mode
+#+BEGIN_SRC emacs-lisp
+  (use-package css
+    :mode "\\.css'"
+    :config
+    ;; fix up css mode to not be silly
+    ;; from http://www.stokebloke.com/wordpress/2008/03/21/css-mode-indent-buffer-fix/
+    (setq cssm-indent-level 4)
+    (setq cssm-newline-before-closing-bracket t)
+    (setq cssm-indent-function #'cssm-c-style-indenter)
+    (setq cssm-mirror-mode nil))
+#+END_SRC
+** Abbrev Mode
+#+BEGIN_SRC emacs-lisp
+  (use-package abbrev
+    :diminish abbrev
+    :config
+    ;; load abbreviations from 
+    (setq abbrev-file-name       
+          "~/.emacs_abbrev_def")
+
+    ;; read the abbrev file if it exists
+    (if (file-exists-p abbrev-file-name)
+        (quietly-read-abbrev-file))
+
+    ;; for now, use abbrev mode everywhere
+    (setq default-abbrev-mode t))
+#+END_SRC
+
 * Email
 ** Mutt
 *** Message-mode
@@ -2128,19 +2174,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 
   (column-number-mode t)
  
-  ; abbrev mode settings
-  ; load abbreviations from 
-  (setq abbrev-file-name       
-        "~/.emacs_abbrev_def")
-
-  ; read the abbrev file if it exists
-  (if (file-exists-p abbrev-file-name)
-      (quietly-read-abbrev-file))
-
-  ; for now, use abbrev mode everywhere
-  (setq default-abbrev-mode t)
-
-  (desktop-load-default)
+  (desktop-save-mode)
   (desktop-read)
   '(icomplete-mode on)
   (custom-set-faces
@@ -2312,9 +2346,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
       (clear-visited-file-modtime)
       (not-modified)))
   (ad-activate 'ask-user-about-supersession-threat)
-
-  (global-set-key "\M- " 'hippie-expand)
-
 #+END_SRC
 
 * Server