vim-fireplace Connect command won't run - vim

I've installed vim-fireplace, but the Connect command doesn't work. The error message is "Not an editor command: Connect". This leads me to believe I've messed up the installation but I can't figure out where I went wrong.
This is what I did:
I installed pathogen.
Then I ran these commands to install fireplace:
cd ~/.vim/bundle
git clone git://github.com/tpope/vim-fireplace.git
git clone git://github.com/tpope/vim-classpath.git
git clone git://github.com/guns/vim-clojure-static.git
This is my .vimrc
http://pastebin.com/7Mfk7xJD

You will likely find that it works after you do :set filetype=clojure. The plugin is only active when editing clojure files or when you run this command.

I had similar trouble, but found an answer in a blog posting and add my comments here:
http://cooljure.blogspot.com/2013/07/how-to-set-up-clojure-nrepl-using-vim.html
I am using Fedora 18, and the key seems to be that you need to create a project first using "lein new ", then begin both the vim edit session and the "lein repl" from within the project directory. Example:
> lein new fire
> cd fire
> lein repl
> gvim src/fire/core.clj
Besides installing vim-fireplace, vim-clojure-static, and vim-classpath, I also installed rainbow_parenthesis.vim as suggested by Tim Pope (author of fireplace). I first installed vim-pathgen to handle the vim runtime path setup. All of this is available on GitHub, starting at https://github.com/tpope/vim-fireplace
Alan Thompson

I had exactly the same problem and was able to run :Connect after (temporarily) removing everything from the .vimrc file except these three lines
set nocompatible
filetype plugin indent on
execute pathogen#infect()
Now I will start restoring step-by-step the rest of .vimrc until I found the "culprit".

Related

How to install vim syntastic without package manager?

On syntastic repo https://github.com/vim-syntastic/syntastic#installation, the only example they provide for installing syntastic is using pathogen.
How should install it without pathogen or any package manager?
Pathogen is only needed for Vim 7 or earlier. In Vim 8 all "Pathogen's" functionality is already built-in, and you should never use it at all.
To install a plugin in Vim 8 you only have to put it under the following path: ~/.vim/pack/<bundle>/start/<plugin-name> Here <bundle> can be any name of your choice. Then restart Vim and issue :helptags ALL to rebuild help tags, and you're done.
There still remains a question how you'll be updating your plugins, but you can do it manually with git etc.
After reading the accepted answer I realised my problem was down to an error in the installation documentation for syntastic.
Where it says to restart vim and then type :Helptags it should actually say :helptags (with a lower-case H)

ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it

orror in compile prses. how to solve it?
According to this blog post, you just have to compile the YouCompleteMe modules by running the install.sh script in the YCM install.
cd ~/.vim/bundle/YouCompleteMe
./install.sh --clang-completer
Once this completes you should be able to install the plugin (here's how to do it with Vundle). Once in Vim
:source ~/.vimrc
:PluginInstall
Apparently, when you run ./.install.sh --clang-completer it says that it is "out of date."
I ran python2 install.py and it worked for me. (I believe it was python2.)
Also, I had was using vim and neovim, and I decided to do ./install.sh --clang-completer inside my ~/.vim/bundle/Vundle.vim/ and at the same tim decided to do python2 install.py inside my ~/.configs/nvim/bundle/Vundle.vim/ and the python install installed faster and did the same thing.
The difference might be that you need to "compile vim with pdython support," but the simple fix for that is installing python-nvim (if using neovim), or - I think - vim just comes with python support. (? maybe.)
I encountered the same error message when trying out new neovim installation. In my case, it was because I was using vim-plugin and the plugins are installed in the ~/.vim/plugged instead of ~/.vim/bundle (this is the plugin folder for Vundle before I switched to vim-plug).
Thus, after scratching my head for few hours, turns out I have to run install.sh in the ~/.vim/plugged (not ~/.vim/bundle). I hope this will save someone's time.

Install vim-go in linux?

I would best be described as a dabbler at this point in linux/vim. I'm trying to get started with go. Trying to install the vim-go plugin and i'm having issues. Following the following post.
I added the following to the end of my ~/.bashrc file:
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
and created the following directory ~/gocode
So i created my ~/.vim/bundle & ~/.vim/autoload directories. I downloaded pathogen.vim to the autoload directory. I cloned the github repository for vim-go into the bundle directory which created a vim-go directory.
I created my ~/.vimrc file and added the following:
call pathogen#infect()
syntax enable
filetype plugin on
set number
let g:go_disable_autoinstall = 0
I executed the following from the vim console (which worked after installing Hg):
:GoInstallBinaries
FYI, i don't use vundle and to be honest don't even know what it is :).
So far the plugin doesn't seem to be working. When i type :help vim-go i get the following error: E149: Sorry, no help for vim-go
What am i do
Using the manual install method (copying vim-go/ to ~/.vim) I was able to get it working but only once I had the following ~/.vimrc file, and of course the Go binaries installed as per the instructions.
set nocompatible
set shell=/bin/sh
syntax on
filetype plugin on
let g:go_disable_autoinstall = 0
This was done on an Ubuntu 14.04 desktop with no other vim plugins or prior ~/.vim directory or ~/.vimrc. Frankly the official install instructions and many of the tutorials out there assume to much to be useful on a fresh install of Ubuntu.
However "help vim-go" was still not working for me. Tried the following command from within the ~/.vim directory and got that working: Vim helptag generation
solution put that in you .vimrc :
set nocompatible
execute pathogen#infect()
syntax on
filetype on
filetype plugin on
filetype plugin indent on
go in your .zshrc ou .bashrc and put :
export GOPATH="$HOME/gocode/"
export PATH=$PATH:~/gocode/bin
and in terminal do :
source .zshrc
or
source .bashrc
and now go to
cd ~/.vim/bundle
and do if youuse pathogen :
git clone https://github.com/fatih/vim-go.git
in vim do :
:GoInstallBinaries
test one of this commands :
:GoFmt
:GoLint

