Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why not check for file existance, instead of try-catch:

  if filereadable(expand("~/.vimlocal"))
      source ~/.vimlocal
  endif



I've no strong objection to that - it's racy but not in any way that probably matters. Otherwise, it's mostly just a question of forgiveness vs permission...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: