GithubHelp home page GithubHelp logo

ignorefiles's Introduction

.ignore

Build status

Download this extension from the VS Gallery or get the CI build.


This extension supports:

  • .babelignore (Babel)
  • .boringignore (Darcs)
  • .bzrignore (Bazaar)
  • .cfignore (Cloud Foundry)
  • .chefignore (Chef)
  • .cvsignore (CVS)
  • .dockerignore (Docker)
  • .eslintignore (ESLint)
  • .flooignore (Floobits)
  • .gitignore (Git)
  • .hgignore (Mercurial)
  • .jpmignore (Jetpack)
  • .jshintignore (JSHint)
  • .mtn-ignore (Monotone)
  • .npmignore (npm)
  • .p4ignore (Perforce)
  • .svnignore (SVN)
  • .tfignore (Team Foundation)
  • .vscodeignore (VSCode)
  • .yarnignore (Yarn)

See the change log for changes and road map.

Features

  • Syntax highlighting
  • File icons in Solution Explorer
  • Non-matching file paths are grayed out
  • Hover tooltips show path details
  • Button to remove all non-matching paths
  • Drag 'n drop support for files and folders
  • Syntax validation
  • Light Bulbs for quick actions

Syntax highlighting

Syntax highlighting for all types of .ignore file.

Syntax Highlighting

File icons

Correct file icons will be shown for all the .ignore files.

Icons

Tooltip

Hovering over any path entry will give details about what files the path points to.

Tooltip Short

To filter the results directly in the tooltip, simply place the cursor in the bottom search field and start typing.

Tooltip Search

To synchronize the selected file in the tooltip with the selected file in Solution Explorer, enable the Sync with Selected Document button:

Button Sync

Sometimes it can be helpful to see the matched files in context of all the non-matched files. You can do that by toggling the Show All Files button:

Tooltip All Files

Double-clicking any file in the tooltip will open it up in Visual Studio.

Non-matches

If a file path doesn't point to a file or folder, then it is being grayed out.

Non Match

Remove non-matches

Right-click in any .ignore file and select Remove non-matching entries.

Context menu

This action can be undone by invoking the Undo command (ctrl-z).

Drag 'n drop

You can drag any file or folder from Solution Explorer or from the file system using Windows Explorer. This will add the correct relative path to the .ignore file.

Validation

Validation helps you avoid typos and other mistakes. For instance, it will catch the user of ../ which is not allowed in .ignore files.

Validation

Light Bulbs

Light bulbs appear in the margin to give you quick access to perform helpful actions.

For matches:

Light bulb matches

Delete matching file entries... will delete the matching files and folders from disk. If any of the files are part of a project in the solution, the project will be updated to reflect the deletion of the files.

Exclude matching entries from project... will not delete the files and folder from disk, it will only remove any reference to them from the project.

For non-matches:

Light bulb non-matches

Remove non-matching entry will delete the current line from the .ignore file. This action can be undone by invoking the Undo command (ctrl-z).

Remove all non-matching entry will delete all non-matching entries in the .ignore file. It does the same as the right-click command does. This action can be undone by invoking the Undo command (ctrl-z).

Settings

Various settings are available in the Tools -> Options dialog. You can find them under Text Editor/.ignore in the list.

Settings

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

License

Apache 2.0

ignorefiles's People

Contributors

gep13 avatar madskristensen avatar mlorbetske avatar richarddavenport avatar scottaddie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ignorefiles's Issues

Can not edit .tfignore file after hover has appeared

Installed product versions

  • Visual Studio 2017
  • .ignore 1.2.71

Description

Can not edit .tfignore file after popup has appeared

Steps to recreate

  1. Open a .tfignore file in your solution
  2. Hover above packages until the tool tips
  3. Move your mouse until it disappears
  4. Click somewhere in the .tfignore file and type or copy\paste text.

Current behavior

A cursor appears, but no text can be changed.

Work around

save, close and reopen the .tfignore file

Expected behavior

I should be able to edit the file by typing or copy paste

it couse visual studio 2015 community busy.

Installed product versions

  • Visual Studio: [example 2015 community ]
  • This extension: [example 1.1.21]

