# open-in-editor-vscode

> Open a file in Visual Studio, Atom Editor, Emacs, IntelliJ IDEA Community Edition, Sublime Text, PhpStorm, Vim, WebStorm or any other external editor from VS Code.

Latest version **1.0.0** (published 2018-06-14) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install open-in-editor-vscode
pnpm add open-in-editor-vscode
yarn add open-in-editor-vscode
bun add open-in-editor-vscode
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-14 |
| First published | 2018-06-14 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 424.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 10 |
| Maintainers | generalov |
| Keywords | open, edit, switch, file, editor |

## Links

- npm: https://www.npmjs.com/package/open-in-editor-vscode
- Repository: https://github.com/generalov/open-in-editor-vscode
- Issues: https://github.com/generalov/open-in-editor-vscode/issues
- npm.io page: https://npm.io/package/open-in-editor-vscode

## Dependencies (1)

- [@generalov/open-in-editor](https://npm.io/package/@generalov/open-in-editor.md) ^2.3.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-06-14

## README

# Open in Editor extension for Visual Studio Code

The extension enables you to open a file in an alternative IDE or editor.

Editor support:

-   [Atom Editor](https://atom.io/)
-   [Emacs](https://www.gnu.org/software/emacs/)
-   [IDEA 14 Community Edition](https://www.jetbrains.com/idea/download/)
-   [Sublime Text](http://www.sublimetext.com/)
-   [PhpStorm](https://www.jetbrains.com/phpstorm/)
-   [Vim](http://www.vim.org/)
-   [Visual Studio](https://www.visualstudio.com/)
-   [WebStorm](https://www.jetbrains.com/webstorm/)

You also can use any other editor that is able to open files from command line.

## Features

-   Editor context menu
-   File Explorer context menu
-   Put a cursor in the same position.

![Open in External Editor](images/open-in-editor-vscode.gif)

Use the menu in the editor's tab or the explorer or just press F1 and type `Open in External Editor`. The selected file will be opened in an existing session of an alternative editor and put a cursor in the same position as it was in VS Code.

## Keyboard Shortcut

You can also use `Alt+Shift+E` to open the file in the alternative editor.

## Extension Settings

This extension contributes the following settings:

**`alt-editor.name`**: a string name of an editor.

Supported names are:

| Name           | Editor                                      |
| -------------- | ------------------------------------------- |
| `atom`         | Atom Editor                                 |
| `emacs`        | Emacs (via Terminal, Mac OS and Linux only) |
| `idea14ce`     | IDEA 14 CE                                  |
| `phpstorm`     | PhpStorm                                    |
| `sublime`      | Sublime Text                                |
| `vim`          | Vim (via Terminal, Mac OS and Linux only)   |
| `visualstudio` | Visual Studio                               |
| `webstorm`     | WebStorm                                    |

### Advanced settings

Use these setting if the editor currently is not supported or if the editor's path can't be detected automatically.

**`alt-editor.binary`**: a string path to the editor binary

**`alt-editor.args`**: a string of command line arguments which will be passed to the `binary`. The `args` can contain placeholders to be replaced by actual values. Supported placeholders: `{filename}`, `{line}` and `{column}`

**`alt-editor.terminal`**: set this to `true` if the editor should be opened in a terminal. Mac OS and Linux are supported.

### Custom editors with key bindings
Use custom [Keyboard Shortcuts](https://code.visualstudio.com/docs/getstarted/keybindings#_advanced-customization) to open the current file with different editors.
```
[{
  "key": "shift+alt+v",
  "command": "alt-editor.openFile",
  "args": { "name": "vim" },
  "when": "editorTextFocus"
}, {
  "key": "shift+alt+s",
  "command": "alt-editor.openFile",
  "args": { "name": "sublime" },
  "when": "editorTextFocus"
}]
```

### Examples:

#### Visual Studio

Use the Visual Studio IDE as an alternative editor.

    "alt-editor.name": "visualstudio"

#### Vim

Override the default arguments to use a single instance of the Vim editor and open files in tabs.

    "alt-editor.name": "vim",
    "alt-editor.args": "--servername Code --remote-tab-silent \"+call cursor({line}, {column})\" {filename}"

The Vim should be compiled with `+clientserver` flag. Please run the `vim --version` and check the output.

## For more information

-   Powered by [open-in-editor](https://github.com/lahmatiy/open-in-editor)

**Enjoy!**

---
_Source: https://npm.io/package/open-in-editor-vscode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
