diff --git a/emacs.el b/emacs.el index 574b357..0f7e5f8 100644 --- a/emacs.el +++ b/emacs.el @@ -434,10 +434,10 @@ Otherwize hook it." (global-set-key (kbd "C-h") (kbd "DEL")) ;; (normal-erase-is-backspace-mode 1) ;; M-SPC fixup-whitespace] -(when (fboundp 'global-hungry-delete-mode) - (set-variable 'hungry-delete-join-reluctantly t) - (add-hook 'after-first-visit-hook - 'global-hungry-delete-mode)) +;; (when (fboundp 'global-hungry-delete-mode) +;; (set-variable 'hungry-delete-join-reluctantly t) +;; (add-hook 'after-first-visit-hook +;; 'global-hungry-delete-mode)) ;;(global-set-key (kbd "C-m") 'reindent-then-newline-and-indent) (global-set-key (kbd "C-m") 'newline-and-indent) @@ -3101,6 +3101,18 @@ ARGS are not used." "/Applications/Vivaldi.app/Contents/MacOS/Vivaldi" url)) + +(defun my-vterm-cmd (command) + "Start arbitrary command in vterm buffer." + (interactive "sCommand: ") + (let ((vterm-shell command) + (vterm-buffer-name "*vterm-cmd*") + (vterm-kill-buffer-on-exit nil)) + (when (get-buffer vterm-buffer-name) + (kill-buffer (get-buffer vterm-buffer-name))) + (vterm))) + + ;; https://emacs-jp.github.io/tips/startup-optimization ;; Restore to original value (setq gc-cons-threshold my-orig-gc-cons-threshold) diff --git a/shrc b/shrc index 12550d6..b60e805 100755 --- a/shrc +++ b/shrc @@ -348,6 +348,8 @@ __safe_alias igosh=gosh-rl __safe_alias pipenv="env -u PIP_USER pipenv" __safe_alias pipx="env -u PIP_USER pipx" +alias f='less `fzf`' + # Sometimes SHELL cannot be used. For example, when running bash inside zsh # SHELL is set to be /bin/zsh diff --git a/tmux.conf b/tmux.conf index 827f30a..8bb7996 100644 --- a/tmux.conf +++ b/tmux.conf @@ -28,6 +28,7 @@ set -g history-limit 10000 setw -g mode-keys vi #setw -g mode-mouse off #set -g default-command /bin/bash +set -g default-command "while true; do /bin/bash -l; done" # Use pasteboard on MacOS run-shell 'test "`uname`" = Darwin && tmux bind-key -T copy-mode-vi "Enter" send-keys -X copy-pipe-and-cancel "pbcopy"'