]> gitweb.factorcode.org Git - factor.git/blob - extra/editors/vim/vim.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / editors / vim / vim.factor
1 USING: definitions io io.launcher kernel math math.parser
2 namespaces parser prettyprint sequences editors accessors ;
3 IN: editors.vim
4
5 SYMBOL: vim-path
6
7 SYMBOL: vim-editor
8 HOOK: vim-command vim-editor ( file line -- array )
9
10 SINGLETON: vim
11
12 M: vim vim-command
13     [
14         vim-path get , swap , "+" swap number>string append ,
15     ] { } make ;
16
17 : vim-location ( file line -- )
18     vim-command try-process ;
19
20 "vim" vim-path set-global
21 [ vim-location ] edit-hook set-global
22 vim vim-editor set-global