Commit 0351c924 authored by Murukesh Mohanan's avatar Murukesh Mohanan

switch to fast-syntax-highlighting, track submodule branches

parent f9c2ec39
[submodule ".vim"] [submodule ".vim"]
path = .vim path = .vim
url = https://git.cse.iitb.ac.in/murukesh/vimrc.git url = https://git.cse.iitb.ac.in/murukesh/vimrc.git
branch = master
[submodule ".zsh/zsh-syntax-highlighting"] [submodule ".zsh/zsh-syntax-highlighting"]
path = .zsh/zsh-syntax-highlighting path = .zsh/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git url = https://github.com/zsh-users/zsh-syntax-highlighting.git
branch = master
[submodule ".zsh/fast-syntax-highlighting"]
path = .zsh/fast-syntax-highlighting
url = https://github.com/zdharma/fast-syntax-highlighting.git
branch = master
Subproject commit 7d6524e6fbdfa6c3bdd5cf840f6aac0bd39f514d
...@@ -50,14 +50,14 @@ key[PageDown]=${terminfo[knp]} ...@@ -50,14 +50,14 @@ key[PageDown]=${terminfo[knp]}
# Finally, make sure the terminal is in application mode, when zle is # Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid. # active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () { function zle-line-init () {
printf '%s' "${terminfo[smkx]}" printf '%s' "${terminfo[smkx]}"
} }
function zle-line-finish () { function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}" printf '%s' "${terminfo[rmkx]}"
} }
zle -N zle-line-init zle -N zle-line-init
zle -N zle-line-finish zle -N zle-line-finish
fi fi
autoload -U promptinit autoload -U promptinit
...@@ -67,11 +67,11 @@ promptinit ...@@ -67,11 +67,11 @@ promptinit
DIRSTACKFILE="$HOME/.cache/zsh/dirs" DIRSTACKFILE="$HOME/.cache/zsh/dirs"
if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then
dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
[[ -d $dirstack[1] ]] && cd $dirstack[1] [[ -d $dirstack[1] ]] && cd $dirstack[1]
fi fi
chpwd() { chpwd() {
print -l $PWD ${(u)dirstack} >$DIRSTACKFILE print -l $PWD ${(u)dirstack} >$DIRSTACKFILE
} }
DIRSTACKSIZE=20 DIRSTACKSIZE=20
...@@ -143,12 +143,12 @@ ssht () { ...@@ -143,12 +143,12 @@ ssht () {
# pip zsh completion start # pip zsh completion start
function _pip_completion { function _pip_completion {
local words cword local words cword
read -Ac words read -Ac words
read -cn cword read -cn cword
reply=( $( COMP_WORDS="$words[*]" \ reply=( $( COMP_WORDS="$words[*]" \
COMP_CWORD=$(( cword-1 )) \ COMP_CWORD=$(( cword-1 )) \
PIP_AUTO_COMPLETE=1 $words[1] ) ) PIP_AUTO_COMPLETE=1 $words[1] ) )
} }
compctl -K _pip_completion pip compctl -K _pip_completion pip
# pip zsh completion end # pip zsh completion end
...@@ -175,7 +175,9 @@ autoload -U edit-command-line ...@@ -175,7 +175,9 @@ 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
[[ -f $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] && # [[ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] &&
. "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" # . ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[[ -f $HOME/.conflocal/$CONFLOCAL/.zshrc ]] && [[ -f ~/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh ]] &&
. "$HOME/.conflocal/$CONFLOCAL/.zshrc" . ~/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
[[ -f ~/.conflocal/$CONFLOCAL/.zshrc ]] &&
. ~/.conflocal/$CONFLOCAL/.zshrc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment