Giter VIP home page Giter VIP logo

Comments (20)

SirVer avatar SirVer commented on May 18, 2024

You are right, there is a step missing in the documentation - it only
became necessary recently. I added this to the documentation and pushed
a new version, for your convenience, the paragraph is repeated here:

UltiSnips also needs that Vim sources files from the after/ directory.
Unfortunately, vim only allows this in the home directory. You therefore have
to symlink/copy the files from after: >
mkdir -p ~/.vim/after/plugin/
ln -s ~/.vim/ultisnips_rep/after/plugin/* ~/.vim/after/plugin/

status fixcommitted
importance medium

Launchpad Details: #LPC SirVer - 2012-10-17 10:13:15 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

I just tried that but it didn't solve my problem.
I unpacked Ultisnips in
$HOME/.vim/UltiSnips-2.2

in my vimrc I have

set runtimepath+=~/.vim/UltiSnips-2.2

I have created ths symlinks as you said, so I now have

~/.vim/after/plugin/UltiSnips_after.vim -> ~/.vim/UltiSnips-2.2/after/plugin/UltiSnips_after.vim

As before, Ultisnips works when I edit a perl or bash file but I only get the "all" snippets although the filetype has been determined correctly.

Launchpad Details: #LPC Frank Schwach - 2012-10-17 11:34:31 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

please try the following:

cd ~/.vim/after/plugin/
cat UltiSnips_after.vim

and see if this really prints something. Maybe the link is dead.

Second thing to try:
set runtimepath+=/.vim/UltiSnips-2.2
set runtimepath+=
/.vim/UltiSnips-2.2/after/plugin

Does that solve your problem?

status incomplete

Launchpad Details: #LPC SirVer - 2012-10-17 23:03:50 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Thanks for your help SirVer, much appreciated!
Unfortunately, adding
~/.vim/UltiSnips-2.2/after/plugin
to the runtimepath made no difference, the filetype is still not picked up by UltiSnips. And yes, the symlink actually works and points at the correct file. I also verified that the runtimepath variable has the correct paths including the one to UltiSnips-2.2/after/plugin.
What I would like to do is to make your plugin dump the filetype of the current buffer as it sees it. I guess this would have to be done somewhere in the init python script. Could you help me out with this (I don't know vimscript at all and my Python is a bit rudimentary too I'm afraid)

Thanks!

Launchpad Details: #LPC Frank Schwach - 2012-10-18 11:22:44 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Thanks for your help SirVer, much appreciated!
np, it's kinda my job begin the author :)

Try to link the files from ftdetect/* also into ~/.vim/ftdetect (create
folder if non existing) and try again. I feel the autocomand FileType is
not installed.

If that works, let me know if you need both symlinks (after and
ftdetect) or if ftdetect is enough. I'll update the docs then.

Launchpad Details: #LPC SirVer - 2012-10-19 08:20:31 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Done that but it hasn't changed anything.

My ftdetect folder now has:

UltiSnips.vim -> UltiSnips-2.2/ftdetect/UltiSnips.vim
snippets.vim -> UltiSnips-2.2/ftdetect/snippets.vim

Launchpad Details: #LPC Frank Schwach - 2012-10-23 10:48:40 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Seems like the FileType autocommand is not installed. I do not know why.
please check :au FileType and post the output. The next step would be to
reduce your vim config to a minimal config and upload it for me to test.

Launchpad Details: #LPC SirVer - 2012-10-23 14:19:07 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

oh no, hang on my mistake - just realised that the paths in my ftdetect symlinks are not correct (missing ../). Corrected them and it now works!!! So, yes, that was the problem.
I have also removed the addition to the runtimepath of after/plugin as well as the symlinks, so all I have now are the symlinks in .vim/ftdetect and the line in .vimrc that adds the UltiSnips directory to the runtimepath and it all works fine now.
Thank you so much for helping me along with this

Launchpad Details: #LPC Frank Schwach - 2012-10-23 14:37:57 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Glad that we found the solution. Sorry for taking so long with this. I
updated the documentation with the proper advice. Setting this to
fixcommitted now.

status fixcommitted

Launchpad Details: #LPC SirVer - 2012-10-23 19:14:53 +0200

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Could you please add the instructions on how to install ultisnips properly using vundle, pathogen and VAM?

Launchpad Details: #LPC Flavius Aspra - 2012-12-14 16:15:05 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

I use neither of these plugin managers, so I cannot really provide this information. Basically Ultisnips is just a regular Vim plugin, so there should be no need to do anything special. I also gladly accept patches and additions to the documentation.

Launchpad Details: #LPC SirVer - 2012-12-17 10:49:10 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

I also just ran into this issue. I used the current version from vim-scripts where this thing is not documented yet. Maybe it's time for a new release?

Launchpad Details: #LPC Gregor Müllegger - 2013-02-02 02:33:08 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Yes, you are right. It is about time to release a new version of Ultisnips.

Launchpad Details: #LPC SirVer - 2013-02-02 09:08:25 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

I'm using Vundle and ran into the same issue.

Adding the after/plugin and ftdetect symlinks did the trick.

I.e.

mkdir -p ~/.vim/after/plugin
ln -s ~/.vim/bundle/ultisnip/after/plugin/* ~/.vim/after/plugin
mkdir ~/.vim/ftdetext
ln -s ~/.vim/bundle/ultisnip/ftdetect/* ~/.vim/ftdetect

I have to say though, it would be very nice, if ultisnip would work out of the box with vundle without all that trouble.
Also, please consider adding this install information on the github README page. Especially for vundle that is the main place I look for install instructions.

Cheers!

Launchpad Details: #LPC Lemming - 2013-02-27 22:41:40 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

I am using vundle with ultisnips and have zero issues. I guess you have vundle wrongly installed . see VundleVim/Vundle.vim#16

Launchpad Details: #LPC SirVer - 2013-02-27 23:30:31 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

For those installing from vundle on 12.04 (with the vim 7.4 launchpad repo everyone seems to recommend), the following seems to fix the error:

mkdir -p ~/.vim/after/plugin
ln -s ~/.vim/bundle/UltiSnips/after/plugin/* ~/.vim/after/plugin
mkdir ~/.vim/ftdetect
ln -s ~/.vim/bundle/UltiSnips/ftdetect/* ~/.vim/ftdetect

This differs from the above with the /UltiSnips/ which is what is currently what vundle installs and fixes the typo in ftdetext!

Launchpad Details: #LPC Anton Melser - 2013-11-05 12:44:52 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

Anton, could you elaborate what you are talking about? Which typo? Vundle works perfectly fine with Ultisnips (if you install vundle correctly).

Launchpad Details: #LPC SirVer - 2013-11-05 20:24:59 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

When installing it from github via vundle, the correct path is: ~/.vim/bundle/ultisnips/*. Above mentioned workaround is therefore:

mkdir -p ~/.vim/after/plugin
ln -s ~/.vim/bundle/ultisnips/after/plugin/* ~/.vim/after/plugin
mkdir ~/.vim/ftdetext
ln -s ~/.vim/bundle/ultisnips/ftdetect/* ~/.vim/ftdetect

Only for the record :) Should be obvious, but I had trouble with it myself, so I wanted to make things clear!

Launchpad Details: #LPC Zapata - 2013-12-30 16:53:49 +0100

from ultisnips.

SirVer avatar SirVer commented on May 18, 2024

This is also necessary for pathogen, but seems to be OS dependent -- same settings/plugins works fine on ms-windows without this fix.

Launchpad Details: #LPC mMontu - 2014-02-04 17:19:08 +0100

from ultisnips.

wilmoore avatar wilmoore commented on May 18, 2024

The comment above has a typo (i.e. ftdetext), here is the corrected version:

% mkdir -p ~/.vim/after/plugin
% ln -s ~/.vim/bundle/ultisnips/after/plugin/* ~/.vim/after/plugin
% mkdir ~/.vim/ftdetect
% ln -s ~/.vim/bundle/ultisnips/ftdetect/* ~/.vim/ftdetect

from ultisnips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.