diff --git a/app/src/lib/editors/linux.ts b/app/src/lib/editors/linux.ts index 83e41dc3b8f..30c3c1e6290 100644 --- a/app/src/lib/editors/linux.ts +++ b/app/src/lib/editors/linux.ts @@ -18,23 +18,39 @@ interface ILinuxExternalEditor { const editors: ILinuxExternalEditor[] = [ { name: 'Atom', - paths: ['/snap/bin/atom', '/usr/bin/atom'], + paths: [ + '/snap/bin/atom', + '/usr/bin/atom', + '/usr/bin/env atom' + ], }, { name: 'Neovim', - paths: ['/usr/bin/nvim'], + paths: [ + '/usr/bin/nvim', + '/usr/bin/env nvim' + ], }, { name: 'Neovim-Qt', - paths: ['/usr/bin/nvim-qt'], + paths: [ + '/usr/bin/nvim-qt', + '/usr/bin/env nvim-qt' + ], }, { name: 'Neovide', - paths: ['/usr/bin/neovide'], + paths: [ + '/usr/bin/neovide', + '/usr/bin/env neovide' + ], }, { name: 'gVim', - paths: ['/usr/bin/gvim'], + paths: [ + '/usr/bin/gvim', + '/usr/bin/env gvim' + ], }, { name: 'Visual Studio Code', @@ -45,6 +61,7 @@ const editors: ILinuxExternalEditor[] = [ '/mnt/c/Program Files/Microsoft VS Code/bin/code', '/var/lib/flatpak/app/com.visualstudio.code/current/active/export/bin/com.visualstudio.code', '.local/share/flatpak/app/com.visualstudio.code/current/active/export/bin/com.visualstudio.code', + '/usr/bin/env code' ], }, { @@ -54,6 +71,7 @@ const editors: ILinuxExternalEditor[] = [ '/usr/bin/code-insiders', '/var/lib/flatpak/app/com.visualstudio.code.insiders/current/active/export/bin/com.visualstudio.code.insiders', '.local/share/flatpak/app/com.visualstudio.code.insiders/current/active/export/bin/com.visualstudio.code.insiders', + '/usr/bin/env code-insiders' ], }, { @@ -64,19 +82,29 @@ const editors: ILinuxExternalEditor[] = [ '/usr/share/vscodium-bin/bin/codium', '.local/share/flatpak/app/com.vscodium.codium/current/active/export/bin/com.vscodium.codium', '/snap/bin/codium', + '/usr/bin/env codium' ], }, { name: 'VSCodium (Insiders)', - paths: ['/usr/bin/codium-insiders'], + paths: [ + '/usr/bin/codium-insiders', + '/usr/bin/env codium-insiders' + ], }, { name: 'Sublime Text', - paths: ['/usr/bin/subl'], + paths: [ + '/usr/bin/subl', + '/usr/bin/env subl' + ], }, { name: 'Typora', - paths: ['/usr/bin/typora'], + paths: [ + '/usr/bin/typora', + '/usr/bin/env typora' + ], }, { name: 'SlickEdit', @@ -85,23 +113,31 @@ const editors: ILinuxExternalEditor[] = [ '/opt/slickedit-pro2017/bin/vs', '/opt/slickedit-pro2016/bin/vs', '/opt/slickedit-pro2015/bin/vs', + // maybe? '/usr/bin/env vs' // ], }, { // Code editor for elementary OS // https://github.com/elementary/code name: 'Code', - paths: ['/usr/bin/io.elementary.code'], + paths: [ + '/usr/bin/io.elementary.code', + '/usr/bin/env io.elementary.code' + ], }, { name: 'Lite XL', - paths: ['/usr/bin/lite-xl'], + paths: [ + '/usr/bin/lite-xl', + '/usr/bin/env lite-xl' + ], }, { name: 'JetBrains PhpStorm', paths: [ '/snap/bin/phpstorm', '.local/share/JetBrains/Toolbox/scripts/PhpStorm', + '/usr/bin/env phpstorm' ], }, { @@ -109,17 +145,23 @@ const editors: ILinuxExternalEditor[] = [ paths: [ '/snap/bin/webstorm', '.local/share/JetBrains/Toolbox/scripts/webstorm', + '/usr/bin/env webstorm' ], }, { name: 'IntelliJ IDEA', - paths: ['/snap/bin/idea', '.local/share/JetBrains/Toolbox/scripts/idea'], + paths: [ + '/snap/bin/idea', + '.local/share/JetBrains/Toolbox/scripts/idea', + '/usr/bin/env idea' + ], }, { name: 'IntelliJ IDEA Ultimate Edition', paths: [ '/snap/bin/intellij-idea-ultimate', '.local/share/JetBrains/Toolbox/scripts/intellij-idea-ultimate', + '/usr/bin/env intelliji-idea-ultimate' ], }, { @@ -127,21 +169,31 @@ const editors: ILinuxExternalEditor[] = [ paths: [ '/snap/bin/goland', '.local/share/JetBrains/Toolbox/scripts/goland', + '/usr/bin/env goland' ], }, { name: 'JetBrains CLion', - paths: ['/snap/bin/clion', '.local/share/JetBrains/Toolbox/scripts/clion1'], + paths: [ + '/snap/bin/clion', + '.local/share/JetBrains/Toolbox/scripts/clion1', + '/usr/bin/env clion' + ], }, { name: 'JetBrains Rider', - paths: ['/snap/bin/rider', '.local/share/JetBrains/Toolbox/scripts/rider'], + paths: [ + '/snap/bin/rider', + '.local/share/JetBrains/Toolbox/scripts/rider', + '/usr/bin/env rider' + ], }, { name: 'JetBrains RubyMine', paths: [ '/snap/bin/rubymine', '.local/share/JetBrains/Toolbox/scripts/rubymine', + '/usr/bin/env rubymine' ], }, { @@ -150,6 +202,7 @@ const editors: ILinuxExternalEditor[] = [ '/snap/bin/pycharm', '/snap/bin/pycharm-professional', '.local/share/JetBrains/Toolbox/scripts/pycharm', + '/usr/bin/env pycharm' ], }, { @@ -157,6 +210,7 @@ const editors: ILinuxExternalEditor[] = [ paths: [ '/snap/bin/rustrover', '.local/share/JetBrains/Toolbox/scripts/rustrover', + '/usr/bin/env rustrover' ], }, { @@ -164,43 +218,73 @@ const editors: ILinuxExternalEditor[] = [ paths: [ '/snap/bin/studio', '.local/share/JetBrains/Toolbox/scripts/studio', + '/usr/bin/env studio' ], }, { name: 'Emacs', - paths: ['/snap/bin/emacs', '/usr/local/bin/emacs', '/usr/bin/emacs'], + paths: [ + '/snap/bin/emacs', + '/usr/local/bin/emacs', + '/usr/bin/emacs', + '/usr/bin/env emacs' + ], }, { name: 'Kate', - paths: ['/usr/bin/kate'], + paths: [ + '/usr/bin/kate', + '/usr/bin/env kate' + ], }, { name: 'GEdit', - paths: ['/usr/bin/gedit'], + paths: [ + '/usr/bin/gedit', + '/usr/bin/env gedit' + ], }, { name: 'GNOME Text Editor', - paths: ['/usr/bin/gnome-text-editor'], + paths: [ + '/usr/bin/gnome-text-editor', + '/usr/bin/env gnome-text-editor' + ], }, { name: 'GNOME Builder', - paths: ['/usr/bin/gnome-builder'], + paths: [ + '/usr/bin/gnome-builder', + '/usr/bin/env gnome-builder' + ], }, { name: 'Notepadqq', - paths: ['/usr/bin/notepadqq'], + paths: [ + '/usr/bin/notepadqq', + '/usr/bin/env notepadqq' + ], }, { name: 'Mousepad', - paths: ['/usr/bin/mousepad'], + paths: [ + '/usr/bin/mousepad', + '/usr/bin/env mousepad' + ], }, { name: 'Pulsar', - paths: ['/usr/bin/pulsar'], + paths: [ + '/usr/bin/pulsar', + '/usr/bin/env pulsar' + ], }, { name: 'Pluma', - paths: ['/usr/bin/pluma'], + paths: [ + '/usr/bin/pluma', + '/usr/bin/env pluma' + ], }, { name: 'Zed', @@ -210,6 +294,7 @@ const editors: ILinuxExternalEditor[] = [ '/usr/bin/zed-editor', '~/.local/bin/zed', '/usr/bin/zed', + '/usr/bin/env zed' ], }, ]