96 lines
2.6 KiB
EmacsLisp
96 lines
2.6 KiB
EmacsLisp
(provide 'thoom-tweaks)
|
|
|
|
(use-package emacs
|
|
:bind (("C-o" . nil)
|
|
("C-o C-o" . other-window)
|
|
("C-o o" . other-window)
|
|
("C-o /" . split-window-right)
|
|
("C-o -" . split-window-below)
|
|
("C-o C-k" . delete-window)
|
|
("C-o 1" . delete-other-windows)
|
|
("C-o w" . windmove-up)
|
|
("C-o s" . windmove-down)
|
|
("C-o a" . windmove-left)
|
|
("C-o d" . windmove-right)
|
|
;; TODO shift-wasd for moving
|
|
;; TODO C-wasd for resizing
|
|
;; TODO C-/ for undo window state change
|
|
;; TODO z for zooming
|
|
;; TODO other-window scrolling
|
|
("C-o n" . next-buffer)
|
|
("C-o p" . previous-buffer)
|
|
:repeat-map windmove-repeat-map
|
|
("w" . windmove-up)
|
|
("a" . windmove-left)
|
|
("s" . windmove-down)
|
|
("d" . windmove-right)
|
|
:repeat-map next-buffer-repeat-map
|
|
("n" . next-buffer)
|
|
("p" . previous-buffer)))
|
|
|
|
(use-package emacs
|
|
:bind (("C-h C-i" . info-apropos)))
|
|
|
|
;; When scrolling by page and hitting top/bottom, move cursor to top/bottom of buffer
|
|
(setq-default scroll-error-top-bottom t)
|
|
|
|
;; Revert buffers when the underlying file has changed
|
|
(global-auto-revert-mode 1)
|
|
|
|
;; Remember recent files
|
|
(recentf-mode 1)
|
|
(setq recentf-max-menu-items 20)
|
|
|
|
;; Save what you enter into minibuffer prompts
|
|
(setq history-length 25)
|
|
(savehist-mode 1)
|
|
|
|
;; Visually mark the line the cursor is on
|
|
(global-hl-line-mode 1)
|
|
|
|
;; Enable repeat mode. Keymaps are defined through use-package's :repeat-map directive.
|
|
(repeat-mode 1)
|
|
|
|
;; Answer questions with y/n instead of yes/no
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
;; when opening a help window, switch focus to it unless a help window was already open
|
|
(setq-default help-window-select t)
|
|
|
|
;; tabs are for monsters
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default tab-width 4)
|
|
(setq-default sentence-end-double-space nil)
|
|
;; automatically cleanup whitespace on save
|
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|
|
|
|
(use-package project
|
|
:config
|
|
;; Make project.el recognize directories with a .project file as project roots
|
|
(add-to-list 'project-vc-extra-root-markers ".project"))
|
|
|
|
(use-package hl-todo
|
|
:ensure t
|
|
:init
|
|
(global-hl-todo-mode))
|
|
|
|
(use-package which-key
|
|
:ensure t
|
|
:init
|
|
(which-key-mode)
|
|
(which-key-setup-side-window-bottom))
|
|
|
|
;; Use right-option as regular option on Mac
|
|
(setq ns-alternate-modifier 'meta)
|
|
(setq ns-right-alternate-modifier 'none)
|
|
(setq ns-right-command-modifier 'meta)
|
|
|
|
|
|
(use-package direnv
|
|
:ensure t
|
|
:config
|
|
(direnv-mode))
|
|
|
|
(use-package explain-pause-mode
|
|
:ensure (:host github :repo "lastquestion/explain-pause-mode"))
|