2006-08-03 02:45:30 -04:00
|
|
|
IN: vim
|
2006-10-21 01:54:24 -04:00
|
|
|
USING: definitions io kernel namespaces parser prettyprint
|
|
|
|
process sequences ;
|
2006-08-03 02:45:30 -04:00
|
|
|
|
2006-10-20 17:55:52 -04:00
|
|
|
SYMBOL: vim-path
|
2006-10-21 01:54:24 -04:00
|
|
|
SYMBOL: vim-detach
|
2006-10-20 17:55:52 -04:00
|
|
|
|
|
|
|
"vim" vim-path set-global
|
|
|
|
|
|
|
|
: vim-command ( file line -- string )
|
|
|
|
[ "\"" % vim-path get % "\" \"" % swap % "\" +" % # ] "" make ;
|
|
|
|
|
2006-08-25 00:02:30 -04:00
|
|
|
: vim-location ( file line -- )
|
2006-10-21 01:54:24 -04:00
|
|
|
vim-command
|
|
|
|
vim-detach get-global
|
|
|
|
[ run-detached ] [ run-process ] if ;
|
2006-08-03 02:45:30 -04:00
|
|
|
|
|
|
|
: vim ( spec -- )
|
2006-10-20 17:55:52 -04:00
|
|
|
where first2 vim-location ;
|
2006-08-03 02:45:30 -04:00
|
|
|
|
2006-08-25 00:02:30 -04:00
|
|
|
[ vim-location ] edit-hook set-global
|