mattn / mattn/vim-sonictemplate

error - Template is not exists

Open
#44 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
342
Forks
45
PR merge metrics
No merged PRs in 30d

Description

I have created a custom template base-kickstart.java in ~/.config/nvim/templates:

import java.util.Scanner;

public class {{_name_}}{
  public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    int T = Integer.parseInt(input.nextLine());
		for (int ks = 1; ks <= T; ks++) {
			{{_cursor_}}
		}
    input.close();
  }
}

and added

let g:sonictemplate_vim_template_dir='~/.config/nvim/templates'

to init.vim. When I create a new file (:e test.java) and then :Template and press tab, I get kickstart in the tab completion.

However when I select it, I get Template kickstart is not exists.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with init.vim setting g:sonictemplate_vim_template_dir and the Java template under ~/.config/nvim/templates. Start by tracing the :Template completion and template lookup paths to see why kickstart is listed but cannot be selected. Done means the custom Java template is found and applied successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.