jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
2.94k stars 102 forks source link

fix syntax highlighting in ZSH 5.9+ #188

Closed fbearoff closed 11 months ago

fbearoff commented 1 year ago

This fixes the incompatibility between zsh-vi-mode and zsh-syntax-highlighting on ZSH 5.9+ per this issue https://github.com/zsh-users/zsh-syntax-highlighting/issues/871

Tagging @danielshahaf for followup

Un1q32 commented 1 year ago

merge wen

richardhttps commented 1 year ago

hope this gets merged as it's affecting many people

i'll just add these lines myself meanwhile

bjvanbemmel commented 1 year ago

:+1: Fixes the incompatibility issue with zsh-syntax-highlighting. LGTM. Thread containing more details (over on the zsh-syntax-highlighting issues page): https://github.com/zsh-users/zsh-syntax-highlighting/issues/871

kawaemon commented 1 year ago

Hi @jeffreytse, Would you please take a look on this PR when you have time?

zUnixorn commented 1 year ago

for anyone wanting a temporary fix, I followed the suggestion in #127 and put this function into my zshrc:

function zvm_after_init() {
  autoload add-zle-hook-widget
  add-zle-hook-widget zle-line-pre-redraw zvm_zle-line-pre-redraw
}

that fixes it for me until this gets merged.

jeffreytse commented 11 months ago

Hi @fbearoff

Could you try again with the HEAD version? Let's see if this issue has been fixed or not.

Thanks & Regards

fbearoff commented 11 months ago

This is fixed for me now, great work!