Keybinding problem in zsh Home/End [Solved but dunno why]

According to the wiki, I need only add the following to my ~/.zshrc to get my Home/End keys to work properly but I am need seeing the desired effect.
Currently:
[Home] = H
[End] = F
What am I doing wrong?
$ cat ~/.zshrc
[[ -z "$PS1" ]] && return
[[ -f /etc/profile ]] && . /etc/profile
for i in functions aliases zsh ; do [[ -f $HOME/.$i ]] && . $HOME/.$i ; done
PATH=$PATH:$HOME/bin
autoload -U compinit
compinit -i
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[white]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) %#%{$reset_color%} '
TERM=xterm-256color
bindkey -v # set vim bindings
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[4~" end-of-line # End
bindkey "\e[5~" beginning-of-history # PageUp
bindkey "\e[6~" end-of-history # PageDown
bindkey "\e[2~" quoted-insert # Ins
bindkey "\e[3~" delete-char # Del
bindkey "\e[A" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward
Last edited by graysky (2012-10-01 20:58:41)

I still do not understand why, but the following code in my ~/.zshrc fixes this problem so I guess this thread is [solved].
... I have much to learn about zsh.
# http://zshwiki.org/home/zle/bindkeys
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" history-beginning-search-backward
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" history-beginning-search-forward
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
function zle-line-init () {
echoti smkx
function zle-line-finish () {
echoti rmkx
zle -N zle-line-init
zle -N zle-line-finish
bindkey "\e[A" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward
Last edited by graysky (2012-10-01 20:58:21)

Similar Messages

  • HT201343 My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found

    My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found. So cannot use mirroring.
    I have follow trouble shooting , they recommend to go system preference -> display , thus can find out the mirroring icon if no mean it doesnt support. But according to the web, Early 2011 MBP should be able to use, dunno why.

    Just realise I havent updated my OS to mountain lion and this is the reason why I cannot use mirroring before ^^
    Thanks all

  • Problems with "Fn" + Home/End

    Please help me with my trouble. i have Lenovo sl 500. I've decided to update my windows vista home basic( that was built-in my notebook) to windows 7. All troubles were solved, but i cannot change the level of brightness(pressing Fn +home/end ) the other combinations with the button  "Fn" are working.
    Maybe i need a driver?
    Please can you name this driver or help me to solve this problem.
    Thank you

    I think you've right about the problem: the graphics driver for Vista might not support Windows 7 or work well with other drivers for Windows 7. Those driver tables seem to be incomplete for Windows 7 drivers still. Lists like this one are more reliable: http://www-307.ibm.com/pc/support/site.wss/product.do?template=/productpage/landingpages/productPage...
    However, I didn't see a listing for a Windows 7 driver for Intel graphics for your model; only NVIDIA. You can download a generic Windows 7 graphics driver from Intel directly: http://downloadcenter.intel.com
    Do you have System Update 4.0? It's available here: http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-73695
    If you uninstall the drivers and reboot, System Update should install them for you. If the right graphics driver is indeed missing, the generic driver might be your best bet for now.
    Lenovo Thinkpad T400 Model 6474AH4
    Windows 7 Professional 64-bit

  • Messed partitions on Arch Install but dunno why

    Hi Archies
    I'm installing Arch on my main PC (that allready has Mandriva Cooker & a Win98 on it), after having tested it succesfully on my laptop & a small server.
    Desktop PC's HDD has some room for another system, something like this :
    hda1     1gig vfat (win98)
    hda5-6 15gig vfat
    hda7-9 10gig ext3 (Mandriva /boot, / & /usr)
    hda10-12 ext3 (mandriva /home & /var/www)
    Empty 9 gig  <------- Where to install Arch ///////////
    hda13 512mo swap (mandriva /swap)
    hda14  JFS (stockage partition)
    I booted on Arch CD and went in partitioning the empty place on HDD : 2 partitions, / & /home. Created them then "Write" then "Go to menu".
    On next step, I see  that hda13 & 14 have gone !??
    I go back to FDISK and all I can see is "Not allocated space  50gig" !?
    Woooh! What's that ?
    Now I've been running some partition recovery tools like Ranish Partition & TestDisk. They still show all of initial partitions
    But I now cannot boot Mandriva (it will boot, then end after checking file system)  :!:
    Now 2 questions :
    - How should I proceed to recover partition table altered with Arch's FDISK ?
    - How such a problem may have hapened ?
    [EDIT] TestDisk, after deeper analyze, shows no Extended Partition (but every Logical one) , and also that the "swap" partition is "D" (for "Deleted").
    I dunno what to do

    [presently on my main PC with Knoppix kaella
    Every partition visible in QTparted, files in the JFS partition 100% accessibles
    I'm restoring boot sector from a recent backup with "dd if..."
    Taking the occasion to create Arch partitions in available HDD unalocated free space.
    While doing this, QTparted writes this :
    No Implementation: This ext2 filesystem has a rather strange layout! Parted can't resize this (yet).
    Argh! after having unmouted all partitions in /mnt and created 2 new partitions with QTparted, now, all I can see in this partition is "Lost and Found"  :!:
    Less & less understanding what's happening in here

  • Please help! It's urgnt, it can be compiled but dunno why doesn't works...

    public void actionPerformed(ActionEvent e){
              if(e.getSource() == Reset){
                   username.setText(null);
                   password.setText(null);               
              else
                   if (e.getSource() == login)     {                    
                        if (memberButton.isSelected() == true) {                         
                             boolean result = false;
                             CustomerDBVer2 custDB = new CustomerDBVer2("customerData.txt",";");
                             result = custDB.validate(username.getText(), password.getPassword());          
                        else if(nonmemberButton.isSelected() == true)
                        else if(chefButton.isSelected() == true) {
                             boolean result = false;
                             CustomerDBVer2 custDB = new CustomerDBVer2("customerData.txt",";");
                             result = custDB.validate(username.getText(), password.getPassword());          
                        else if(managerButton.isSelected() == true) {
                             boolean result = false;
                             CustomerDBVer2 custDB = new CustomerDBVer2("customerData.txt",";");
                             result = custDB.validate(username.getText(), password.getPassword());          
    I'm trying t get a radioButton working...

    This tutorial discusses radio buttons:
    http://java.sun.com/docs/books/tutorial/uiswing/components/button.html

  • I have to send large files like 5MB or biger via mobile phone, but in that cases phone is telling mi to plug in power. And when I do that, there is no problem to send the file. For smaller files there is no problem. How can I solve the problem? Because wh

    I have to send large files like 5MB or biger via mobile phone, but in that cases phone is telling mi to plug in power. And when I do that, there is no problem to send the file. For smaller files there is no problem. How can I solve the problem? Because when I'm not at home I can't plug in the power.

    hi,
    I am sending file from server to client i.e client will request for a file and service will send it back....... no socket connection is there...I am using JBOSS and apache axis.
    pls help me out.....
    Rashi

  • TS1398 I have an original iPad 32 why can't I connect on my home wi-fi but can connect anywhere else. No problems at home connect with other iPads and MACs.

    I have an original iPad 32 why can't I connect on my home wi-fi but can connect anywhere else? No problems at home connect with other iPads and MACs.

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • I have a problem with my home butten, its working but when i press it, it seems like something is stuck in it. like sand or something like that, and this is the second time it happens to me with 2 devices. what can i do?

    Ok so first sorry for my english, Im not American.
    2 months ago i bought a new Iphone 4 device from my phone company, after a month something happened to the home butten, when i pressed it it felt like something stuck in it.. like sand or dirt.. but the home butten worked perfectly. so i went to the phone company and they told me that it is a problem and they replaced it with a new one. but after a week my iphone fell and something happened to him so i sold it to someone i know, and with that money i bought a new one from privet store (unlike the last time, when i bought my iphone in a big phone company) and in the begining it felt new, i didnt had any problems, but 2 days ago when i woke up i pressed the butten and i noticed that the problem with the home butten is back.. and i dont know what to do.. i mean like its not a big deal or something, it just that when i buy something new, i excpet it to be new, and i want to ejnoy it while its new.
    so i went to some guy i know and he told me that he will see what he can do, i paid him 130 Shekels (35$) and he told my that he replaced the butten with new one, but still it makes problems. it bothers me alot, because i pay almost 300 shekels per month (75$) and i expect from this device to be new.. and its killing me.
    now, i cant go to the phone company because thats not their device, and i know what the people in the privet store will tell me.. that its my fault and bla bla bla.. so what can i do? i cant spend any more money on this..
    its new.. for some reason this always happenes to me.. 3 devices, problems problems and problems..

    You are right, but how could i send it to Apple? when the phone company first replaced my iphone they had in stock alots of iphones and they just sent mine back to Apple and gave me a new one, so all i did is to give them my phone, but now how could i sent it to Apple? and i cant send it by myself, and the store wont do that, its a lost for them.. so sending it to Apple wasnt an option from the begining.
    and for the record, i dont think the store where i bought it is an authorized shop.. its just a store who boughts phone's from Apple in a low price and sells it in much more money..

  • I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    Hi, blank white screen where exactly?
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    (There may be better or faster DNS numbers in your area, but these should be a good test).
    Click OK.

  • [solved] problem with zsh and makepkg

    I've had this problem for quite a while, but now finally it really starts pissing me off
    When I want to build a package with makepkg and the PKGBUILD has versioned dependencies, makepkg isn't able to resolve the dependencies.
    An example to demonstrate what this looks like
    PKGBUILD:
    # Maintainer: Army <[email protected]>
    pkgname=ardour3-svn
    _realname=ardour3
    pkgver=7501
    pkgrel=1
    pkgdesc="A multichannel hard disk recorder and digital audio workstation"
    arch=('i686' 'x86_64')
    url="http://www.ardour.org"
    license=('GPL')
    depends=("util-linux-ng" "liblrdf>=0.4.0" "liblo" "libgnomecanvasmm>=2.12.0" "slv2>=0.6.4" "aubio")
    makedepends=("boost>=1.39" "cppunit>=1.12.0" "soundtouch" "libvorbis>=1.1.2" "flac>=1.2.1" "python>=2.3" "jack-audio-connection-kit-svn")
    source=(${pkgname}.desktop)
    _svntrunk=http://subversion.ardour.org/svn/ardour2/branches/3.0
    _svnmod=${_realname}
    build() {
    cd ${srcdir}
    rm -rf ${_svnmod}-build
    svn co ${_svntrunk} ${_svnmod}
    cp -rf ${_svnmod} ${_svnmod}-build
    cd ${_svnmod}-build
    ./waf configure --prefix=/usr --configdir=/etc --tranzport --freesound --freedesktop --lv2 -p
    ./waf build
    DESTDIR="${pkgdir}" ./waf install
    # install some freedesktop.org compatibility
    install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${_realname}.desktop"
    md5sums=('2736c648e452ae45c703e48cf64f75e7')
    and this is the output:
    % makepkg -sir
    ==> Bestimme letzte SVN-Revision...
    -> Gefundene Version: 7501
    ==> Erstelle Paket: ardour3-svn 7501-1 (Di 27. Jul 00:44:01 CEST 2010)
    ==> Prüfe Laufzeit-Abhängigkeiten...
    ==> Prüfe Buildtime-Abhängigkeiten...
    ==> Installiere fehlende Abhängigkeiten...
    Passwort:
    zsh:1: 1.39 not found
    ==> Fehlende Abhängigkeiten:
    -> boost>=1.39
    -> cppunit>=1.12.0
    Seems like it changes
    makedepends=("boost>=1.39" "cppunit>=1.12.0" ...)
    to
    makedepends=("boost" "1.39" "cppunit" "1.12.0" ...)
    It doesn't matter if I put the dependencies into " or ' nothing, it's always the same output. I already created a new user to verify the situation, same problem there. With bash as shell all runs fine.
    I use grml-zsh-config from [extra], but that cannot be the trouble maker, I tested it with an uninstalled grml-zsh-config and a blank ~/.zshrc, still the same.
    How do you zsh users do this??
    Thanks for any idea!
    Last edited by Army (2010-07-28 08:01:19)

    Oh boy, sorry for these many posts, but without my sudo replacement package things are even worse!
    % bash -c "export SHELL=/bin/bash && makepkg -sir"
    ==> WARNING: Sudo can not be found. Will use su to acquire root privileges.
    ==> Determining latest svn revision...
    -> Version found: 7518
    ==> Making package: ardour3-svn 7518-1 (Wed Jul 28 09:36:19 CEST 2010)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Installing missing dependencies...
    Password:
    zsh:1: 1.39 not found
    ==> ERROR: 'pacman' failed to install missing dependencies.
    ==> WARNING: Failed to remove installed dependencies.
    This command works with nosudo installed ... I get the same errors when I do
    % bash --login
    $ echo $SHELL
    /bin/zsh
    $ export SHELL=/bin/bash
    $ echo $SHELL
    /bin/bash
    $ export LANG=C
    $ makepkg -sir
    ==> WARNING: Sudo can not be found. Will use su to acquire root privileges.
    ==> Determining latest svn revision...
    -> Version found: 7518
    ==> Making package: ardour3-svn 7518-1 (Wed Jul 28 09:41:51 CEST 2010)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Installing missing dependencies...
    Password:
    zsh:1: 1.39 not found
    ==> ERROR: 'pacman' failed to install missing dependencies.
    ==> WARNING: Failed to remove installed dependencies.
    Am I just still too much of a noob to see the obvious mistake I make or is makepkg really screwed up? Because in case I don't do anything wrong, I'll file a bug report asap!
    Last edited by Army (2010-07-28 07:43:05)

  • My iPad2 no longer connects to my home wifi network but there is no problem connecting to other saved wifi networks. Currently using iOS8.0.2. with storage capacity of 12.2Gb but only 147Mb free. Disconnecting the router and rebooting the iPad worked

    My iPad2 no longer connects to my home wifi network but there is no problem connecting to other saved wifi networks. Currently using iOS8.0.2. with storage capacity of 12.2Gb but only 147Mb free. Disconnecting the router and rebooting the iPad worked briefly as a temporary fix but not anymore

    You could try this
    Temporarily disable security on your home network
    See if the iPad connects
    If it does then reset the security - with the same or different password

  • I'm having trouble with back to my MAC.  I had everything working on my home wifi network but now I am at my daughter's house and trying to connect via a verizon hotspot wifi connection.  I'm wondering if the Verizon hookup is a problem.

    I'm having trouble with back to my MAC.  I had everything working on my home wifi network but now I am at my daughter's house and trying to connect via a verizon hotspot wifi connection.  I'm wondering if the Verizon hookup is a problem.

    I finally figured it out.  Needed to update her Airport firmware and allow guest access, and also changed Sharing preferences to Allow Access for All Users.

  • In the last few days, I've encountered a problem with scrolling with my up & down keys. The up & down keys seem to, now function as Home & End keys. MyPage Up & Page Down keys seem to do nothing. What is wrong?

    In the last few days, I've encountered a problem with scrolling with my up & down keys. The up & down keys seem to, now function as Home & End keys. MyPage Up & Page Down keys seem to do nothing. What is wrong?

    Hit the '''F7''' key, you probably have Caret browsing turned on.
    http://kb.mozillazine.org/Accessibility.browsewithcaret

  • My MacBook Pro will not connect to my home wifi but will connect everywhere else. My other Apple devices (I-pad, I-touch, another MacBook Pro) connect to the router without problems. It was working fine but all of a sudden stopped working.Thanks!

    My MacBook Pro will not connect to my home wifi but will connect everywhere else. My other Apple devices (I-pad, I-touch, another MacBook Pro) connect to the router without problems. It was working fine but all of a sudden stopped working.Thanks!

    try this.
    get back into your router's settings and start deleting devices that are not connected to your router.
    you can also delete the ones that are connected - they'll connect again.
    on the DHCP side of it, increase the amount of users that can connect/log in to your router.
    see if that sorts it out for you.
    good luck.

  • TS4123 I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    The results show that you have a proxy server set and this can often cause problems with iTunes.
    The proxy setting can be accessed in Internet options>>Connections>>LAN Settings.
    Try un-checking the proxy server check box.
    It might also be a good idea to run a malware check if you didn't know you had the proxy server set.
    You can download a free version of an excellent scanner- Malwarebytes here:
    http://www.malwarebytes.org/

Maybe you are looking for

  • How to get the list of tables in a schemata

    hello. how can i get all the names of the tables in a schemata? i am using mysql. is it possible? i have written a code in jsp and it doesn't work. please give me an idea. thanks

  • No video on our end

    Just tried skype on xbox one. We could see them but they could not see us. The lower right hand mini screen is completely green. When I go into kinect settings, it works in there. Thoughts?

  • My in app purchases haven't worked for over three weeks.

    My restrictions are off, my network settings are correct. I have tested this with multiple apps / companies and none of them work.This includes:      Tap Zoo 2      Zombie Farm      Zombie Life      Tiki Match      Dragonvale Some tell me to check my

  • Android open pdf at particular page

    Hi I am developing an Android app in which I want to open PDF at a specific page. Is it possible by mentioning the same in Intent parameters or specific Adobe Pramaters. Thanks !

  • JDBC driver for MS SQLServer 2000