1.插件安装通用

在这里插入图片描述

      
 
 

 
 
 
 
 
 
 

1.参考地址

https://docs.sublimetext.info/en/latest/extensibility/plugins.html

2.进入开发者模式

菜单栏: Tools → Developer → new plugin

3.插件编写

image.png

4.保存

Ctrl + S,进行插件保存,命名文件,【.py结尾】,看具体实现语言

image.png

目录为:…/Sublime Text 3\Packages\User

5.命令操作

Ctrl + ~打开控制台;

输入命令:view.run_command(‘xxx’) //回车执行

6.Command命令说明

Sublime text插件命令的命名规则:

插件命令的解析规则很简单, 命令名称 + Command 构成class, 当然这里的命令名称是首字母大写的,但是执行的时候会转化为小写的,例如:
class MikeWangCommand 所对应的命令是: mike_wang,也就是说如果是多个首字母大写加上Command,就是多个单词小写加上_

官文说明:

Conventions for Command Names

You may have noticed that our command is named ExampleCommand, but we passed the string example to the API call instead.

This is necessary because Sublime Text standardizes command names by stripping the Command suffix and separating PhrasesLikeThis with underscores, like so:phrases_like_this.

New commands should follow the same naming pattern.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

了-凡

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值