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

Half broken output #32

Open
k1sul1 opened this issue May 2, 2017 · 2 comments
Open

Half broken output #32

k1sul1 opened this issue May 2, 2017 · 2 comments

Comments

@k1sul1
Copy link

k1sul1 commented May 2, 2017

Consider the following function:

function get_acf_option($option = '', $location = 'options', $format = true) {

When I use pdv#DocumentCurrentLine() on it, I get the following output:

/**
 * ${1:get_acf_option}
 *
 * @param ${2:string} $option${3}
 * @param ${4:string} $location${5}
 * @param ${6:mixed} $format${7}
 */
function get_acf_option($option = '', $location = 'options', $format = true) {

I'm using Vundle to manage my plugins, and I've installed both vmustache & pdv:

let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip"

Plugin 'tobyS/vmustache'
Plugin 'tobyS/pdv'

map <F6> :call pdv#DocumentCurrentLine()<CR>

While the current output is definitely better than manually typing all that, I have to quite a bit of cleanup afterwards. Am I doing something wrong perhaps?

@kevinquinnyo
Copy link

kevinquinnyo commented Dec 30, 2017

I know this is an old issue, but to avoid this, the problem is that you are probably using templates_snip instead of templates. The templates_snip templates are vmustache templated for use with UltiSnips.

The readme is not super clear on this so it took me a while to figure out as well. I'm sure you found the solution or a workaround by now but this is just for anyone else's benefit who ends up here.

@k1sul1
Copy link
Author

k1sul1 commented Dec 31, 2017

Yeah, I did eventually end up using UltiSnips. I just had some problems with it when I first started using Vim, so I did't want to use it at first, and this issue was born.

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