Unable to use fugitive.vim on gVim on Windows 7

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.
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.

Pathogen does not load plugins

Pathogen does not work for me. I am following Adam Lowe's hints posted here (and few more) without any success...
My vimrc:
filetype off
call pathogen#runtime_append_all_bundles()
filetype plugin indent on
set nocompatible
syntax on
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
set number
colorscheme darkblue
Contents of .vim - ls .vim/*:
.vim/autoload:
pathogen.vim
.vim/bundle:
nerdcommenter/ vim-haml/ vim-surround/
vim-endwise/ vim-rails/ vim-vividchalk/
All plugins in bundle were installed by cloning them from GitHub into bundle directory.
I have tried with pathogen 1.1 and 1.2 and even the latest from GitHub without any result. Vividchalk, Vim-rails and nerdcommenter are not working. I have very little experience with other plugs so I am not sure about them, but I suppose they are not working too.
I am using ArchLinux, vim 7.2.385-1 (not the latest because the latest requires me to install ruby1.9, but it is still 7.2). It has been installed via pacman - ArchLinux package manager. No vim plugins were installed the other way than using pathogen (I have even reinstalled vim package with cleaning /usr/share/vim).
What am I doing wrong?
EDIT:
/etc/vimrc http://hpaste.org/fastcgi/hpaste.fcgi/view?id=29685#a29685
/usr/share/vim/vimfiles/archlinux.vim http://hpaste.org/fastcgi/hpaste.fcgi/view?id=29686#a29686
This seems to be common problem caused by the "system" vimrc in some distributions setting filetype on before you set up pathogen. So turning it off and back on again forces plugins to load correctly:
call pathogen#runtime_append_all_bundles()
filetype off
syntax on
filetype plugin indent on
More info here.
I was having a similar problem. Pathogen was loading some of my plugins while not all of them.
After some fiddling and wondering I discovered (I don't know if it's mentioned in the documentation) that in each bundle/'plugin_name' folder, there should be another folder called plugin that contains the *.vim file.
Then, when vim starts will look, not in bundle, but in those folders within bundle that contain a folder called plugin... and will create other folders (in each plugin folder).
So, if the plugin is just a .vim file make a folder for it...
instead of:
~/.vim/bundle/vimexplorer/vimExplorer.vim
you need:
~/.vim/bundle/vimexplorer/plugin/vimExplorer.vim
And everything works like a charm.
I've had problems loading particular plugins: specifically, plugins with a plugin subdirectory. For example, on a fresh MacVim install, a plugin in ~/.vim/bundle/surround/plugin/surround.vim wasn't being loaded, even though ~/.vim/bundle/surround appeared in the output of :scriptnames.
The problem was that I was loading Pathogen in .gvimrc, not .vimrc. For whatever reason, stuff in .vim/bundle/*/plugin subdirectories won't load if you do that, so do it in .vimrc!
I've opened an issue on github—I don't know if it can be made to work even if it loads from .gvimrc, but there should at least be some sort of warning in the documentation for idiots like me.
If your .vim is based on a git repo and submodules, DO REMEMBER to run git submodule init and git submodule update after cloning the repo. i.e.
git submodule init
git submodule update
I had the same error and tried all of the above, but it didn't work. Until I initialized and updated the git submodules.
Hope this helps for anyone who has a similar error.
Maybe Arch's default vimrc (possibly /etc/vim/vimrc) doesn't play well with Pathogen. Try starting Vim without loading config files:
vim -u NONE
and then load your vimrc from within vim:
:so ~/.vimrc
Do the plugins work then?
Fixed by (mattn & tpope) after raising issue via github
set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()
see https://github.com/tpope/vim-pathogen/issues/50#issuecomment-3137909
My environment is Vim 7.3.35 and Ubuntu 11.04.
I spent some time trying to resolve it. I clone the project https://github.com:r00k/dotfiles and follow the instructions to install.
When started vi a got the so commented
E117: Unknown function: pathogen#runtime_append_all_bundles
and the solution:
filetype off
call pathogen#runtime_append_all_bundles()
filetype on
did not work.
I found the .vim symlink in my home directory where no properly set. The install script made a .vim DIRECTORY with a symlink vim inside of it pointing to my .dotfiles/vim. The solution was to delete the .vim directory and make a symlink .vim pointing .dotfiles/vim.
A kept the filetype off/on in my .vimrc also.
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
Try to check your runtime path using command:
:set runtimepath?
First entry should be something like ~/.vim.
My problem with not loading plugins/pathogen was that i placed my vim environment in ~/.dotfiles/vim where my vimrc and rest of the stuff (plugins etc.) lives.
After creating symlink to ~/.dotfiles/vim/vimrc in ~/.vimrc i forgot to make second symlink ~/.vim -> ~/.dotfiles/vim/ which caused vim to be confused cause he was looking for stuff in ~/.vim (default). After i made proper symlink everything poped in right place.
I hope it will help someone who forgot about second symlink like I did ;-)
Instead of call pathogen#runtime_append_all_bundles(), I used call pathogen#infect('~/.vim/bundle') and it worked for me.
I was having the same problem with Ubuntu. The log was:
linha 4: executando "/usr/share/vim/vim73/ftoff.vim"
Erro detectado ao processar /usr/share/vim/vim73/ftoff.vim:
linha 11:
E216: Grupo ou evento inexistente: filetypedetect *
fim da execução de /usr/share/vim/vim73/ftoff.vim
The solution was to add "\n"s at the end from file /usr/share/vim/vim73/ftoff.vim to execute it properly.
set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()
The above helped me fix the issue, can't leave a comment on other peoples however thank you for posting the code above.
I have it in mine as:
silent! call pathogen#runtime_append_all_bundles()
After spending waaaay too long trying to solve this problem with nerd-commenter/pathogen, I broke down and just used Debian's OS provided nerd-commenter plugin:
vim-addons install nerd-commenter
If you're on Debian and need to get back to work, try it out. You probably need "vim-addon-manager" and "vim-scripts" packages installed from apt if you don't have it already.
In my case I cloned to a folder ~/dotfiles but vun looks for a folder ~/.vim, as a result he carried no plugins or color schemes to solve the problem I did this:
ln -s ~/.dotfiles ~/.vim
I had the same problem. I tried every possible combination.
Finally I found that if I use mksession to save my Vim workspace and have it load on Vim startup, it made pathogen not load new plugins I put into the bundle folder.
After installing a new plugin I now always delete my session file and start Vim fresh and every plugin loads fine.
filetype off
set nocompatible
set laststatus=2
execute pathogen#infect()
syntax on
filetype plugin indent on
For the sake of completion I'll add my solution for this problem.
I just renamed my ~/.gvimrc file to ~/.vimrc, and all my problems were solved. I literally copied my .vim and my .gvimrc from linux and did this change and everything works as expected.
I was facing the same issue, finally after lot of google and tweaking the vimrc file, found the solution. Hope the following code snippet would resolve the issue.
set nocp
source /home/ameet/.vim/autoload/pathogen.vim "location of my pathogen.vim
call pathogen#infect()
call pathogen#helptags()
i had the same problem , solved by copying this file into ~/.vim/autoload:
https://github.com/sontek/dotfiles/blob/master/_vim/autoload/pathogen.vim

Resources