From 32146c645d057631db5664580dffbbb7cf843cfe Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 20 Sep 2009 23:10:54 -0500 Subject: [PATCH 1/2] add some keyboard shortcuts to vim plugin --- misc/vim/plugin/factor.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/vim/plugin/factor.vim b/misc/vim/plugin/factor.vim index aedae9770f..ad6f92f3c0 100644 --- a/misc/vim/plugin/factor.vim +++ b/misc/vim/plugin/factor.vim @@ -1,6 +1,8 @@ nmap fi :FactorVocabImpl nmap fd :FactorVocabDocs nmap ft :FactorVocabTests +nmap fv :FactorVocab +nmap fn :NewFactorVocab if !exists("g:FactorRoot") let g:FactorRoot = "~/factor" From 08d9d0ad28992c36e0a6af4ab816a30ac945f539 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 20 Sep 2009 23:12:31 -0500 Subject: [PATCH 2/2] fix synopsis for C-TYPE:, TYPEDEF:, and FUNCTION: so they properly show IN: clause --- basis/alien/prettyprint/prettyprint.factor | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/basis/alien/prettyprint/prettyprint.factor b/basis/alien/prettyprint/prettyprint.factor index 4586c08542..e17d4c0533 100644 --- a/basis/alien/prettyprint/prettyprint.factor +++ b/basis/alien/prettyprint/prettyprint.factor @@ -17,7 +17,7 @@ M: dll pprint* dll-path dup "DLL\" " "\"" pprint-string ; M: c-type-word definer drop \ C-TYPE: f ; M: c-type-word definition drop f ; -M: typedef-word declarations. drop ; +M: c-type-word declarations. drop ; GENERIC: pprint-c-type ( c-type -- ) M: word pprint-c-type pprint-word ; @@ -28,9 +28,12 @@ M: array pprint-c-type pprint* ; M: typedef-word definer drop \ TYPEDEF: f ; M: typedef-word synopsis* - \ TYPEDEF: pprint-word - dup "c-type" word-prop pprint-c-type - pprint-word ; + { + [ seeing-word ] + [ definer. ] + [ "c-type" word-prop pprint-c-type ] + [ pprint-word ] + } cleave ; : pprint-function-arg ( type name -- ) [ pprint-c-type ] [ text ] bi* ; @@ -46,7 +49,10 @@ M: alien-function-word definer drop \ FUNCTION: \ ; ; M: alien-function-word definition drop f ; M: alien-function-word synopsis* - \ FUNCTION: pprint-word - [ def>> first pprint-c-type ] - [ pprint-word ] - [ ] tri ; + { + [ seeing-word ] + [ definer. ] + [ def>> first pprint-c-type ] + [ pprint-word ] + [ ] + } cleave ;