Skip to content

Commit

Permalink
Add .kate-swp files to ignore pattern (#3380)
Browse files Browse the repository at this point in the history
KDE's text editor, kate, uses a file similar to Vim's .swp files. Ignore
these files so we don't rebuild on every keypress.

Fixes #3378
  • Loading branch information
iggy authored May 27, 2020
1 parent 17b3028 commit 89ee8e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/ignore/ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ func initEphemeralPathMatcher() model.PathMatcher {
// ignoring .sw? seems dangerous, since things like .swf or .swi exist, but ignoring the first few
// seems safe and should catch most cases
vimPatterns := []string{"**/4913", "**/*~", "**/.*.swp", "**/.*.swx", "**/.*.swo", "**/.*.swn"}
// kate (the default text editor for KDE) uses a file similar to Vim's .swp
// files, but it doesn't have the "incrememnting" character problem mentioned
// above
katePatterns := []string{"**/.*.kate-swp"}

allPatterns := []string{}
allPatterns = append(allPatterns, golandPatterns...)
allPatterns = append(allPatterns, emacsPatterns...)
allPatterns = append(allPatterns, vimPatterns...)
allPatterns = append(allPatterns, katePatterns...)

matcher, err := dockerignore.NewDockerPatternMatcher("/", allPatterns)
if err != nil {
Expand Down

0 comments on commit 89ee8e3

Please sign in to comment.