Terminal 2.5.1 home/end

Discussion in 'OS X Yosemite (10.10)' started by Treadstone06, Feb 26, 2015.

  1. Treadstone06 macrumors newbie

    Joined:
    Apr 28, 2014
    #1
    I started a new position recently and with that came a macbook. I've never used one on a daily basis so am currently learning. My biggest problem so far is with the terminal app. I use it daily but am finding myself really missing the home/end keys and even occasionally the page up/down.

    Could someone please give me a hand on how to allow the use of these within terminal and specifically within vim as well.

    Thanks to everyone for their time and effort.
     
  2. dyt1983, Feb 26, 2015
    Last edited: Jun 2, 2015

    dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #2
    edit: To remove personally identifying information not relevant to the thread.
     
  3. Treadstone06 thread starter macrumors newbie

    Joined:
    Apr 28, 2014
    #3
    Thanks, good to know.

    I was reading somewhere about the possiblity of adding the home and/or end keys to be used within vim...has anyone successfully done this?

    Thanks again.
     
  4. dyt1983, Feb 26, 2015
    Last edited: Jun 2, 2015

    dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #4
    edit: To remove personally identifying information not relevant to the thread.
     
  5. bradl, Feb 26, 2015
    Last edited: Feb 26, 2015

    bradl macrumors 68040

    bradl

    Joined:
    Jun 16, 2008
    #5
    Make it easier for the line. In vi:

    Beginning of line in a document: 0
    End of line in a document: $

    Just be careful, as with some Unices, vim is not installed, let alone an option, so those mappings to function keys, PgUp/PgDn may not exist. Some don't even have the arrows mapped, so you'd have to rely on H, J, K, and L for movement in command mode.

    To the OP: I know you wouldn't like to spend the money, but in this case, it would be money well spent. O'Reilly & Associates have some of, if not the best books out there in regards to IT. In this case, for the Unix user and/or power user, especially with editors, you should pick up the vi & Vim Pocket Reference Guide. It's worth it, and has what you are looking for and then some.

    BL.
     
  6. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #6
    Even faster for vim to get to beginning of file: gg
     
  7. Watabou macrumors 68040

    Watabou

    Joined:
    Feb 10, 2008
    Location:
    United States
    #7
    If you just want to know the basics, type
    Code:
    vimtutor
    in the terminal, and it will go over the basic vim commands. Just takes 10-15 minutes of your time to complete the whole tutorial.
     
  8. Treadstone06 thread starter macrumors newbie

    Joined:
    Apr 28, 2014
    #8
    Thanks everyone for all of the advice. I've now got myself a little cheat sheet to reference until I get them all memorized. Much appreciated for your time and knowledge.
     

Share This Page