Compare commits

..

4 Commits

Author SHA1 Message Date
da44e5f457 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:18:07 +00:00
db5adc8117 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 13:36:47 +00:00
657276af6d Enable reverse order completions 2018-01-02 13:30:21 +00:00
479d59f0d0 Add autosuggestions plugin
Fish-like autosuggestions for zsh
2018-01-02 13:25:44 +00:00

5
zshrc
View File

@ -55,7 +55,7 @@ bindkey -M vicmd 'gcc' vi-pound-insert
# TODO: vi-pipe??? # TODO: vi-pipe???
# Enable accepting autosuggestions # Enable accepting autosuggestions
bindkey '^O' forward-word bindkey '^O' forward-work
bindkey '^P' autosuggest-accept bindkey '^P' autosuggest-accept
# Enable substring history search with 'j' and 'k' # Enable substring history search with 'j' and 'k'
@ -77,9 +77,6 @@ autoload -U edit-command-line
zle -N edit-command-line zle -N edit-command-line
bindkey -M vicmd '^V' 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 # Enable changing cursor shape based on vi mode
if [ "$ITERM_PROFILE" != "" ] && [ "$TMUX" = "" ]; then if [ "$ITERM_PROFILE" != "" ] && [ "$TMUX" = "" ]; then
# iTerm2 cursor shape escape sequences outside tmux # iTerm2 cursor shape escape sequences outside tmux