3

I am using gVim on Windows 7 and I have tried installing fugitive.vim as described here.

As per the link , I have extracted fugitive.vim to vim73/plugin folder which is in the runtime path for my gVim. But when I restart the gVim, I get "Not an editor command" message when I type in :Gedit , or :Git and also :h fugitive isn't giving a help page.

Also, I tried using the recommended pathogen.vim method as described here. I extracted pathogen.vim into my vim73/autoload folder and then created a bundle folder in gVim home directory(c:\Program Files\Vim). I extracted fugitive.vim into the bundle folder. Updated the _vimrc file with the execute pathogen#infect() command and restarted gVim, but no luck..

Please help me understand where I am going wrong.

quirkystack
  • 1,387
  • 2
  • 17
  • 42

1 Answers1

2

I have found it difficult to get fugitive working on Windows.

I do have a few things for you to try, found using :h plugin.

:echo has("eval")

If this returns 0, your build of vim/gvim does not support plugins.

:echo g:loaded_fugitive

If this returns an error, vim did not spot your plugin during start, check :h plugin for correct directories to install to.

If this returns 1, as mine did and it still did not work, try adding set shellslash to your .vimrc file. This got mine working.

cforbish
  • 8,567
  • 3
  • 28
  • 32
  • for me , `echo has("eval")` and `echo g:loaded_fugitive` return 1. I added `set shellslash` in `_vimrc` file. But unfortunately, this doesn't work either. Btw, I am checking by going to an exisiting git repository on my system and then using `:Gstatus` in gVim. – quirkystack Jul 06 '13 at 17:01
  • Since g:loaded_fugitive is 1, you have fugitive installed. One more thing is that you have to be in a git directory for fugitive commands to work. – cforbish Jul 06 '13 at 17:03
  • yes I gave the `:Gstatus` command after going into a directory I have intialized as git repository using `git init` – quirkystack Jul 06 '13 at 17:06
  • 1
    fugitive's commands aren't activated until you open a *file* in a git repo. Try that before `:Gedit` et al. – echristopherson Jul 07 '13 at 02:53
  • Download fugitive.vim version 2.2 from https:github.com/tpope/vim-fugitive Install cygwin with git.exe on win7 in your path, Install gvim8. In cmd prompt > gvim "+:so path/to/fugitive.vim" +:GV some-git-file.txt. But I couldn't get the newer fugitive.vim to work on win7. – mosh Jun 18 '19 at 21:54
  • My copy of fugitive is here https://github.com/moshahmed/vim/tree/master/fugitive just source and :GV (works on linux/mac/windows) – mosh Jul 23 '19 at 02:01