diff --git a/custom.el b/custom.el index 5fcf075..a311b87 100644 --- a/custom.el +++ b/custom.el @@ -3,7 +3,9 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(package-selected-packages '(jai-mode magit move-text)) + '(package-selected-packages + '(cape dumb-jump exec-path-from-shell jai-mode magit move-text + multiple-cursors)) '(package-vc-selected-packages '((jai-mode :url "https://github.com/valignatev/jai-mode.git")))) (custom-set-faces diff --git a/init.el b/init.el index 27bfb6f..117d0fd 100644 --- a/init.el +++ b/init.el @@ -2,13 +2,34 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) +(set-frame-font "BerkeleyMono 14" nil t) (load-theme 'modus-vivendi) -(setq custom-file "/home/grant/.emacs.d/custom.el") +(defun hgh/edit-init-file () + (interactive) + (find-file user-init-file)) + +(keymap-global-set "M-o" #'other-window) +(keymap-global-set "C-c c" #'compile) +(keymap-global-set "M-0" #'delete-window) +(keymap-global-set "M-1" #'delete-other-windows) +(keymap-global-set "M-2" #'split-window-below) +(keymap-global-set "M-3" #'split-window-right) +(keymap-global-set "C-c e i" #'hgh/edit-init-file) + +(setq + custom-file "/home/grant/.emacs.d/custom.el" + make-backup-files nil) + (ido-mode 1) (fido-mode 1) -(completion-preview-mode 1) -(setq make-backup-files nil) +(global-completion-preview-mode 1) +(tab-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +(global-hl-line-mode 1) + +(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter) (if (file-exists-p custom-file) (load-file custom-file)) @@ -16,10 +37,14 @@ (require 'use-package) (setq use-package-always-ensure t) +(use-package exec-path-from-shell + :demand t) + +(exec-path-from-shell-initialize) + (use-package move-text - :defer t - :config - (move-text-default-bindings)) + :bind (("M-" . 'move-text-down) + ("M-" . 'move-text-up))) (use-package jai-mode :vc (:url "https://github.com/valignatev/jai-mode.git" @@ -27,3 +52,19 @@ (use-package magit :bind ("C-x g" . magit-status)) + +(use-package multiple-cursors + :bind (("C->" . mc/mark-next-like-this) + ("C-<" . mc/mark-previous-like-this) + ("C-c C-<" . mc/mark-all-like-this))) + +(use-package cape + :hook ((completion-at-point-functions . cape-dabbrev) + (completion-at-point-functions . cape-file))) + +(use-package dumb-jump + :demand t + :custom + (dumb-jump-prefer-searcher 'rg) + :init + (add-hook 'xref-backend-functions #'dumb-jump-xref-activate))