Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gimenete/open-text-editor
Opens a file in a text editor
https://github.com/gimenete/open-text-editor
Last synced: about 1 month ago
JSON representation
Opens a file in a text editor
- Host: GitHub
- URL: https://github.com/gimenete/open-text-editor
- Owner: gimenete
- License: mit
- Created: 2015-03-25T11:20:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-25T12:06:24.000Z (over 9 years ago)
- Last Synced: 2024-09-14T16:45:06.360Z (about 2 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# open-text-editor
Opens a file in a text editor## Configuration
Create a file `~/.open-text-editor` with the command to open your favorite editor. Example for Sublime Text 2 on a Mac:
```
/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl %s:%s
```The first `%s` will be replaced with the file path to open and the second `%s` will be replaced with the line number.
## Usage
```javascript
require('open-text-editor').open('/path/to/file', 20, callback)
```The callback is optional.