Compare commits
No commits in common. "e7cce5b39bebbfe10b8a746301f94342300663be" and "6234195a63626d60d98108dc71a80ad1c7dd21ac" have entirely different histories.
e7cce5b39b
...
6234195a63
@ -20,7 +20,6 @@
|
|||||||
(sp-wrap-with-pair "'"))
|
(sp-wrap-with-pair "'"))
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . smartparens-strict-mode)
|
(prog-mode . smartparens-strict-mode)
|
||||||
(eshell-mode . smartparens-strict-mode)
|
|
||||||
:general
|
:general
|
||||||
;; Wrapping
|
;; Wrapping
|
||||||
(leader-map
|
(leader-map
|
||||||
|
@ -6,12 +6,7 @@
|
|||||||
(if (projectile-project-root)
|
(if (projectile-project-root)
|
||||||
(call-interactively #'projectile-run-vterm)
|
(call-interactively #'projectile-run-vterm)
|
||||||
(call-interactively #'vterm)))
|
(call-interactively #'vterm)))
|
||||||
:config
|
|
||||||
(evil-collection-vterm-setup)
|
|
||||||
:general
|
:general
|
||||||
(leader-map "v" #'project-vterm)
|
(leader-map "v" #'project-vterm))
|
||||||
:custom
|
|
||||||
(vterm-environment '("TYPEWRITTEN_CURSOR=terminal"))
|
|
||||||
(vterm-ignore-blink-cursor t))
|
|
||||||
|
|
||||||
(provide 'init-vterm)
|
(provide 'init-vterm)
|
||||||
|
74
zsh/.zshrc
74
zsh/.zshrc
@ -4,7 +4,21 @@
|
|||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
ZSH_THEME="typewritten"
|
# Load up typewritten theme if it exists
|
||||||
|
if [[ -d "$HOME/typewritten" ]]
|
||||||
|
then
|
||||||
|
export TYPEWRITTEN_CURSOR="terminal"
|
||||||
|
fpath+=$HOME/typewritten
|
||||||
|
autoload -U promptinit; promptinit
|
||||||
|
prompt typewritten
|
||||||
|
ZSH_THEME=""
|
||||||
|
else
|
||||||
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
|
ZSH_THEME="robbyrussell"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set list of themes to pick from when loading at random
|
# Set list of themes to pick from when loading at random
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
@ -66,7 +80,7 @@ ZSH_THEME="typewritten"
|
|||||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git direnv pyenv npm nvm)
|
plugins=(git direnv pyenv)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
@ -100,59 +114,3 @@ alias k="kubectl"
|
|||||||
alias kns="kubens"
|
alias kns="kubens"
|
||||||
alias kctx="kubectx"
|
alias kctx="kubectx"
|
||||||
alias tf="terraform"
|
alias tf="terraform"
|
||||||
|
|
||||||
# VTerm integration
|
|
||||||
# Some of the most useful features in emacs-libvterm require shell-side
|
|
||||||
# configurations. The main goal of these additional functions is to enable the
|
|
||||||
# shell to send information to `vterm` via properly escaped sequences. A
|
|
||||||
# function that helps in this task, `vterm_printf`, is defined below.
|
|
||||||
|
|
||||||
function vterm_printf(){
|
|
||||||
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ] ); then
|
|
||||||
# Tell tmux to pass the escape sequences through
|
|
||||||
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
|
||||||
elif [ "${TERM%%-*}" = "screen" ]; then
|
|
||||||
# GNU screen (screen, screen-256color, screen-256color-bce)
|
|
||||||
printf "\eP\e]%s\007\e\\" "$1"
|
|
||||||
else
|
|
||||||
printf "\e]%s\e\\" "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Completely clear the buffer. With this, everything that is not on screen
|
|
||||||
# is erased.
|
|
||||||
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
|
|
||||||
alias clear='vterm_printf "51;Evterm-clear-scrollback";tput clear'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# With vterm_cmd you can execute Emacs commands directly from the shell.
|
|
||||||
# For example, vterm_cmd message "HI" will print "HI".
|
|
||||||
# To enable new commands, you have to customize Emacs's variable
|
|
||||||
# vterm-eval-cmds.
|
|
||||||
vterm_cmd() {
|
|
||||||
local vterm_elisp
|
|
||||||
vterm_elisp=""
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
vterm_printf "51;E$vterm_elisp"
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is to change the title of the buffer based on information provided by the
|
|
||||||
# shell. See, http://tldp.org/HOWTO/Xterm-Title-4.html, for the meaning of the
|
|
||||||
# various symbols.
|
|
||||||
autoload -U add-zsh-hook
|
|
||||||
add-zsh-hook -Uz chpwd (){ print -Pn "\e]2;%m:%2~\a" }
|
|
||||||
|
|
||||||
# Sync directory and host in the shell with Emacs's current directory.
|
|
||||||
# You may need to manually specify the hostname instead of $(hostname) in case
|
|
||||||
# $(hostname) does not return the correct string to connect to the server.
|
|
||||||
#
|
|
||||||
# The escape sequence "51;A" has also the role of identifying the end of the
|
|
||||||
# prompt
|
|
||||||
vterm_prompt_end() {
|
|
||||||
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)";
|
|
||||||
}
|
|
||||||
setopt PROMPT_SUBST
|
|
||||||
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user