Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.0 KiB

  1. * Editing
  2. ** IEdit mode
  3. #+BEGIN_SRC emacs-lisp
  4. (use-package iedit
  5. :bind ("C-;" . iedit-mode))
  6. #+END_SRC
  7. ** Hippie expand
  8. #+BEGIN_SRC emacs-lisp
  9. (use-package hippie-exp
  10. :bind ("M-/" . hippie-expand))
  11. #+END_SRC
  12. * Unix buffer things
  13. ** Platform fixes
  14. ** Key bindings
  15. ** Custom features/Monkey patches
  16. * Major modes
  17. ** Java
  18. ** JavaScript
  19. ** Magit
  20. #+BEGIN_SRC emacs-lisp
  21. (use-package magit
  22. :bind (("C-x g" . magit-status))
  23. :config
  24. (use-package git-commit
  25. :hook (git-commit-setup . git-commit-turn-on-flyspell)))
  26. #+END_SRC
  27. ** Python
  28. *** Platform specific
  29. #+BEGIN_SRC emacs-lisp
  30. (cond
  31. ((string-equal system-type "gnu/linux")
  32. "python3")
  33. ((string-equal system-type "windows-nt")
  34. "python.exe"))
  35. #+END_SRC
  36. *** custom feature
  37. *** bindings/settings
  38. #+begin_src emacs-lisp
  39. (use-package blacken
  40. :hook python-mode)
  41. (use-package elpy
  42. :bind (("C-=" . elpy-goto-assignment))
  43. :config
  44. (when (require 'flycheck nil t)
  45. (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)))
  46. )
  47. (use-package python
  48. :config
  49. (elpy-enable))
  50. #+END_SRC
  51. ** Tramp
  52. ** Webmode
  53. * Minor modes/misc
  54. ** IBuffer mode
  55. #+BEGIN_SRC emacs-lisp
  56. (use-package ibbufer-vc
  57. :hook ((ibuffer-mode . ibuffer-vc-set-filter-groups-by-vc-root)))
  58. (use-package ibuffer
  59. :bind (("C-x C-b" . ibuffer))
  60. :config
  61. (define-ibuffer-column size-h
  62. ;; Use human readable Size column instead of original one
  63. (:name "Size" :inline t)
  64. (cond ((> (buffer-size) 1000000)
  65. (format "%7.1fM" (/ (buffer-size) 1000000.0)))
  66. ((> (buffer-size) 100000)
  67. (format "%7.0fk" (/ (buffer-size) 1000.0)))
  68. ((> (buffer-size) 1000)
  69. (format "%7.1fk" (/ (buffer-size) 1000.0)))
  70. (t
  71. (format "%8d" (buffer-size))))))
  72. #+END_SRC
  73. ** Lispy
  74. #+BEGIN_SRC emacs-lisp
  75. (use-package lispy
  76. :hook ((emacs-lisp-mode) . lispy-mode))
  77. #+END_SRC
  78. ** Window numbering mode
  79. #+BEGIN_SRC emacs-lisp
  80. (use-package window-numbering
  81. :config
  82. (window-numbering-mode))
  83. #+END_SRC