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

Re: Up & Down with gk & gj

Expand Messages
  • Antoine J. Mechelynck
    ... Avoid putting comments on the same lines as mappings. I guess the space between the gj or gk and the double quote is the culprit. I have those same
    Message 1 of 2 , Jun 3, 2003
    • 0 Attachment
      Salman Mohsin <ssmohsin@...> wrote:
      > Hi,
      >
      > In my vimrc, I have two entries like:
      >
      > map <Down> gj " Down Arrow would take one 'screen line' down
      > map <Up> gk " Up Arrow would take one 'screen line' up
      >
      > But these are not working correctly. When I press down-arrow key, it
      > takes me one screen line down but also one space to the right.
      > Doesn't go vertically down. Similary when I press up-arrow key, it
      > takes me one screen line up, but also one space to the right. Doesn't
      > go vertically.
      >
      > How can I make these mapping behave properly??
      >
      > Thanks,
      > Salman

      Avoid putting comments on the same lines as mappings. I guess the space
      between the gj or gk and the double quote is the culprit. I have those same
      mappings, but the letters j and k are followed immediately by an end-of-line
      in the script that does it (the comment describing it is above the mappings,
      on a line by itself) and it works perfectly.

      HTH,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.