Hacker Newsnew | comments | show | ask | jobs | submit login

A nice alternative is to do:

  " Allow easy navigation to relative files
  cmap %/ %:p:h/
This basically replaces everything before the slash with the directory of the file you're editing. That way, you don't have to necessarily cd, but can easily open files near the one you're currently editing. You can just do ":e %/foo.txt" to open foo.txt in the same directory.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: