Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to get syntax highlighting working??
- X-seq: zsh-users 15687
- From: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- To: Sorin Ionescu <sorin.ionescu@xxxxxxxxx>
- Subject: Re: How to get syntax highlighting working??
- Date: Wed, 5 Jan 2011 21:44:59 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=kxrO50B6b3NT9hdhxjPkgNY4NypA9OlQC2B1hBUJjUU=; b=SaakSWLeuWA9JMbC2x3nxcTe0pfnGBnBrENVx5TfKIgp8oIIEI/4zYzoOxlUj/TjnJ xMLjoio4XGfUGiMc0MYjk3wN9omgl61zZiKIRlBd1FnhPQSOsaI2YrcUEc555kmPqgvO Z72YuGQHAGJwvfl2Sxz53R+vjDQacwxJBEqZc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=cnLUTP+MGknLe0eZ/Vkru/6ACBMjzhfg+E8MgoluyrNHnZvKsu8bZslNJO2p84w0tW aOPil41pTrcRQE9bjySjy1dJ+HJlIyS6FNKLhfHkU71M+vQGCWFQAF9X+NK9ejZbrh+p b/9Z7qReXDrjiuCAnHT825AAPKHcJJ19skaow=
- In-reply-to: <0E5EA7AC-5442-477E-8AC4-8337E05524EA@xxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <997733.11083.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <AANLkTi=T73W8vi3PJDH8=AWeCq-YG=iK_42MeBmU2Z-F@xxxxxxxxxxxxxx> <20110102102556.34910f31@xxxxxxxxxxxxxxxx> <AANLkTin281GVg-=kQ41abh5JjZ1y2WzOQws7RGUjire_@xxxxxxxxxxxxxx> <AANLkTinFbDVv68NpY5OSK59+aZwQVx0Jas_q-AmwO+eP@xxxxxxxxxxxxxx> <AANLkTimYS0Xft2y=K=Pgj+9Nai_jDOGgWndAk1xJ0FOL@xxxxxxxxxxxxxx> <0E5EA7AC-5442-477E-8AC4-8337E05524EA@xxxxxxxxx>
Hi Sorin, we know about it:
https://github.com/nicoulaj/zsh-syntax-highlighting/issues#issue/26 (by the
way, please try to use the project to report issues instead of the
mailing-list, because not all contributors watch it)
<https://github.com/nicoulaj/zsh-syntax-highlighting/issues#issue/26>We
will try to fix this ASAP.
2011/1/5 Sorin Ionescu <sorin.ionescu@xxxxxxxxx>
> The 'Bind all ZLE events from zle -la to highlighting function.’ loop on
> line 216 is problematic. It overwrites existing bindings and conflicts with
> other scripts. For example, I have a vi-mode oh-my-zsh plugin that indicates
> when ZSH is in vicmd in ~/.oh-my-zsh/plugins/vi-mode/vi-mode.plugin.zsh
> which I have pasted bellow.
>
>
>
> # Allow command line editing in an external editor.
> autoload -Uz edit-command-line
>
> # If mode indicator wasn't setup by theme, define a default.
> if [[ "$MODE_INDICATOR" == "" ]]; then
>
> MODE_INDICATOR="%{$fg_bold[red]%}<%{$reset_color%}%{$fg[red]%}<<%{$reset_color%}"
> fi
>
> function zle-line-init {
> zle reset-prompt
> }
>
> # If I am using vi keys, I want to know what mode I'm currently using.
> # zle-keymap-select is executed every time KEYMAP changes.
> # From http://zshwiki.org/home/examples/zlewidgets
> rprompt_cached=$RPROMPT
> function zle-line-init zle-keymap-select {
> RPROMPT="${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/$rprompt_cached}"
> zle reset-prompt
> }
>
> # Accept RETURN in vi command mode.
> function accept_line {
> RPROMPT=$rprompt_cached
> builtin zle .accept-line
> }
>
> zle -N zle-line-init
> zle -N zle-keymap-select
> zle -N accept_line
> zle -N edit-command-line
>
> # Avoid binding ^J, ^M, ^C, ^?, ^S, ^Q, etc.
> bindkey -d # Reset to default.
> bindkey -v # Use vi key bindings.
> bindkey -M vicmd "^M" accept_line # Alow RETURN in vi command.
> bindkey -M vicmd v edit-command-line # ESC-v to edit in an external editor.
>
> bindkey ' ' magic-space
> bindkey -M vicmd "gg" beginning-of-history
> bindkey -M vicmd "G" end-of-history
> bindkey -M vicmd "k" history-search-backward
> bindkey -M vicmd "j" history-search-forward
> bindkey -M vicmd "?" history-incremental-search-backward
> bindkey -M vicmd "/" history-incremental-search-forward
>
> bindkey -M viins "^L" clear-screen
> bindkey -M viins "^W" backward-kill-word
> bindkey -M viins "^A" beginning-of-line
> bindkey -M viins "^E" end-of-line
>
>
> On 5 Jan 2011, at 06:08, Michel wrote:
>
> > Thanks ! I haven't awser because I haven't network at home, but your
> > work is really nice.
> >
> > Thank you very much to all contributors !
> > _____________________
> > Michel BARRET
> >
> >
> >
> > 2011/1/5 Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>:
> >> Thanks William,
> >> I applied your fix:
> >>
> https://github.com/nicoulaj/zsh-syntax-highlighting/commit/a640bb8b96fe95077b8a8ddc6a31f49912a060ee
> >> .
> >>
> >>
> >> 2011/1/5 William <sirrobin2318@xxxxxxxxx>
> >>
> >>> Hi,
> >>>
> >>> I know this is a poor excuse for a patch, but access to git is blocked
> >>> from here.
> >>> To get this to work with my config, I had to change this line;
> >>> local aliased_command=${"$(alias $arg)"#*=}
> >>> to
> >>> local aliased_command="${"$(alias $arg)"#*=}"
> >>> in _zsh_highlight-zle-buffer, line 166 (in the current version anyway).
> >>>
> >>> nice work btw!
> >>>
> >>>
> >>> On Sun, Jan 2, 2011 at 10:25, Gour <gour@xxxxxxxxxxxx> wrote:
> >>>> On Sat, 25 Dec 2010 19:09:37 +0100
> >>>>>>>>>> "Julien" == <julien.nicoulaud@xxxxxxxxx> wrote:
> >>>>
> >>>> Julien> Hi,
> >>>> Julien> just to say I've created a repository and added everyone who
> >>>> Julien> made changes as author:
> >>>> Julien> https://github.com/nicoulaj/zsh-syntax-highlighting
> >>>>
> >>>> Thanks a lot...Even reason less to switch to fish. ;)
> >>>>
> >>>> Otoh, I wonder if it is going to be included as part of zsh?
> >>>>
> >>>>
> >>>> Sincerely,
> >>>> Gour
> >>>>
> >>>> --
> >>>>
> >>>> Gour | Hlapicina, Croatia | GPG key: CDBF17CA
> >>>> ----------------------------------------------------------------
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> LIVE LIKE YOUR CAPS LOCK BUTTON IS JAMMED.
> >>>
> >>
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author