New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yank Note 使用分享 #65
Comments
我日常使用的一些小工具
点击展开代码 |
Tello 遥控器视频:https://www.bilibili.com/video/BV1W34y1Z7jf 点击展开代码 |
Git 推送按钮推送到 Git 仓库这个功能,现在可以编写插件实现。 window.registerPlugin({
name: 'git-push',
register: ctx => {
ctx.statusBar.tapMenus(menus => {
menus['git-push'] = {
id: 'git-push',
position: 'left',
title: 'Git 提交',
onClick: () => {
const currentRepo = ctx.store.state.currentRepo;
const path = currentRepo && currentRepo.path
if (path) {
ctx.action.getActionHandler('xterm.run')(`cd '${path}' && git add . && git ci -m 'update' && git push && exit`)
}
}
}
})
}
});将上述代码编写 右键 Sublime Merge 菜单window.registerPlugin({
name: 'file-tree-context-menu-sublime-merge',
register: ctx => {
ctx.tree.tapContextMenus((items, node) => {
const openInSublimeMerge = () => {
const currentRepo = ctx.store.state.currentRepo;
const path = currentRepo ? currentRepo.path + node.path : ''
if (path) {
if (node.type === 'dir') {
ctx.api.runCode('bash', `smg '${path}'`);
} else {
ctx.api.runCode('bash', `cd '${currentRepo.path}' && smg blame '${path}'`);
}
}
}
if (node.type === 'file' || (node.type === 'dir' && node.path === '/')) {
items.push(
{ type: 'separator' },
{ id: 'openInSublimeMerge', label: '在 Sublime Merge 中打开', onClick: openInSublimeMerge }
);
}
return items;
})
}
});注:苹果应用商店的版本因为审核原因不支持终端功能,上面的插件无效 |
|
authelia 这个和yn配合 既能兼顾安全,也能兼顾内容 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment






这里我将分享 Yank Note 的方方面面,也欢迎大家分享
The text was updated successfully, but these errors were encountered: