vim-projectionist icon indicating copy to clipboard operation
vim-projectionist copied to clipboard

Feature request: Populate template from a file if template is a string not an array

Open cormacrelf opened this issue 7 years ago • 2 comments

I have a few templates and my .projections.json file is getting big. Editing the templates has also become very cumbersome, what with the JSON indents and string quoting on every line.

I notice if you set { "template": "path-to-file" }, :AD just puts the literal characters "path-to-file" in your file. Since the docs say it should be an array, this seems like the right way to extend to template file paths.

cormacrelf avatar Oct 15 '18 08:10 cormacrelf

I think this would be reasonable, with a fallback to the old behavior if the file doesn't exist.

tpope avatar Oct 21 '18 18:10 tpope

Also while you’re here, I recently made a ton of improvements to a fork of fuzzy-projectionist that you should check out! Aside from the FZF integration, it turns globs into regexes and gets fd —type f or find -regex to do the legwork, which can be much faster in big projects. Over a few hundred files the difference was seconds. It may be worth bringing at least some of it back to projectionist.

https://github.com/cormacrelf/fuzzy-projectionist.vim

cormacrelf avatar Oct 21 '18 19:10 cormacrelf