diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.config/emacs-kj/init.el | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index f6db726..37822f5 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -127,15 +127,19 @@ ;; :weight bold :height 2.5 :box (:line-width 10 :color "red"))) ) +(defun kj/balance-main-window () + (balance-windows (window-main-window))) + (defun kj/split-window-below () (interactive) (split-window-below) - (balance-windows) + (kj/balance-main-window) (other-window 1)) (defun kj/split-window-right () (interactive) (split-window-right) + (kj/balance-main-window) (other-window 1)) (global-set-key (kbd "C-x 3") #'kj/split-window-right) @@ -659,21 +663,24 @@ (funcall replace1 (car replacements) alist)) alist))) -(add-hook 'eshell-mode-hook - (lambda () - (setenv "PAGER" "cat")) - (setenv "EDITOR" "emacsclient")) -(setq eshell-prefer-lisp-functions t) -(setq tramp-remote-path '(tramp-own-remote-path)) -;; (defun eshell/ssh (&rest args) -;; (if (= 1 (length args)) -;; (progn -;; (message "got here") -;; (format "%s|ssh:%s:" default-directory (car args))) -;; (throw 'eshell-replace-command -;; (eshell-parse-command "*ssh" -;; (eshell-stringify-list (flatten-tree args)))))) -;; (add-to-list 'eshell-complex-commands "ssh") + +(use-package eshell + :init + (add-hook 'eshell-mode-hook + (lambda () + (setenv "PAGER" "cat")) + (setenv "EDITOR" "emacsclient")) + (setq eshell-prefer-lisp-functions t) + (setq tramp-remote-path '(tramp-own-remote-path)) + (defun eshell/ssh (&rest args) + (if (= 1 (length args)) + (throw 'eshell-replace-command + (eshell/cd + (format "/ssh:%s:" (car args)))) + (throw 'eshell-replace-command + (eshell-parse-command "*ssh" + (eshell-stringify-list (flatten-tree args)))))) + (add-to-list 'eshell-complex-commands "ssh")) (use-package idle-highlight-mode :config @@ -824,14 +831,14 @@ (seq "*WoMan " (* anything) "*") (seq "*man " (* anything) "*") (seq "fig: " (* anything)) + (seq "*eshell*" (* anything)) "*Occur*")) buffer) (with-current-buffer buffer (apply #'derived-mode-p '(magit-mode compilation-mode comint-mode - fig-commit-mode))) - )) + fig-commit-mode))))) (setq transient-display-buffer-action '(display-buffer-in-best-side |