Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CodeZombieCH/vscode-gitignore
A simple extension for Visual Studio Code that lets you pull .gitignore files from the https://github.com/github/gitignore repository
https://github.com/CodeZombieCH/vscode-gitignore
extension gitignore visual-studio-code
Last synced: 9 days ago
JSON representation
A simple extension for Visual Studio Code that lets you pull .gitignore files from the https://github.com/github/gitignore repository
- Host: GitHub
- URL: https://github.com/CodeZombieCH/vscode-gitignore
- Owner: CodeZombieCH
- License: mit
- Created: 2016-03-10T17:26:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T20:53:51.000Z (about 1 year ago)
- Last Synced: 2024-08-01T13:17:46.942Z (3 months ago)
- Topics: extension, gitignore, visual-studio-code
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=codezombiech.gitignore
- Size: 335 KB
- Stars: 69
- Watchers: 3
- Forks: 20
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gitignore Extension for Visual Studio Code
A extension for Visual Studio Code that assists you in working with `.gitignore` files.
## Features
- Add local `.gitignore` file by pulling .gitignore templates from the [github/gitignore](https://github.com/github/gitignore) repository
- Language support for `.gitignore` files## Usage
Start command palette (with Ctrl+Shift+P or F1) and start typing `Add gitignore`
## Settings
### Visual Studio Code Settings
```JavaScript
{
// Number of seconds the list of `.gitignore` files retrieved from github will be cached
"gitignore.cacheExpirationInterval": 3600
}
```### Authenticated GitHub API Requests
This extension makes API calls to the [GitHub REST API](https://docs.github.com/en/rest) which are subject to [rate limits](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
By default, requests sent to the GitHub REST API are unauthenticated. Although the rate limit for unauthenticated requests is low, this should usually not be an issue because of caching and the most likely infrequent usage of this extension.
If you reach the rate limit (e.g. because you work inside a corporate network), you can switch to [authenticated requests](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#authentication) by setting the `GITHUB_AUTHORIZATION` environment variable.
#### Examples
Using a [personal access token](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#oauth2-token-sent-in-a-header):
export GITHUB_AUTHORIZATION='Token '
codeUsing an [OAuth2 key/secret](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#oauth2-keysecret)
export GITHUB_AUTHORIZATION='Basic '
code## Roadmap
### v0.1
- Basic implementation that allows to pull a single `.gitignore` file### v0.2
- Add language support for `.gitignore` files### v0.3
- Support reading `.gitignore` files from subdirectories in the github/gitignore repository### v0.4
- Support adding multiple `.gitignore` files and merge it to a `.gitignore` file### v0.5
- Support proxy### v0.6
- Update extension to more recent vscode ecosystem
- Update dependencies### v0.7
- Support multi-root workspaces (see contribution by @hangxingliu)### v0.8
- Fix bugs
- Remove `github` dependency
- Update dependencies### v0.x
- Switch to async/await
- Further improve proxy support
- Add unit tests with active proxy## Changelog
See [CHANGELOG.md](CHANGELOG.md)
## License
See [LICENSE](LICENSE) file
## Credits
Icon based on the Git logo by Jason Long