zsh-users
 help / color / mirror / code / Atom feed
* I have a question about zsh's bindkey.
@ 1995-09-17 16:57 Akira Funahashi / 舟橋啓 
  1995-09-17 17:45 ` Timothy J. Luoma
  0 siblings, 1 reply; 3+ messages in thread
From: Akira Funahashi / 舟橋啓  @ 1995-09-17 16:57 UTC (permalink / raw)
  To: zsh-users

I have a question about zsh's bindkey.
When using tcsh(tcsh-6.05), I wrote my bindkeys like this.

(.tcshrc)  bindkey ^W backward-delete-word

And when I press ^W like this situation, it works as follows.

(tcsh)% ls /usr/local/bin/^W 
	|
	v
(tcsh)% ls /usr/local/

I think it is very useful and I want to use this in zsh.
But in zsh(I'm using zsh-2.6-beta8),even if I wrote in .zshrc like this,

(.zshrc)  bindkey "^W" backward-delete-word

it doesn't work like tcsh, only works like this.

(zsh)% ls /usr/local/bin/^W 
	|
	v
(zsh)% ls 

Could someone help me????
-------
Akira Funahashi (funa@aa.cs.keio.ac.jp)
Amano laboratory, Dept. of computer science
Keio University, JAPAN


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I have a question about zsh's bindkey.
  1995-09-17 16:57 I have a question about zsh's bindkey Akira Funahashi / 舟橋啓 
@ 1995-09-17 17:45 ` Timothy J. Luoma
       [not found]   ` <z-code!cedman.remote.Princeton.EDU!luomat>
  0 siblings, 1 reply; 3+ messages in thread
From: Timothy J. Luoma @ 1995-09-17 17:45 UTC (permalink / raw)
  To: funa; +Cc: zsh-users


Ah I had the same problem.

Add this to one of your zsh dotfiles (.zshrc or .zshenv I guess):

# Leave =/&; out of WORDCHARS so ^W acts more nicely 
# -- still not ideal
WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'

I'm not sure how this works, because the "/" isn't even listed in the 
WORDCHAR, but it does work.

It doesn't seem to stop at the characters as I think it should (it 
doesn't stop at a "." in the middle of a word) but it will stop at the 
"/" as you described (see below)

TjL
--
Timothy J. Luoma                         NeXT 3.2 m68k
First Try: luomat@capitalist.princeton.edu
If that fails:  476tjl@ptsmail.ptsem.edu (after Sept 15th 95)
NOTE: 476tjl is ASCII only!!!!!!


> Date: Mon, 18 Sep 1995 01:57:42 +0900
> To: zsh-users@math.gatech.edu
> Subject: I have a question about zsh's bindkey.
> 
> I have a question about zsh's bindkey.
> When using tcsh(tcsh-6.05), I wrote my bindkeys like this.
> 
> (.tcshrc)  bindkey ^W backward-delete-word
> 
> And when I press ^W like this situation, it works as follows.
> 
> (tcsh)% ls /usr/local/bin/^W 
> 	|
> 	v
> (tcsh)% ls /usr/local/
> 
> I think it is very useful and I want to use this in zsh.
> But in zsh(I'm using zsh-2.6-beta8),even if I wrote in .zshrc like this,
> 
> (.zshrc)  bindkey "^W" backward-delete-word
> 
> it doesn't work like tcsh, only works like this.
> 
> (zsh)% ls /usr/local/bin/^W 
> 	|
> 	v
> (zsh)% ls 
> 
> Could someone help me????
> -------
> Akira Funahashi (funa@aa.cs.keio.ac.jp)
> Amano laboratory, Dept. of computer science
> Keio University, JAPAN
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I have a question about zsh's bindkey.
       [not found]   ` <z-code!cedman.remote.Princeton.EDU!luomat>
@ 1995-09-17 18:36     ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1995-09-17 18:36 UTC (permalink / raw)
  To: 476tjl, funa, zsh-users

On Sep 17,  1:45pm, Timothy J. Luoma wrote:
} Subject: Re: I have a question about zsh's bindkey.
}
} Add this to one of your zsh dotfiles (.zshrc or .zshenv I guess):
} 
} # Leave =/&; out of WORDCHARS so ^W acts more nicely 
} # -- still not ideal
} WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'
} 
} I'm not sure how this works, because the "/" isn't even listed in the 
} WORDCHAR, but it does work.

WORDCHARS is funny.

It means "the characters IN ADDITION to [A-Z][a-z][0-9] that should be
treated as PART OF a word".  So to get word-motions to stop at a new
character, you REMOVE that character from WORDCHARS.

} It doesn't seem to stop at the characters as I think it should (it 
} doesn't stop at a "." in the middle of a word) but it will stop at the 
} "/" as you described

To stop at ".", change the definition to leave "." out:

WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'

(I'm not sure why some characters are in there twice ... seems to me it
should work to just use

WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@+:'

with or without ".".  Yes, I realize I probably sent the original value
to this list with repeated characters a while back.)

-- 
Bart Schaefer                                      Vice President, Technology
schaefer@z-code.com                                Z-Code / NCD Software Inc.

What quantity of engineers is required to rotationally reconfigure an
electronically-actuated filament-enabled photon-wave generator?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-09-17 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-09-17 16:57 I have a question about zsh's bindkey Akira Funahashi / 舟橋啓 
1995-09-17 17:45 ` Timothy J. Luoma
     [not found]   ` <z-code!cedman.remote.Princeton.EDU!luomat>
1995-09-17 18:36     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).