Permalink
Browse files

Added a findMethods functionality

  • Loading branch information...
1 parent 0590f0e commit a70ee095cd0fe6e418a9ddadc42f10b67b5fa6b5 @sbl sbl committed Apr 4, 2011
Showing with 8 additions and 2 deletions.
  1. +1 −1 README.md
  2. +4 −0 ftplugin/supercollider.vim
  3. +1 −0 plugin/supercollider.vim
  4. +2 −1 sc/SCVim.sc
View
@@ -59,7 +59,7 @@ in normal mode:
* `<leader>sj` on a word opens the class file
* `<leader>si` on a word opens the implementations of ...
* `<leader>sr` on a word opens the references to ...
-
+* `<leader>sm` on a global or environment variable lists the known methods
Global variables:
-----------------
@@ -252,6 +252,10 @@ function SCimplementation(subject)
call SendToSCSilent('SCVim.methodTemplates("' . a:subject . '");')
endfun
+function SCfindMethods(subject)
+ call SendToSCSilent('SCVim.displayMethods("' . a:subject . '");')
+endfun
+
"custom commands (SChelp,SCdef,SClangfree)
com -nargs=1 SClangfree call SClang_free("<args>")
com -nargs=0 SClangStart call SClangStart()
View
@@ -35,3 +35,4 @@ au Filetype supercollider,supercollider_help nmap <leader>sd yiw :call SChelp("
au Filetype supercollider,supercollider_help nmap <leader>sj yiw :call SCdef(""")<CR>
au Filetype supercollider,supercollider_help nmap <leader>si yiw :call SCimplementation(""")<CR>
au Filetype supercollider,supercollider_help nmap <leader>sr yiw :call SCreference(""")<CR>
+au Filetype supercollider,supercollider_help nmap <leader>sm yiw :call SCfindMethods(""")<CR>
View
@@ -193,6 +193,7 @@ SCVim {
}
*displayMethods { |variable|
- variable.class.methods.collect(_.name).do(_.postln);
+ variable.class.methods.collect(_.name).sort.do(_.postln);
+ ^'';
}
} // end class

0 comments on commit a70ee09

Please sign in to comment.