Comments (20)
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.
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.
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/.vim/UltiSnips-2.2/after/plugin
set runtimepath+=
Does that solve your problem?
status incomplete
Launchpad Details: #LPC SirVer - 2012-10-17 23:03:50 +0200
from ultisnips.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- MacVim: UltiSnipsEdit not an editor command HOT 1
- Vimtex quickfix menu breaks snippet
- Ungrab tab key in visual mode HOT 1
- Installing the newest version of `pynvim` makes Ultisnips laggy HOT 2
- multi-word triggers HOT 3
- Regex snippet starting with `\b(?i)` used to work but doesn't anymore. HOT 2
- RecursionError: maximum recursion depth exceeded in comparison HOT 4
- Some snippets use severe stutter HOT 1
- A simple snippet for mermaid within Markdown - NOT WORKING HOT 3
- Python interpolation not work HOT 2
- How to let a snippet modify other parts of the code as well? HOT 4
- Python 3.12: Syntax warnings for escape sequences HOT 2
- Config file in a symlinked folder not properly recognized when calling UltiSnips Edit HOT 1
- just installed Ultisnips and got this error HOT 1
- Constant errors when python is missing (Can we enable discussions on github for this project?) HOT 1
- Error detected while processing TextChangedI Autocommands HOT 6
- [Feature Request] Subfolder in `filetype` snippets folder & Specific `extends` and `excludes` HOT 2
- Expansion of snippets no longer works HOT 1
- Is there any way to forcefully remove the current snippet status? HOT 1
- Reason why we need `snoremap <c-r> <c-g>"_c<c-r>`? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultisnips.