2006-08-03 02:45:30 -04:00
|
|
|
IN: vim
|
2006-08-18 13:45:46 -04:00
|
|
|
USING: definitions embedded io kernel parser prettyprint process
|
|
|
|
sequences ;
|
2006-08-03 02:45:30 -04:00
|
|
|
|
|
|
|
: file-modified stat fourth ;
|
|
|
|
|
|
|
|
: vim-line/file ( file line -- )
|
|
|
|
>r "vim " swap append r> unparse " +" swap append3 system drop ;
|
|
|
|
|
|
|
|
: vim ( spec -- )
|
|
|
|
#! Edit the file in vim. Rerun the file if the timestamp is changed.
|
|
|
|
dup where first2 >r ?resource-path [ file-modified ] keep r>
|
2006-08-03 16:24:53 -04:00
|
|
|
dupd vim-line/file file-modified = [ drop ] [ reload ] if ;
|
2006-08-03 02:45:30 -04:00
|
|
|
|
2006-08-24 23:19:22 -04:00
|
|
|
[ vim ] edit-hook set-global
|
|
|
|
|
2006-08-03 19:12:56 -04:00
|
|
|
: vim-syntax
|
|
|
|
#! Generate a new factor.vim file for syntax highlighting
|
|
|
|
"contrib/vim/factor.vim.fgen" "factor.vim" embedded-convert ;
|
|
|
|
|