Commit 4980289b4f5c

Vincent Demeester <vincent+git@demeester.fr>
2014-08-09 15:55:08
Few additions
1 parent 5e267ed
Changed files (1)
.emacs.d
.emacs.d/emacs.org
@@ -241,6 +241,18 @@
 
 *** Behaviour
 
+    First thing first, let's define a shortcuts for editing this configuration.
+
+
+    #+BEGIN_SRC emacs-lisp
+      (defun my/edit-emacs-configuration ()
+        (interactive)
+        (find-file "~/.emacs.d/emacs.org"))
+
+      (global-set-key "\C-ce" 'my/edit-emacs-configuration)
+    #+END_SRC
+
+
     Although I don't really care, let's add a new line at the end of files.
     Some people at work will thank me for that ;-D.
 
@@ -250,7 +262,6 @@
 
 Answering yes and no to each question from Emacs can be tedious, a single y or n will suffice.
 
-
 #+BEGIN_SRC emacs-lisp
   (fset 'yes-or-no-p 'y-or-n-p)
 #+END_SRC
@@ -372,7 +383,6 @@
               (setq show-trailing-whitespace 't))
             )
 #+END_SRC
-
 **** DONE pretty-mode
 
      Pretty mode turn some stuff prettier, for example in Haskell =/== becomes =≠=, or
@@ -384,6 +394,16 @@
                  'turn-on-pretty-mode)
      #+END_SRC
 
+**** PROGRESS Dired
+
+     Dired is really a cool mode, let's enhance it.
+
+
+     #+BEGIN_SRC emacs-lisp
+       (require-package 'dired+)
+     #+END_SRC
+
+
 **** TODO Evil
 ** TODO Modes
 *** TODO Prompts
@@ -458,7 +478,8 @@
 ***** TODO magit
 
       #+begin_src emacs-lisp
-(require-package 'magit)
+        (require-package 'magit)
+        (global-set-key "\C-cg" 'magit-status)
       #+end_src
 
 ****** DONE Magit git-svn integration
@@ -610,6 +631,28 @@
      #+end_src
 
 **** TODO tags
+*** DONE Compilation mode improvements
+
+See http://stackoverflow.com/questions/3072648/cucumbers-ansi-colors-messing-up-emacs-compilation-buffer
+
+
+#+BEGIN_SRC emacs-lisp
+  (require 'ansi-color)
+  (defun my/colorize-compilation-buffer ()
+    (toggle-read-only)
+    (ansi-color-apply-on-region (point-min) (point-max))
+    (toggle-read-only))
+  (add-hook 'compilation-filter-hook 'my/colorize-compilation-buffer)
+#+END_SRC
+
+And let's configure the compilation-mode to follow the compilation, not waiting
+at the top..
+
+
+#+BEGIN_SRC emacs-lisp
+  (setq compilation-scroll-output t)
+#+END_SRC
+
 *** TODO Flycheck
 
 *** TODO Fly{check,make)
@@ -646,7 +689,6 @@
     (highlight-parentheses-mode t))
 #+END_SRC
 
-
 **** TODO Emacs lisp
 
 
@@ -658,7 +700,6 @@
                  )
      #+END_SRC
 
-
 **** PROGRESS Clojure
 
      #+BEGIN_SRC emacs-lisp
@@ -677,15 +718,23 @@
 ;;        (require-package 'cider)
       #+END_SRC
 
-
-*** TODO Scala
-
 *** TODO Java
 
 *** TODO Python
 
 *** TODO Ruby
 
+I don't really use [[https://www.ruby-lang.org/][Ruby]] that much but when I need to work on a Ruby project
+I want to have a decent configuration.
+
+Tell Emacs rake, bundler files and =*.erb= are Ruby files.
+
+#+BEGIN_SRC emacs-lisp
+  (dolist (exp '("Rakefile\\'" "\\.rake\\'" "Gemfile\\'" "\\.erb\\'"))
+    (add-to-list 'auto-mode-alist
+                 (cons exp 'ruby-mode)))
+#+END_SRC
+
 *** TODO Shell(s)
 *** TODO Go