project-templates.nvim - A neovim project management plugin

栏目: IT技术 · 发布时间: 5年前

内容简介:I made this plugin mainly out of pure frustration. I had been using the extensionYou will need neovim compiled with python3 support. To determine whether or not your neovim has python support, type

project-templates.nvim

I made this plugin mainly out of pure frustration. I had been using the extension Project Templates back when I used VSCode as my IDE, and I had come to rely on it. When I migrated to Neovim, I thought "this extension was sooo helpfull! Clearly there must be an equivialent for vim, right?" I went searching and searching, but I couldn't find anything . There were plugins that created templates for individual files, and even multiple related files, like templator_vim , but nothing that creates templates for an entire project, that defines the project structure and boilerplate code for each necessary file. In most IDEs, the IDE will take care of these things for you automatically when you start a new project. But with vim, you have to create each individual file and folder yourself. This plugin aims to fix that.

Demo:

project-templates.nvim - A neovim project management plugin

Quick Start

Requirements

You will need neovim compiled with python3 support. To determine whether or not your neovim has python support, type :echo has('python3') and press enter. If it outputs 1 , you have python3 support, otherwise you will need to run the command pip install pynvim .

You will also need to run the command pip install binaryornot .

Installation

Add this to your init.vim:

  • vim-plug:

    • Plug 'pianocomposer321/project-templates.nvim', { 'do': ':UpdateRemotePlugins' }
  • Vundle:

    • Plugin 'pianocomposer321/project-templates.nvim', { 'do': ':UpdateRemotePlugins'}

etc, etc.

Then run :PlugInstall (vim-plug) or :PluginInstall (Vundle).

Finally, restart Neovim.

Usage

  • :LoadTemplate - Load a template into a new project. The plugin will look for placeholders (e.g. #{PLACEHOLDER} ), and ask for values to replace them in each non-binary file
  • :DeleteTemplate - Delete a template
  • :SaveAsTemplate - Save the current folder and all files and subfolders as a new template

The plugin will look for templates in ~/.templates. Sample templates can be found at https://github.com/pianocomposer321/project-template-samples . If you want to create your own templates, simply create a new project, add the placeholders you want, and save it in ~/.templates.

Credits

Finder.vim - https://vim.fandom.com/wiki/Implement_your_own_interactive_finder_without_plugins

Inspired by This Sublime text plugin and this VS Code Extension.


以上所述就是小编给大家介绍的《project-templates.nvim - A neovim project management plugin》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

MFC编程技巧与范例详解

MFC编程技巧与范例详解

曾凡锋、苗雨 / 清华大学出版社 / 2008-10 / 45.00元

本书集作者多年教学与软件开发经验,通过不同类型的实例详解向读者解读了如何使用MFC进行软件开发,并按实例的复杂度进行分级介绍,以满足不同层次读者的切实需要。. 本书共55个完整实例,均选自作者多年工程应用开发中的案例;内容共分14章,分别为MFC的基本概念、文档和视图、对话框、按钮控件、编辑控件、组合框控件、列表框控件、列表视图控件、树状视图控件、图像、多媒体、GDI与GDI+、网络编程、I......一起来看看 《MFC编程技巧与范例详解》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具