Repository: raphamorim/rio (language: rust)

Issue:
Windows default editor shouldn't be "vi"
"vi" isn't installed by default on windows.

```toml
# Editor
#
# Default editor is "vi".
#
# Whenever the key binding `OpenConfigEditor` is triggered it will
# use the value of the editor along with the rio configuration path.
# [editor]
# program = "vi"
# args = []
```

This should probably be `notepad` as a default on Windows.


Discussion / hints:
Thank you for the issue @milnak ! I agree, is this something you would like to contribute?
I tried changing this to notepad on windows, and it appears that rio is still looking all over my path for vi?

```text
C:\Users\jeffm\scoop\apps\rio\current\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\scoop\apps\rio\0.1.15\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\WINDOWS\SYSTEM32\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\WINDOWS\system\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\WINDOWS\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Windows\system32\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Windows\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Windows\System32\Wbem\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Windows\System32\WindowsPowerShell\v1.0\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Windows\System32\OpenSSH\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\dotnet\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files (x86)\Common Files\Propellerhead Software\ReWire\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\Common Files\Propellerhead Software\ReWire\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\Meld\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\PowerShell\7\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\.pyenv\pyenv-win\bin\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\.pyenv\pyenv-win\shims\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\scoop\apps\openjdk\current\bin\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\scoop\apps\anaconda3\current\App\Scripts\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\Meld\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\scoop\apps\gsudo\current\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\scoop\shims\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
E:\bin\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\AppData\Local\Microsoft\WindowsApps\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Program Files\7-Zip\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\AppData\Local\Microsoft\WindowsApps\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\AppData\Local\Programs\Microsoft VS Code\bin\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
C:\Users\jeffm\.dotnet\tools\vi C:\Users\jeffm\AppData\Local\rio\config.toml	NAME INVALID
```


Fix patch:
diff --git a/rio-backend/src/config/defaults.rs b/rio-backend/src/config/defaults.rs
index c2f3ea03d8..db1541113d 100644
--- a/rio-backend/src/config/defaults.rs
+++ b/rio-backend/src/config/defaults.rs
@@ -84,9 +84,20 @@ pub fn default_theme() -> String {
 
 #[inline]
 pub fn default_editor() -> Shell {
-    Shell {
-        program: String::from("vi"),
-        args: vec![],
+    #[cfg(not(target_os = "windows"))]
+    {
+        Shell {
+            program: String::from("vi"),
+            args: vec![],
+        }
+    }
+
+    #[cfg(target_os = "windows")]
+    {
+        Shell {
+            program: String::from("notepad"),
+            args: vec![],
+        }
     }
 }
 
@@ -213,7 +224,8 @@ pub fn default_config_file_content() -> String {
 
 # Editor
 #
-# Default editor is "vi".
+# Default editor on Linux and MacOS is "vi",
+# on Windows it is "notepad".
 #
 # Whenever the key binding `OpenConfigEditor` is triggered it will
 # use the value of the editor along with the rio configuration path.


Test patch: