pycharm 模板文件夹中不存在实时模板文件? [英] Live templates file does not exist in pycharm templates folder?

查看:115
本文介绍了pycharm 模板文件夹中不存在实时模板文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想插入多个实时模板.例如,每当我输入 prop 并按下 tab 时,pycharm 就会为 python 编写完整的属性.

I wanted to insert multiple live templates. For example whenever I type prop and press tab, then pycharm would write the full property for python.

我想导入以下列表:https://github.com/hoffmann/PyCharm-Python-Templates

但是我在 \.\config\templates 中找不到模板文件夹,如 https://www.jetbrains.com/help/pycharm/2016.1/live-templates.html

But I can not find the templates folder in <your home directory>\.<product name><version number>\config\templates, as said in https://www.jetbrains.com/help/pycharm/2016.1/live-templates.html

另外我使用的是社区版 2016.1.4.

Also I am using the community edition 2016.1.4.

推荐答案

我遇到了同样的问题,发现有一种最简单的方法可以插入多个实时模板.

I've had the same issue and found that there is one simplest way to insert multiple live templates.

  • 只需从 *.XML 文件中复制所需的模板代码,
  • 打开 PyCharm 的 Live Templates Settings (Ctrl+Alt+S -> Editor/Live Templates),
  • 选择模板组(例如 Python 或像user"一样创建自己的模板组),
  • 并粘贴值.仅此而已!
  • Just copy desired template code from *.XML file,
  • open PyCharm's Live Templates Settings (Ctrl+Alt+S -> Editor / Live Templates),
  • select Template Group (such as Python or create your own like a 'user'),
  • and paste in the value. That's all!

它运行良好,不受操作系统、PyCharm 版本的影响,您不必担心 PyCharm 配置文件的位置.

It works fine dependless of the operating system, PyCharm version and you shouldn't worry about PyCharm config files location.

您可以通过这种方式一次性插入多个实时模板.

You can insert in that way multiply live templates at once.

这篇关于pycharm 模板文件夹中不存在实时模板文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