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

Re: Installing VIM (newbie question)

Expand Messages
  • Benji Fisher
    ... The first non-comment line, set nocompatible puts you in enhanced mode. (I call it nocompatible mode.) ... I do not think you need my system vimrc
    Message 1 of 4 , Jun 22, 2006
      On Wed, Jun 21, 2006 at 07:05:59AM -0700, Rick Hogg wrote:
      > Thanks Benji!
      > Here's a question about my .vimrc file: I think I
      > copied my system vimrc to my home directory as .vimrc,
      > but I don't remember modifying it. It looks, however,
      > like it's already set to use VIM defaults instead of
      > Vi compatability. Have a look:
      > """""""""""""""""""""""""""""""""""""""""""""""
      > rick$ cat .vimrc
      > " Configuration file for vim
      > " Normally we use vim-extensions. If you want true vi-compatibility
      > " remove change the following statements
      > set nocompatible " Use Vim defaults instead of 100% vi compatibility
      > set backspace=2 " more powerful backspacing
      > " Don't write backup file if vim is being called by "crontab -e"
      > au BufWrite /private/tmp/crontab.* set nowritebackup
      > " Don't write backup file if vim is being called by "chpass"
      > au BufWrite /private/etc/pw.* set nowritebackup
      > colorscheme zellner
      > syntax enable
      > """"""""""""""""""""""""""""""""""""""""""""""""""""
      > The last two lines were me enabling syntax
      > highlighting in a readable fashion, but does this put
      > me into compatible or enhanced mode?

      The first non-comment line, "set nocompatible" puts you in
      "enhanced" mode. (I call it 'nocompatible' mode.)

      > Here's what the vimrc from macvim.org looks like:
      > """"""""""""""""""""""""""""""""""""""""""""""""""""""
      > " System vimrc file for Mac OS X
      > " Author: Benji Fisher <benji@...>
      > " Last modified: 8 May 2006
      > " TODO: Is there a better way to tell that Vim.app was started from Finder.app?
      > " Note: Do not move this to the gvimrc file, else this value of $PATH will
      > " not be available to plugin scripts.
      > if has("gui_running") && system('ps xw | grep "Vim -psn" | grep -vc grep') > 0
      > " Get the value of $PATH from a login shell.
      > " If your shell is not on this list, it may be just because we have not
      > " tested it. Try adding it to the list and see if it works. If so,
      > " please post a note to the vim-mac list!
      > if $SHELL =~ '/\(sh\|csh\|bash\|tcsh\|zsh\)$'
      > let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
      > let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
      > endif
      > endif
      > """"""""""""""""""""""""""""""""""""""""""""""""""""""
      > Now, I compiled VIM myself without Vim.app, so which
      > of these will be more what I need?

      I do not think you need my system vimrc file. Its only purpose is
      to set the PATH environment variable when Vim.app is started from the
      Finder. If you are starting from a shell, then vim will inherit the
      shell's current PATH variable.

      > Thanks for the help (and I just realized that you're
      > the author of the vimrc and maintainer of macvim's
      > site, so thanks doubly!)

      You are welcome. I still suggest that you look at
      $VIMRUNTIME/vimrc_example.vim . It contains many recommended settings,
      and it is well commented.

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.