Compare commits

..

4 Commits

Author SHA1 Message Date
2c189c87e6 Support changing cursor shape in iTerm2 in tmux
Depends on setting the following in `.tmux.conf`:

    set -ga terminal-overrides '*:Ss=\E]1337;CursorShape=%p1%d\7'

This allows changing the iTerm2 cursor shape using the same escape
sequences as used for VTE compatible terminals.
2018-01-02 16:54:49 +00:00
a450b3cb45 Fix cursor shape change bug in tmux
Sending escape sequences directly from zsh and bypassing tmux results in
the wrong cursor shape when switching between panes which no longer
reflect the current zsh vi mode.

When using ZTE compatible terminals tmux supports tracking cursor shape
changes on a per pane basis using a suitable `terminal-override`, this
allows zsh and vim to behave as if they are not operating in tmux and
everything works as expected. However, so far I've not been able to
reproduce this behaviour in iTerm2.
2018-01-02 16:54:49 +00:00
2846e7d68e Enable reverse order completions 2018-01-02 16:54:49 +00:00
9da4d8ee71 Add autosuggestions plugin
Fish-like autosuggestions for zsh
2018-01-02 16:54:45 +00:00

5
zshrc
View File

@ -55,7 +55,7 @@ bindkey -M vicmd 'gcc' vi-pound-insert
# TODO: vi-pipe???
# Enable accepting autosuggestions
bindkey '^O' forward-work
bindkey '^O' forward-word
bindkey '^P' autosuggest-accept
# Enable substring history search with 'j' and 'k'
@ -77,6 +77,9 @@ autoload -U edit-command-line
zle -N edit-command-line
bindkey -M vicmd '^V' edit-command-line
# Get the shells parent process name.
ppid_name() { echo $(ps -p $(ps -p $(echo $$) -o ppid=) -o comm=) }
# Enable changing cursor shape based on vi mode
if [ "$ITERM_PROFILE" != "" ] && [ "$TMUX" = "" ]; then
# iTerm2 cursor shape escape sequences outside tmux