|
|
|
@ -1,5 +1,29 @@ |
|
|
|
* Global |
|
|
|
** Add features/modes |
|
|
|
*** string-inflection |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(require 'string-inflection) |
|
|
|
|
|
|
|
;; C-q C-u is the key bindings similar to Vz Editor. |
|
|
|
(global-set-key (kbd "C-M-,") 'my-string-inflection-cycle-auto) |
|
|
|
|
|
|
|
(defun my-string-inflection-cycle-auto () |
|
|
|
"switching by major-mode" |
|
|
|
(interactive) |
|
|
|
(cond |
|
|
|
;; for emacs-lisp-mode |
|
|
|
((eq major-mode 'emacs-lisp-mode) |
|
|
|
(string-inflection-all-cycle)) |
|
|
|
;; for python |
|
|
|
((eq major-mode 'python-mode) |
|
|
|
(string-inflection-python-style-cycle)) |
|
|
|
;; for java |
|
|
|
((eq major-mode 'java-mode) |
|
|
|
(string-inflection-java-style-cycle)) |
|
|
|
(t |
|
|
|
;; default |
|
|
|
(string-inflection-ruby-style-cycle)))) |
|
|
|
#+END_SRC |
|
|
|
*** undo-tree |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(require 'undo-tree) |
|
|
|
|