12

I started using vim (MacVim) + NERDTree recently, and I'm getting some strange behavior editing my notes (simple text files).

Can anyone explain why the filenames are red, and why they have an asterix next to them? They are saved, they are most certainly present - so I'm not sure why exactly they're colored differently.

red filenames

lucapette
  • 20,564
  • 6
  • 65
  • 59
Jordan Scales
  • 2,687
  • 4
  • 28
  • 37
  • 1
    Just guessing, might they have executable mode bit set? – bereal Mar 08 '12 at 15:58
  • Yep, not sure how that happened, but you and Michael were correct. Is it possible I set this bit with vim while messing up some commands? – Jordan Scales Mar 08 '12 at 16:30
  • 1
    @JordanScales Seems unlikely you could have made those executable in Vim. If they were zipped and unzipped at some point they could have ended up with `+x`, or if copied from another OS. Many possibilities. – Michael Berkowski Mar 08 '12 at 16:35

1 Answers1

17

The coloration and asterisk marker indicates that those files are executable. From the NERDTree script homepage:

  • Different highlighting is provided for the following types of nodes:

    • files
    • directories
    • sym-links
    • windows .lnk files
    • read-only files
    • executable files

    If you have enabled (enabled by default) NERDTree's exec_menuitem.vim plugin, and press m to bring up the menu on those executable files (though in your case I suspect those were not supposed to be executable), you will get a menu item to execute them from within Vim.

enter image description here

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390