Description

Replace this text with a short description

Steps to recreate

  1. Replace this
  2. text with
  3. the steps
  4. to recreate

Current behavior

Explain what it's doing and why it's wrong

Expected behavior

Explain what it should be doing after it's fixed.

Extension no longer working with Visual Studio 2019 (16.5.2 or later)

Installed product versions

  • Visual Studio: 2019 (version 16.5.4)
  • This extension: 1.2.77

Description

When this extension is installed, one can no longer edit .gitignore files. One also cannot open .gitignore files. They get and error when opening that states: “gitignore file name or extension cannot be associated with multiple content types.”

Steps to recreate

  1. Update Visual Studio 2019 to 16.5.2 or later (I have 16.5.4, but issue is reported to Microsoft starting with 16.5.2).
  2. Try to edit .gitignore (Team Explorer, Settings, Repository Settings, edit link). Nothing opens
  3. Try to open .gitignore from file menu. One gets above error.
  4. Uninstall extension. Try steps 2 and 3 again. They work.

Current behavior

The extension is not allowing the opening of the .gitignore file.

Expected behavior

Allow one to open the .gitignore file either by the Team Explorer, Repository Settings panel or through File-Open menu.

Cross Reference: Microsoft Developer Community issue: https://developercommunity.visualstudio.com/content/problem/981158/unable-to-open-gitignore-files-from-solution-explo.html

Parttern doesn't match files in .tfsignore

Installed product versions

  • Visual Studio: 2015 Enterprise update 2
  • This extension: 1.0.19

Description

In .tfsignore, the pattern 'xxx' (ex: '.vs', 'packages', 'mycustomdirectory') is displayed as grey color with tool-tip message 'The path 'x' does not point to any existing file. But in Team Explorer it work as expected.

Steps to recreate

  1. In a web project, add files in App_Data\xxx
  2. in .tfsingore add 'xxx' pattern
    or
  3. Add a nuget packages to a project
  4. in .tfsingore add 'packages' pattern

Current behavior

The pattern doesn't match anything

Expected behavior

The pattern should match files in App_Data\xxx

VS hangs (waits) for popup to show up when hovering

Installed product versions

  • Visual Studio: 2017 (15.7.5)
  • This extension: 1.2.71 and 1.2.77

Description

When hovering over a rule in .tfignore file, a popup will show up with matching files. However, VS hangs and waits till the popup shows up. This especially occurs when having a large code base. In my example, the directory contains 10800 folders (full tree) and 56000 files. Also, the IO on my machine is currently not the best.

Steps to recreate

See above.

Current behavior

See above.

Expected behavior

Popup can show, but maybe indicate a "loading" element. Lookup files async.

Path exclusion negation doesn't seem to be handled properly for .gitignore files

Installed product versions

  • Visual Studio: 2015 Community
  • This extension: 1.2.67

Description

Negation in .gitignore file for a very large repository will cause visual studio to hang. In the matched files listing on hover, it shows nearly every file in the project, not just the negated path.

Steps to recreate

  1. Create a large solution (mine has 10+ projects and over 11k files)
  2. Add the following lines to .gitignore
# NuGet Packages Directory (Ensure Nuget Package Restore is Enabled)
packages/*

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/
  1. Hover over !packages/*/build for a bit
  2. Try to do anything else

Current behavior

VS hangs with 32% processor usage, normal memory usage

Expected behavior

VS should be responsive

Use same background color for toolbar buttons as in SolExp

Solution Explorer uses a yellow background color like this:

image

Can we make it so that in the enabled state, the tree view toolbar buttons get the same background color? Also, use the same background color on the hover state.

The border should be the same color as well

Tooltip "Show all files" crashes VS 2017

Installed product versions

  • Visual Studio: 2017 Enterprise
  • This extension: 1.2.71

Description

VS 2017 crash when trying to see all files from tooltip

Steps to recreate

  1. add a file rule to a .tfignore
  2. when the tooltip appears click in "Show all files"

Current behavior

VS 2017 crashes

Expected behavior

Don't crash VS 2017 and actually "show all files" 😆

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.