viewineditor

2.0.0 • Public • Published

vie

vie, for view in editor, is a command line tool that lets you quickly view any GitHub repository or pull-request in your text editor. vie downloads the repo to a temporary directory that's automatically cleaned up by your operating system when you're done viewing the repo.

See this video demo.

Note: the default text editor that vie looks for is the one set by your EDITOR environment variable. If EDITOR is not set, vie looks for VS Code. If you use a different editor, see the configurations section below.

Installation

npm i -g viewineditor

Usage

View a GitHub repo

vie https://github.com/twbs/bootstrap

vie will clone the git repo of the link.

View a GitHub pull-request

vie https://github.com/twbs/bootstrap/pull/23691

vie will clone the git repo from which the pull-request was sent and it will switch to the branch of the pull-request.

Options

-d, --deep

By default, vie clones repos with --depth 1 for efficiency. If you need to clone the repo with its full history, pass --deep or -d.

For example

vie -d https://github.com/twbs/bootstrap

Note: PRs are always cloned with full depth.

Configurations

To configure vie, set the following environment variables in your shell initialization file, .bash_profile, .zshrc etc...

EDITOR

You can set the EDITOR environment variable to the shell command of the text editor of your choice. This tells vie which command to use to open the cloned repo.

Examples

export EDITOR=atom # for Atom 
export EDITOR=subl # for Sublime 
export EDITOR='open -a IntelliJ\ IDEA' # for IntelliJ IDEA 

FAQ

When will the downloaded files be deleted?

vie clones files to the temp directory of your operating system. Mac, Linux, and Windows handle temp directories differently but they eventually get deleted. vie will print out the location of the temp directory where it is cloning the repo.

Readme

Keywords

none

Package Sidebar

Install

npm i viewineditor

Weekly Downloads

2

Version

2.0.0

License

Unlicense

Last publish

Collaborators

  • msafi