factor/contrib/vim/vim.factor

20 lines
577 B
Factor
Raw Normal View History

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
2006-08-25 00:02:30 -04:00
sequences namespaces ;
2006-08-03 02:45:30 -04:00
2006-08-25 00:02:30 -04:00
: vim-location ( file line -- )
>r [ file-modified ] keep r>
[ "vim \"" % over % "\" +" % # ] "" make system drop
file-modified = [ drop ] [ run-file ] if ;
2006-08-03 02:45:30 -04:00
: vim ( spec -- )
#! Edit the file in vim. Rerun the file if the timestamp is changed.
2006-08-25 00:02:30 -04:00
dup 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
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 ;