Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hasit/vscode-gi

Visual Studio Code extension for generating .gitignore files easily.
https://github.com/hasit/vscode-gi

command-palette git gitignore gitignore-files visual-studio-code

Last synced: about 2 months ago
JSON representation

Visual Studio Code extension for generating .gitignore files easily.

Awesome Lists containing this project

README

        

# ![vscode-icon](assets/icon-64x64.png)

[![gi version](https://vsmarketplacebadge.apphb.com/version-short/rubbersheep.gi.svg)](https://marketplace.visualstudio.com/items?itemName=rubbersheep.gi) [![gi installs](https://vsmarketplacebadge.apphb.com/installs/rubbersheep.gi.svg)](https://marketplace.visualstudio.com/items?itemName=rubbersheep.gi) [![gi ratings](https://vsmarketplacebadge.apphb.com/rating-short/rubbersheep.gi.svg)](https://marketplace.visualstudio.com/items?itemName=rubbersheep.gi#review-details)

[![Build Status](https://travis-ci.org/hasit/vscode-gi.svg?branch=master)](https://travis-ci.org/hasit/vscode-gi)

`gi` stands for 'gitignore'. It is an extension for generating .gitignore files from inside Visual Studio Code. `gi` uses the [gitignore.io](https://www.gitignore.io) API to keep the list of operating systems, IDEs and programming languages updated.

![Usage of gi](assets/gi.gif)

## Install
Press `Cmd+P` for MacOS and `Ctrl+P` for Linux/Windows to launch VS Code Quick Open, paste the following command, and press enter.

```
ext install gi
```

## Usage

Once you install and reload Visual Studio Code, you can run the extension by launching the Command Palette with `Shift+Cmd+P` for MacOS and `Shift+Ctrl+P` for Linux/Windows. Type in the following into the command palette.

```
gi
```

![Launch gi from Command Palette](assets/cp.png)

Once you press enter, `gi` will load a list of operating systems, IDEs, and programming lanuages. This might take a second so bear with it.

![List presented by gi](assets/list.png)

You can search for (yay `showQuickPick()`!) the operating system, IDE, or programming lanuage you want to generate a .gitignore file for. Even though I would like you (the user) to be able to pick multiple items from the list, it is currenly not supported by [vscode namespace API](https://code.visualstudio.com/docs/extensionAPI/vscode-api). I have put in a feature request [here](https://github.com/Microsoft/vscode/issues/12925), but it seems that it has been on the todo list for quite some time now [here](https://github.com/Microsoft/vscode/issues/238).

`gi` will show the result of your actions in two places depending on importance.
1. InformationMessage - InformationMessage is the toast that slides down and requires an action from you. High level details such as '.gitignore created' are shown here.
2. StatusBarMessage - Status bar (View -> Toggle Status Bar) is at the bottom of the window. Low level details such as 'You picked node.' are shown here.

At any moment you can press the `Escape - ` key to stop `gi`.

## Todo

- Add tests.
- Add multi-select support to list.

## Contributing

This is my very first extension for Visual Studio Code. If you find the code to be bug ridden, with mistakes or just plain old amazing, send in a word. You are welcome to comment/ask questions/post issues/send PRs on the [Github page](https://github.com/hasit/vscode-gi).

## Note

`gi` uses the API exposed by [gitignore.io](https://www.gitignore.io). I made this extension as a learning experience.

I would like to thank [Joe Blau](https://joeblau.com) for this work on [gitignore.io](https://www.gitignore.io)'s API and [Jason Long](http://www.jasonlong.me) for his help with creating the awesome icon used by `gi`.