Loading ...
Sorry, an error occurred while loading the content.

Home / End keys on iBook

Expand Messages
  • Nickolay Kolev
    Hi all, I have happily been using VIM (6.2.?, compiled some time ago) on my iBook (G4 800, German keyboard) for a few weeks, but there is one thing I miss
    Message 1 of 7 , Mar 18 11:22 AM
    • 0 Attachment
      Hi all,

      I have happily been using VIM (6.2.?, compiled some time ago) on my
      iBook (G4 800, German keyboard) for a few weeks, but there is one thing
      I miss really badly. I miss the ability to go to start/end of line with
      the home and end keys when in insert mode (doing it in command mode
      would be useful too). What key combination is needed to send the
      appropriate commands?

      Or, what are the command strings that need to be send to the Terminal
      to do it? If I knew that I could add entries in the "Window Prefrences
      -> Keyboard" dialog...

      Many thanks in advance,
      Nicky
    • Stephen Riehm
      ... Do you even have home and end keys on your iBook? I ve got a powerbook and there just aren t enough keys on the keyboard for that sort of thing. I ve long
      Message 2 of 7 , Mar 18 2:51 PM
      • 0 Attachment
        On 18 Mar 2004, at 20:22, Nickolay Kolev wrote:

        > I have happily been using VIM ... on my iBook (G4 800, German
        > keyboard) ... but I really miss the ability to go to start/end of line
        > with the home and end keys when in insert mode (doing it in command
        > mode would be useful too). What key combination is needed to send the
        > appropriate commands?

        Do you even have home and end keys on your iBook? I've got a powerbook
        and there just aren't enough keys on the keyboard for that sort of
        thing.

        I've long had macros for the beginning and end of line while in insert
        mode:

        imap <c-a> <Esc>0i
        imap <c-e> <Esc>$a

        (borrowed from emacs ;-)

        As for command mode:

        ^ first non-whitespace character on the line
        0 start of the line
        $ end of the line

        Hope this helps

        Steve
      • Benji Fisher
        ... This works for me in the GUI (Vim.app) but not in the terminal, so I assume you are talking about the latter. ... [snip] I have a PowerBook too, and I get
        Message 3 of 7 , Mar 18 3:24 PM
        • 0 Attachment
          On Thu, Mar 18, 2004 at 11:51:15PM +0100, Stephen Riehm wrote:
          > On 18 Mar 2004, at 20:22, Nickolay Kolev wrote:
          >
          > >I have happily been using VIM ... on my iBook (G4 800, German
          > >keyboard) ... but I really miss the ability to go to start/end of line
          > >with the home and end keys when in insert mode (doing it in command
          > >mode would be useful too). What key combination is needed to send the
          > >appropriate commands?

          This works for me in the GUI (Vim.app) but not in the terminal, so
          I assume you are talking about the latter.

          > Do you even have home and end keys on your iBook? I've got a powerbook
          > and there just aren't enough keys on the keyboard for that sort of
          > thing.
          [snip]

          I have a PowerBook too, and I get the <Home> and <End> keys by
          holding down <fn> (extreme lower left of the keyboard) and pressing
          <Left> or <Right>.

          I tried just deleting the "end" and "home" lines from the Window
          Inspector, but that did not help. My daughter is using the Mac now, so
          I cannot experiment further. You might try mapping <End> to <C-O>$ and
          <Home> to <C-O>^ .

          HTH --Benji Fisher
        • Nickolay Kolev
          ... Thanks for the tip. Works quite nicely, considering that those are my mappings for the command line as well. Now if only someone could help out with this:
          Message 4 of 7 , Mar 18 3:51 PM
          • 0 Attachment
            > imap <c-a> <Esc>0i
            > imap <c-e> <Esc>$a

            Thanks for the tip. Works quite nicely, considering that those are my
            mappings for the command line as well.

            Now if only someone could help out with this:
            http://forums.macnn.com/showthread.php?s=&threadid=206161

            :-)

            Nicky
          • Stephen Riehm
            ... UTF-8: works nicely as long as wide glyphs count as two columns is turned OFF :-) Try using something simple like cat to read a file (just to test) - if
            Message 5 of 7 , Mar 18 4:13 PM
            • 0 Attachment
              > http://forums.macnn.com/showthread.php?s=&threadid=206161

              UTF-8:
              works nicely as long as "wide glyphs count as two columns" is turned
              OFF :-)
              Try using something simple like cat to read a file (just to test) - if
              the UTF-8 character are still screwed up your file may not be encoded
              correctly. As for UTF-8 in vim on a mac, I'd desperately like to know
              how that works myself! Since the fonts on a mac are all Mac-Roman, we
              really need a utf-8 <-> mac-roman setting in vim - something I haven't
              been able to find yet :-(

              Shell lines not wrapping:
              that's a common problem with bash and ksh :-) Try setting your login
              shell to tcsh (which WAS the OS-X default till apple gave in to the
              unwashed masses who don't know the difference between a shell as a
              command line interface and a shell as a programming language). Tcsh is
              different to use, but I find it much more comfortable than anything
              else. Just don't write programs in tcsh - use ksh, bash or preferably a
              real scripting language like perl or python for programming tasks (or
              go straight to C++/Java)

              Just my 2c :-)
              Good luck!

              Steve
            • Nickolay Kolev
              ... I have no problems reading pristine UTF-8 documents or writing them in VIM. This (http://www.uni-bonn.de/~nmkolev/vim_panther_unicode/) is something I
              Message 6 of 7 , Mar 18 11:06 PM
              • 0 Attachment
                On 19 Mar 2004, at 1:13 am, Stephen Riehm wrote:

                >> http://forums.macnn.com/showthread.php?s=&threadid=206161
                >
                > UTF-8:
                > works nicely as long as "wide glyphs count as two columns" is turned
                > OFF :-)
                > Try using something simple like cat to read a file (just to test) - if
                > the UTF-8 character are still screwed up your file may not be encoded
                > correctly. As for UTF-8 in vim on a mac, I'd desperately like to know
                > how that works myself! Since the fonts on a mac are all Mac-Roman, we
                > really need a utf-8 <-> mac-roman setting in vim - something I haven't
                > been able to find yet :-(

                I have no problems reading pristine UTF-8 documents or writing them in
                VIM. This (http://www.uni-bonn.de/~nmkolev/vim_panther_unicode/) is
                something I wrote last year, more to myself than for any general use.
                It describes how I got Unicode working in VIM. Very basic, but you
                might still want to have a look.

                > Shell lines not wrapping:
                > that's a common problem with bash and ksh :-) Try setting your login
                > shell to tcsh (which WAS the OS-X default till apple gave in to the
                > unwashed masses who don't know the difference between a shell as a
                > command line interface and a shell as a programming language). Tcsh is
                > different to use, but I find it much more comfortable than anything
                > else. Just don't write programs in tcsh - use ksh, bash or preferably
                > a real scripting language like perl or python for programming tasks
                > (or go straight to C++/Java)

                I have used bash on my Slackware machine for more than 3 years and have
                never seen such a thing. Anyway, if it still is a no-go, I might try
                zsh, I have heard only good of it.

                Nicky
              • Nickolay Kolev
                ... Sorry for the Off-Topic message, I just wanted to post this for anyone who is wondering what was wrong. Turns out it is not a bash problem, it is a, er,
                Message 7 of 7 , Mar 19 3:33 AM
                • 0 Attachment
                  >> Shell lines not wrapping:
                  >> that's a common problem with bash and ksh :-) Try setting your login
                  >> shell to tcsh (which WAS the OS-X default till apple gave in to the
                  >> unwashed masses who don't know the difference between a shell as a
                  >> command line interface and a shell as a programming language). Tcsh
                  >> is different to use, but I find it much more comfortable than
                  >> anything else. Just don't write programs in tcsh - use ksh, bash or
                  >> preferably a real scripting language like perl or python for
                  >> programming tasks (or go straight to C++/Java)
                  >
                  > I have used bash on my Slackware machine for more than 3 years and
                  > have never seen such a thing. Anyway, if it still is a no-go, I might
                  > try zsh, I have heard only good of it.

                  Sorry for the Off-Topic message, I just wanted to post this for anyone
                  who is wondering what was wrong. Turns out it is not a bash problem, it
                  is a, er, user problem. I had set up a color prompt, as it turns out
                  wrongly. Here is the right way to do it:

                  http://linuxfromscratch.org/pipermail/blfs-support/2002-February/
                  016416.html

                  Nicky
                Your message has been successfully submitted and would be delivered to recipients shortly.