Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@roylez

This comment has been minimized.

Copy link

@roylez roylez commented Sep 19, 2010

"fg=none" is not a proper syntax. "none" means reset everything, including fg, bg, underline and etc. So you can have "none, fg=blue" to ensure blue text that is not in bold or underlined. --- Roy

@nicoulaj

This comment has been minimized.

Copy link
Owner Author

@nicoulaj nicoulaj commented Sep 19, 2010

Thank you, updated.

@dingram

This comment has been minimized.

Copy link

@dingram dingram commented Oct 4, 2010

Looks good, but fails under the following conditions in zsh 4.3.10:

  1. I have aliases for ls with various options: l, lr and lrt
  2. I then type lrtt and it highlights as I would expect, the whole way along (including lrtt as an error, as it does not exist)
  3. Hitting backspace to delete the last t still has the buffer highlighted as an error
@nicoulaj

This comment has been minimized.

Copy link
Owner Author

@nicoulaj nicoulaj commented Oct 4, 2010

This works fine for me... Maybe you have special keymapping config (zkbd ?). This is what the "backward-delete-char" is for.

@dingram

This comment has been minimized.

Copy link

@dingram dingram commented Oct 6, 2010

Aha! That made me think, and it turns out that I'm using vi-backward-delete-char. Adding the hook to it in the same way as lines 44 and 47 works beautifully :-)

@nicoulaj

This comment has been minimized.

Copy link
Owner Author

@nicoulaj nicoulaj commented Oct 12, 2010

Yep, I merged your changes.

@nicoulaj

This comment has been minimized.

Copy link
Owner Author

@nicoulaj nicoulaj commented Dec 25, 2010

I've moved this to a project:
Moved to: https://github.com/zsh-users/zsh-syntax-highlighting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment