init-crux.el 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ;;; init-crux.el --- Crux Configuration File -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;;; Code:
  4. (use-package crux
  5. :defer 5
  6. :commands crux-start-or-switch-to
  7. :config
  8. (crux-with-region-or-sexp-or-line sp-kill-region)
  9. (crux-with-region-or-buffer shell-command-on-region)
  10. (crux-with-region-or-buffer indent-region)
  11. (crux-with-region-or-buffer untabify)
  12. (crux-with-region-or-line comment-or-uncomment-region)
  13. :bind
  14. ("C-^" . crux-top-join-line)
  15. ("C-<backspace>" . crux-kill-line-backwards)
  16. ([remap kill-whole-line] . crux-kill-whole-line)
  17. ;; TODO don't need all of these
  18. ("C-<return>" . crux-smart-open-line)
  19. ("S-<return>" . crux-smart-open-line)
  20. ([remap open-line] . crux-smart-open-line)
  21. ("C-S-<return>" . crux-smart-open-line-above)
  22. ("M-o" . crux-smart-open-line-above)
  23. ("C-c d" . crux-duplicate-current-line-or-region)
  24. ("C-c M-d" . crux-duplicate-and-comment-current-line-or-region)
  25. ("C-c F" . crux-recentf-find-file)
  26. ("C-x 4 s" . crux-swap-windows)
  27. ("C-x M-o" . crux-other-window-or-switch-buffer)
  28. ("C-c C-M-x" . crux-eval-and-replace)
  29. ("C-c M-k" . crux-kill-other-buffers)
  30. ("C-c C-r" . crux-rename-buffer-and-file)
  31. ("C-c D" . crux-delete-file-and-buffer)
  32. ("C-c w" . crux-cleanup-buffer-or-region)
  33. ("C-c M-o" . crux-open-with)
  34. ("C-c C-u" . crux-view-url)
  35. ("C-c TAB" . crux-indent-rigidly-and-copy-to-clipboard)
  36. ("C-c C-!" . crux-reopen-as-root))
  37. (provide 'init-crux)
  38. ;;; init-crux.el ends here