Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get example template 'skeleton' to work #100

Open
ModernTrollfare opened this issue Apr 25, 2023 · 1 comment
Open

Unable to get example template 'skeleton' to work #100

ModernTrollfare opened this issue Apr 25, 2023 · 1 comment

Comments

@ModernTrollfare
Copy link

ModernTrollfare commented Apr 25, 2023

Issue: Snippet generated by 'skeleton' is not loaded by xptemplate after a :XPTreload.

Steps taken:

  1. Write a new file using template skeleton.
" Save this file as ~/.vim/ftplugin/c/hello.xpt.vim(or
" ~/vimfiles/ftplugin/c/hello.xpt.vim).
" Then you can use it in C language file:
"     vim xpt.c
" And type:
"     helloxpt<C-\>
"
XPT helloxpt " tips about what this snippet do
Say hello to `xpt^.
`xpt^ says hello.
  1. Following the above instructions, Save the file to ~/.vim/ftplugin/c/hello.xpt.vim.
  2. Run :XPTreload.
  3. in a .h file, type helloxpt then press <C->.

Expected results:
Observe template 'helloxpt' being generated.

Outcome:
Observe helloxpt\^ in the .h file.

Alternative steps taken:
Place the file in an alternative path present in runtimepath; e.g.:
/path/in/runtimepath/ftplugin/c/hello.xpt.vim

Outcome:
Again, no template is being generated.

At the time of failure, I have used Date<C-\> as a sanity test and the date is shown as expected.

Can advise if there's anything wrong with the above steps, or is there a bug somewhere?

@drmingdrmer
Copy link
Owner

Can you see your script is loaded correctly with :scriptnames?

There should be line like:

...
233: ~/.vim/ftplugin/c/hello.xpt.vim
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants