diff --git a/home/common/editors.nix b/home/common/editors.nix
new file mode 100644
index 0000000..15d86d1
--- /dev/null
+++ b/home/common/editors.nix
@@ -0,0 +1,33 @@
+{ config, pkgs, ... }:
+
+{
+  imports = [
+    ./neovim.nix
+    ./emacs.nix
+    ./vscode.nix
+  ];
+
+  home.packages = with pkgs; [
+    fzf
+    ripgrep
+  ];
+
+  home.sessionVariables = with pkgs; {
+    EDITOR = "nvim";
+    FZF_DEFAULT_COMMAND = "${ripgrep}/bin/rg --files --hidden";
+  };
+
+  home.file.".editorconfig".text = ''
+    [*]
+    charset = utf-8
+    indent_style = space
+    indent_size = 2
+    end_of_line = lf
+    insert_final_newline = true
+    trim_trailing_whitespace = true
+
+    [*.md]
+    insert_final_newline = false
+    trim_trailing_whitespace = false
+  '';
+}
diff --git a/home/common/neovim.nix b/home/common/neovim.nix
index d3bd60a..c250f52 100644
--- a/home/common/neovim.nix
+++ b/home/common/neovim.nix
@@ -53,17 +53,10 @@ in
   ];
 
   home.packages = with pkgs; [
-    fzf
-    ripgrep
     nodejs-12_x
     # haskellPackages.ghcide
   ];
 
-  home.sessionVariables = {
-    EDITOR = "vim";
-    FZF_DEFAULT_COMMAND = "rg --files --hidden";
-  };
-
   programs.neovim = {
     enable = true;
     viAlias = true;
diff --git a/home/felschr-work.nix b/home/felschr-work.nix
index 7520cc4..62f8654 100644
--- a/home/felschr-work.nix
+++ b/home/felschr-work.nix
@@ -8,9 +8,7 @@ with pkgs;
     ./common/mimeapps.nix
     ./common/gtk.nix
     ./common/gnome.nix
-    ./common/neovim.nix
-    ./common/emacs.nix
-    ./common/vscode.nix
+    ./common/editors.nix
     ./common/keybase.nix
     ./common/signal.nix
     ./common/chromium.nix
diff --git a/home/felschr.nix b/home/felschr.nix
index e7503eb..8c50e91 100644
--- a/home/felschr.nix
+++ b/home/felschr.nix
@@ -7,9 +7,7 @@ with pkgs;
     ./common/mimeapps.nix
     ./common/gtk.nix
     ./common/gnome.nix
-    ./common/neovim.nix
-    ./common/emacs.nix
-    ./common/vscode.nix
+    ./common/editors.nix
     ./common/keybase.nix
     ./common/signal.nix
     ./common/chromium.nix