diff --git a/custom.el b/custom.el index cd57a00..6145b0c 100644 --- a/custom.el +++ b/custom.el @@ -9,7 +9,7 @@ '(elpy-eldoc-show-current-function nil) '(package-selected-packages (quote - (powershell diffview ivy-hydra window-numbering php-mode swiper mode-line-bell htmlize cython-mode blacken dired-narrow lua-mode browse-kill-ring clipmon free-keys org-link-minor-mode js2-mode js2-refactor xref-js2 python-django visual-regexp-steroids pcre2el vimrc-mode iedit transient magit dracula-theme flycheck elpy ein better-defaults ssh-config-mode yaml-mode apache-mode web-mode undo-tree))) + (string-inflection tiny powershell diffview ivy-hydra window-numbering php-mode swiper mode-line-bell htmlize cython-mode blacken dired-narrow lua-mode browse-kill-ring clipmon free-keys org-link-minor-mode js2-mode js2-refactor xref-js2 python-django visual-regexp-steroids pcre2el vimrc-mode iedit transient magit dracula-theme flycheck elpy ein better-defaults ssh-config-mode yaml-mode apache-mode web-mode undo-tree))) '(reb-re-syntax (quote string))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/settings.org b/settings.org index e271386..b193d0d 100644 --- a/settings.org +++ b/settings.org @@ -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)