Nuxt server middleware to open any file in an editor by request to defined route.
- 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 */ }],
]
}
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 |
- 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
Module Description
Copyright (c) Antério Vieira anteriovieira@gmail.com