# open-in-typora
Opens Markdown files in Typora.
## Features
The provided command `typora.open` opens files that use Markdown language mode (.md, .mdown,.markdown) in Typora editor.
Because of some obscure problem, opening files in Typora via Node's `childProcess` doesn't work (and consequently any extensions that use npm 'open' package as well). No other extension that I tried worked for me, so I wrote this. This extension uses VSCode terminal to run Typora.
Extension also contributes context menu commands (in editor and explorer as well) and status bar button.
## Requirements
You must have Typora installed and typora.exe in the system's PATH.
To add Typora to your PATH, you can check [this guide](./addToPATH.md).
## Known Issues
Presumably it will work on all platforms, but at the moment I have tested it on Windows only.
Typora has multiple tabs, but currently there's no option in Typora to use single window only when opening files. So each time you launch `typora.open` command it will open a new Typora window.
You can track this issue on [GitHub](https://github.com/typora/typora-issues/issues/1000).
## Bonus Tip
You can combine this extension with [Power-Tools extension](https://marketplace.visualstudio.com/items?itemName=ego-digital.vscode-powertools) to create a handy button on your taskbar, which will be highlighted if the file you are editing can be opened in Typora.
Here is the settings block you need to put in your settings.json (change it to taste):
```json
"ego.power-tools.user": {
"buttons": [ {
"text": "Typora",
"tooltip": "Open file in Typora editor",
"action": {
"type": "command",
"command": "typora.open"
},
"onEditorCreated": "if ($vs.window.activeTextEditor.document.languageId === 'markdown') { $v['button'].enable(); $v['button'].color = ''; } else { $v['button'].disable(); $v['button'].color = 'grey';}",
"onEditorChanged": "if ($vs.window.activeTextEditor.document.languageId === 'markdown') { $v['button'].enable(); $v['button'].color = ''; } else { $v['button'].disable(); $v['button'].color = 'grey';}"
}]
}
```
## Credits
[alexzshl](https://github.com/alexzshl) - for context menu commands and status bar and configuration options.
[fbarda](https://github.com/fbarda) - for the guide on adding Typora executable to PATH
没有合适的资源?快使用搜索试试~ 我知道了~
vscode-open-in-typora:从Typora中的VSCode打开Markdown文件
共22个文件
png:6个
json:6个
md:4个
需积分: 50 3 下载量 78 浏览量
2021-04-30
16:15:00
上传
评论
收藏 99KB ZIP 举报
温馨提示
开门诊 在Typora中打开Markdown文件。 特征 提供的命令typora.open将在Typora编辑器中打开使用Markdown语言模式(.md,.mdown,.markdown)的文件。 由于一些晦涩的问题,无法通过Node的childProcess在Typora中打开文件(因此,任何使用npm'open'包的扩展名也是如此)。 没有其他扩展对我有用,所以我写了这个。 该扩展使用VSCode终端运行Typora。 扩展程序还提供了上下文菜单命令(在编辑器和资源管理器中也是如此)和状态栏按钮。 要求 您必须在系统的PATH中安装Typora和typora.exe。 要将Typora添加到您的PATH中,可以查看。 已知的问题 大概它可以在所有平台上运行,但是目前我仅在Windows上进行了测试。 Typora具有多个选项卡,但是Typora中目前没有选项仅在打开文件时使用单
资源推荐
资源详情
资源评论
收起资源包目录
vscode-open-in-typora-master.zip (22个子文件)
vscode-open-in-typora-master
.eslintrc.json 389B
.gitignore 34B
images
addToPath
advanced-settings.png 14KB
shortcut-target.png 6KB
edit-path.png 24KB
typora-shortcut.png 5KB
add-path-entry.png 20KB
app-icon-typora.png 7KB
package.json 2KB
jsconfig.json 178B
package-lock.json 38KB
addToPATH.md 2KB
.vscodeignore 143B
LICENSE 1KB
CHANGELOG.md 334B
extension.js 2KB
.github
workflows
vsce.yml 345B
README.md 2KB
.sidenotes
cyberbiont
04d058ab-e96b-4f18-8ecb-acaa8f7cfe44.md 4KB
.vscode
launch.json 801B
extensions.json 169B
.gitattributes 48B
共 22 条
- 1
资源评论
CodeWizardess
- 粉丝: 15
- 资源: 4691
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- AIS2024 valid
- 最入门的爬虫代码 python.docx
- 爬虫零基础入门-爬取天气预报.pdf
- 最通俗易懂的 MongoDB 非结构化文档存储数据库教程.zip
- 以mongodb为数据库的订单物流小项目.zip
- 腾讯云-mongodb数据库, 项目部署.zip
- 腾讯 APIJSON 的 MongoDB 数据库插件.zip
- 理解非关系型数据库和关系型数据库的区别.zip
- 操作简单的Mongodb网页web管理工具,基于Spring Boot2.0支持mongodb集群.zip
- tms-mongodb-web,提供访问mongodb数据的REST API和可灵活扩展的mongodb web 客户端.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功