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

19663Re: scrolling and conditional map

Expand Messages
  • Vonlia
    Aug 1, 2001
    • 0 Attachment
      On Wed, 1 Aug 2001, Arafat Mohamed wrote:

      > I appreciate you guys helping me out while I've been learning vim. I've been
      > reading the documentation and learning as much as I can on my own. Some
      > things though, I can't seem to find the doc for (or can't find the right
      > keyword combination to look up). I hope you guys can help me with a few
      > things...
      We (at least I) will try :-)
      > 1) I notice that if I use l to scroll (am I using the right word?) right, if
      > I get to the end of the line, it doesn't move on to the next line. Is there
      > a setting to fix this?

      Yes, it's called 'whichwrap' (or 'ww'), to add the 'l' command, use: >

      :set ww+=l

      :help 'whichwrap'

      > 2) I figured out how to use :map, however, is there a way to make it
      > conditional? e.g. only use a map if I'm editing a java file.

      Not just with ':map', but you could use (in a .vimrc):

      autocmd BufRead,BufNewFile *.java map x lX

      :hep autocmd

      > 3) If I have my window split, how can I switch between my open buffers
      > without using the mouse?

      If you have a window on the top, and you are on the bottom window, use
      '^Wk' to get to the top window

      :help CTRL-W

      > 4) Is there a way to go the next buffer? I know how to use :b4 to go to
      > buffer 4. But what if I don't know the buffer number?

      Have you tried using: >


      :help :buffers

      > 5) I set sw=2 and ts=2. If I'm on a newline and hit <TAB>, I get the right
      > indentation of 2 spaces. However, if I do this when I'm in the middle of a
      > line, for some reason, my tabstop reverts to 8 spaces. What am I doing
      > wrong? I also set smarttab, autoindent, and smartindent.

      I don't see this, can you give a reproducable example starting with 'vim
      -u NONE'?

      > Thank you,

      No problem :-)

      Hunter with gun: ``I love animals. That's why I love to kill
      -- Monty Python::sketch

      /|| Vonlia <http://members.home.net/adam.seyfarth/> ||\
      /«|| <mailto:cloud@...> <http://www.majik3d.org> ||»\
      \«|| <http://tuxaqfh.sf.net> <http://tuxkart.sf.net> ||»/
      \|| <http://vim.sf.net> <http://www.majik3d.org> ||/
    • Show all 6 messages in this topic