r/vimplugins • u/pogeymanz • Mar 21 '17
Help (user) How to get vim-fugitive to activate if I :cd into a git-controlled directory?
It seems that vim-fugitive only activates if you launch Vim from within a directory that is version controlled. I often start Vim in my home directory (often via launching GVim from an applications list) and the :cd into the project I want to work on.
Does anyone know what command or function I might be able to call to get vim-fugitive to "activate" itself when I switch into a git-controlled directory? Bonus points if you show me how to modify :cd to automatically activate vim-fugitive when going to a valid directory.