]> gitweb.factorcode.org Git - factor.git/blob - libs/vim/vim.factor
ee65a0bee362502089b4306c2399640f31a13c20
[factor.git] / libs / vim / vim.factor
1 IN: vim
2 USING: definitions io kernel namespaces parser prettyprint
3 process sequences ;
4
5 SYMBOL: vim-path
6 SYMBOL: vim-detach
7
8 "vim" vim-path set-global
9
10 : vim-command ( file line -- string )
11     [ "\"" % vim-path get % "\" \"" % swap % "\" +" % # ] "" make ;
12
13 : vim-location ( file line -- )
14     vim-command
15     vim-detach get-global
16     [ run-detached ] [ run-process ] if ;
17
18 [ vim-location ] edit-hook set-global