0.0.1 β’ Published 6 years ago
nuxt-open-in-editor v0.0.1
nuxt-open-in-editor
Nuxt server middleware to open any file in an editor by request to defined route.
Setup
- Add
nuxt-open-in-editor
dependency using yarn or npm to your project - Add
nuxt-open-in-editor
tomodules
section 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 anteriovieira@gmail.com