 
     enum CodingKeys: String, CodingKey {
 
-      case ignorePatterns
-    }
+      case ignorePatterns = "ignore-patterns"
+    }
+
+    let root = FileItem(URL(fileURLWithPath: "/", isDirectory: true))
+
+    var flatFileItems = Observable<[FileItem]>.empty()
+    var cwd = FileUtils.userHomeUrl
+    var ignorePatterns = State.defaultIgnorePatterns
+    var ignoreToken = Token()
+
+    var open = false
 
     init(from decoder: Decoder) throws {
       let container = try decoder.container(keyedBy: CodingKeys.self)

      var container = encoder.container(keyedBy: CodingKeys.self)
      try container.encode(FileItemIgnorePattern.toString(self.ignorePatterns), forKey: .ignorePatterns)
    }

    let root = FileItem(URL(fileURLWithPath: "/", isDirectory: true))

    var flatFileItems = Observable<[FileItem]>.empty()
    var cwd = FileUtils.userHomeUrl
    var ignorePatterns = State.defaultIgnorePatterns
    var ignoreToken = Token()

    var open = false

    init() {
    }

    try container.encode(self.linespacing, forKey: .editorLinespacing)
    try container.encode(self.usesLigatures, forKey: .editorUsesLigatures)
  }

  init() {
  }
