-USING: kernel math math.parser namespaces editors.vim ;
+USING: io.backend io.files kernel math math.parser
+namespaces editors.vim sequences system windows.shell32 ;
IN: editors.gvim
TUPLE: gvim ;
+HOOK: gvim-path io-backend ( -- path )
+
+
M: gvim vim-command ( file line -- string )
- [ "\"" % vim-path get % "\" \"" % swap % "\" +" % # ] "" make ;
+ [ "\"" % gvim-path % "\" \"" % swap % "\" +" % # ] "" make ;
+
+t vim-detach set-global ! don't block the ui
T{ gvim } vim-editor set-global
-"gvim" vim-path set-global
+
+USE-IF: unix? editors.gvim.unix
+USE-IF: windows? editors.gvim.windows
--- /dev/null
+USING: editors.gvim io.files io.windows kernel namespaces
+sequences windows.shell32 ;
+IN: editors.gvim.windows
+
+M: windows-io gvim-path
+ \ gvim-path get-global [
+ program-files walk-dir [ "gvim.exe" tail? ] find nip
+ ] unless* ;