dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

commit 173b2631c5fceb3ccee1ed067646460c23f2e8fb
parent 941fc684c4e95db7938189fa47ba0bfbfc01abd5
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Thu, 11 Feb 2021 02:22:14 -0800

Better zsh aliases and options

Diffstat:
M.config/emacs/config.org | 27+++++++++++++++++----------
M.config/zsh/zshrc | 9+++++----
2 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/.config/emacs/config.org b/.config/emacs/config.org @@ -106,15 +106,19 @@ (setq redisplay-dont-pause t) (setq vc-follow-symlinks t) ; Otherwise emacs asks (setq tramp-terminal-type "tramp") ; See zshrc +(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) -(add-to-list 'display-buffer-alist - '("\\`\\*Man .*\\*\\'" . - (display-buffer-reuse-mode-window - (inhibit-same-window . nil) - (mode . Man-mode)))) -(setenv "MANWIDTH" "80") ; For man mode +(setenv "MANWIDTH" "100") ; For man mode +;; Man-mode auto-kill frame on exit. Should only be called from shell. +(defun man-mode-shell (man-page) + (add-hook 'man-end-hook '(lambda () + (setq man-end-hook nil) + (delete-frame) + (message "Heck"))) + (man man-page) + (delete-window)) ;; TODO Smithets (global-set-key (kbd "M-SPC") #'(lambda () @@ -262,10 +266,11 @@ :init ;(add-to-list 'TeX-command-list "-pvc") (auctex-latexmk-setup) - (add-hook 'LaTeX-mode-hook - (lambda () - (add-hook 'after-save-hook #'(lambda () - (TeX-command-master "LaTeX")) nil t))))) + ;; (add-hook 'LaTeX-mode-hook + ;; (lambda () + ;; (add-hook 'after-save-hook #'(lambda () + ;; (TeX-command-master "LaTeX")) nil t))) +)) #+End_src ** vterm @@ -354,6 +359,8 @@ (use-package crontab-mode :ensure t) +(add-hook 'prog-mode-hook #'flyspell-prog-mode) ; Flyspell on comments and strings. + #+END_SRC ** html #+BEGIN_SRC emacs-lisp diff --git a/.config/zsh/zshrc b/.config/zsh/zshrc @@ -132,9 +132,8 @@ export MEDNAFEN_HOME="$HOME/.config/mednafen/" # Editor and zsh -export ALT='joe' -export EDITOR="emacsclient -t -a $ALT" -export VISUAL="emacsclient -c -a $ALT" +export EDITOR="emacsclient -t -a emacs" +export VISUAL="emacsclient -c -a emacs" alias srz='source ~/.zshrc' alias jrc='joe $HOME/.config/joestar/joestarrc' @@ -176,9 +175,11 @@ alias jrz='joe ~/.zshrc' alias comicv='ls -v | sxiv -' alias ec='emacsclient -c' alias et='emacsclient -t' +# Basically an alias for man function man() { local command="$2($1)" - emacsclient -t -e '(man "'"$command"'")' || man "$@" + [ -z $2 ] && command="$1" + emacsclient -t -e '(man-mode-shell "'"$command"'")' || man "$@" } # Emacs vterm