From 62b5f78fd9b2549e549d80ed8694eef180f6ed7c Mon Sep 17 00:00:00 2001 From: Iggy Jackson Date: Wed, 27 May 2020 07:36:06 -0700 Subject: [PATCH] Add .kate-swp files to ignore pattern (#3380) 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 --- pkg/watch/ephemeral.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/watch/ephemeral.go b/pkg/watch/ephemeral.go index a67c4a70b..68001101b 100644 --- a/pkg/watch/ephemeral.go +++ b/pkg/watch/ephemeral.go @@ -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 {