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

Re: Can you stop netrw or NERDTree from appearing when opening a directory with MacVim?

Expand Messages
  • Tony Mechelynck
    ... I don t know about NERDtree; but if you disable netrw, Vim will give you an error instead when you try to open a directory: the main purpose of the netrw
    Message 1 of 2 , Dec 21, 2011
    • 0 Attachment
      On Dec 21, 7:53 pm, Wes Baker <w...@...> wrote:
      > Just like the subject says, I typically open directories using MacVim
      > and either netrw (I think) or NERDTree shows up every time. I'd rather
      > it didn't and only showed a blank buffer. Can I do that?
      >
      > Thanks,
      > Wes

      I don't know about NERDtree; but if you disable netrw, Vim will give
      you an error instead when you try to open a directory: the main
      purpose of the netrw plugin is to allow Vim to display the contents of
      a directory when you "edit" it.

      Now if you just want to open an empty window with the _local
      directory_ set to a certain directory, that's a different (and easy)
      question:

      :new | lcd /foo/bar/baz

      or, to save some keystrokes, put

      :cabbrev <expr> CD ((getcmdtype() == ':' && getcmdpos() <= 3)? 'new
      <Bar> lcd' : 'CD')

      in your vimrc then use :CD /foo/bar/baz

      to open an empty window and make /foo/bar/baz the current directory.


      Best regards,
      Tony.
      --
      hundred-and-one symptoms of being an internet addict:
      250. You've given up the search for the "perfect woman" and instead,
      sit in front of the PC until you're just too tired to care.

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.