From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98 invoked by alias); 5 Jan 2011 20:21:09 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15686 Received: (qmail 8773 invoked from network); 5 Jan 2011 20:21:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_FRT_BELOW2,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=O9qJL2h2PPfosEL0jwk/Vzwv4LKjLIHEtWKa9uOgE+I=; b=BwVw6ySt0Cc6oQgMSsZpbeLXQDlB446lh0554Rd4jA6Tg+IEAd02oCsnVgsApGaD+p lwZok1jqZUlkbhmemXYT4utn1GMfe+N1uQnZBlXW1ef/ggSRlXdMOvKsiRLMVurYuSJA +Ux58wH7hqjKzcOsgKdG95u37wEUfdw1ufi4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=MkS+44eQAq8GXBDeOzSVAdP/lkRlanyn5GtQxWOz763SafYKgSTK2ugPZLsFlka7g+ mgxUbB/GJMZBMWf5YcO6n9pmp+mq5N7gaX+HkQmKzmGY13npw0Jj7v+hCDIRz+Yf2XWu n8jBFPUSv7VyC342Iak+n5E5KMruSdP2EaviU= Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: How to get syntax highlighting working?? From: Sorin Ionescu In-Reply-To: Date: Wed, 5 Jan 2011 15:20:47 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <0E5EA7AC-5442-477E-8AC4-8337E05524EA@gmail.com> References: <997733.11083.qm@web65612.mail.ac4.yahoo.com> <20110102102556.34910f31@atmarama.noip.me> To: zsh-users@zsh.org X-Mailer: Apple Mail (2.1082) The 'Bind all ZLE events from zle -la to highlighting function.=92 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" =3D=3D "" ]]; then = MODE_INDICATOR=3D"%{$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. # =46rom http://zshwiki.org/home/examples/zlewidgets rprompt_cached=3D$RPROMPT function zle-line-init zle-keymap-select { = RPROMPT=3D"${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/$rprompt_cached}= " zle reset-prompt } # Accept RETURN in vi command mode. function accept_line { RPROMPT=3D$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=20 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. >=20 > Thank you very much to all contributors ! > _____________________ > Michel BARRET >=20 >=20 >=20 > 2011/1/5 Julien Nicoulaud : >> Thanks William, >> I applied your fix: >> = https://github.com/nicoulaj/zsh-syntax-highlighting/commit/a640bb8b96fe950= 77b8a8ddc6a31f49912a060ee >> . >>=20 >>=20 >> 2011/1/5 William >>=20 >>> Hi, >>>=20 >>> 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=3D${"$(alias $arg)"#*=3D}= >>> to >>> local aliased_command=3D"${"$(alias = $arg)"#*=3D}" >>> in _zsh_highlight-zle-buffer, line 166 (in the current version = anyway). >>>=20 >>> nice work btw! >>>=20 >>>=20 >>> On Sun, Jan 2, 2011 at 10:25, Gour wrote: >>>> On Sat, 25 Dec 2010 19:09:37 +0100 >>>>>>>>>> "Julien" =3D=3D wrote: >>>>=20 >>>> 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 >>>>=20 >>>> Thanks a lot...Even reason less to switch to fish. ;) >>>>=20 >>>> Otoh, I wonder if it is going to be included as part of zsh? >>>>=20 >>>>=20 >>>> Sincerely, >>>> Gour >>>>=20 >>>> -- >>>>=20 >>>> Gour | Hlapicina, Croatia | GPG key: CDBF17CA >>>> ---------------------------------------------------------------- >>>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> LIVE LIKE YOUR CAPS LOCK BUTTON IS JAMMED. >>>=20 >>=20