nuxt-open-in-editor
v0.0.1
Published
Nuxt server middleware to open any file in an editor by request to defined route
Downloads
19
Readme
nuxt-open-in-editor
Nuxt server middleware to open any file in an editor by request to defined route.
Setup
- Add
nuxt-open-in-editordependency using yarn or npm to your project - Add
nuxt-open-in-editortomodulessection ofnuxt.config.js
{
modules: [
// Simple usage
'nuxt-open-in-editor',
// With options
['nuxt-open-in-editor', { /* module options */ }],
]
}Options
| Option | Type | Default | Info |
| ------------- | ------------- | ------------- | ------------- |
| path | String | /_open | To trigger middleware on any request method to /_open |
| editor | String | code | Editor to open a file |
| cmd | String | null | Command to launch an editor |
| pattern | String | null | Option to specify arguments for a command |
| line | Number | 1 | Defines the number of the first line in the editor |
| column | Number | 1 | Defines the number of the first column in the editor |
Supported editors
- sublime – Sublime Text
- atom – Atom Editor
- code – Visual Studio Code
- webstorm – WebStorm
- phpstorm - PhpStorm
- idea14ce – IDEA 14 CE
- vim – Vim (via Terminal, Mac OS only)
- emacs – Emacs (via Terminal, Mac OS only)
- visualstudio – Visual Studio
Usage
Module Description
License
Copyright (c) Antério Vieira [email protected]
