View Single Post
Old 09-20-2014, 10:34 AM   #15
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

ReaSyntax does not have autocomplete, so I started creating my own. But Does Sublimetext NOT have the ability to give you a list of possible inputs for function parameters? Here's my file so far,

PHP Code:
{
    
"scope""source.EEL"
    
"completions"
    [
        {
"trigger""ApplyNudge""contents""ApplyNudge(${0:ReaProjectproject}${1:int nudgeflag}${2:int nudgewhat}${3:int nudgeunits}${4:double value}${5:bool reverse}${6:int copies})"},
        
        {
"trigger""CountSelectedMediaItems""contents""CountSelectedMediaItems(${1:ReaProjectproj})"},
        {
"trigger""GetMediaItem""contents""GetMediaItem(${1:ReaProjectproj}${2:int itemidx})"},
        {
"trigger""GetSelectedMediaItem""contents""GetSelectedMediaItem(${1:ReaProjectproj}${2:int selitem})"},
        {
"trigger""GetMediaItemInfo_Value""contents""GetMediaItemInfo_Value(${1:MediaItemitem}, \"${2:parname}\")"},
        
"I_GROUPID",
        
"B_MUTE",
        
"B_LOOPSRC",
        
"B_ALLTAKESPLAY",
        
"B_UISEL",
        
"C_BEATATTACHMODE",
        
"C_LOCK",
        
"D_VOL",
        
"D_POSITION",
        
"D_LENGTH",
        
"D_SNAPOFFSET",
        
"D_FADEINLEN",
        
"D_FADEOUTLEN",
        
"D_FADEINLEN_AUTO",
        
"D_FADEOUTLEN_AUTO",
        
"C_FADEINSHAPE",
        
"C_FADEOUTSHAPE",
        
"I_GROUPID",
        
"I_LASTY",
        
"I_LASTH",
        
"I_CUSTOMCOLOR",
        
"I_CURTAKE",
        
"IP_ITEMNUMBER",
        
"F_FREEMODE_Y",
        
"F_FREEMODE_H",

        {
"trigger""Main_OnCommand""contents""Main_OnCommand(${1:int command}${2:int flag})"},
        {
"trigger""Main_OnCommandEx""contents""Main_OnCommandEx(${1:int command}${2:int flag}${3:ReaProjectproj})"},

        {
"trigger""Undo_BeginBlock""contents""Undo_BeginBlock()"},
        {
"trigger""Undo_EndBlock""contents""Undo_EndBlock(\"${1:descchange}\", ${2:int extraflags})"},
    ]

extract to: Sublime Text\Data\Packages\User
save as: ANYTHING.sublime-completions

The goal of Sublime Text, I think, is to not have to look at the html API guide every time you want to write a line of code. This gets me a lot closer to that goal, but definitely not all the way, possibly due to Sublime Text lacking in "code helper" features. For example, the "Nudge" function is still difficult to use because you have to look up what numbers do what. Also, for stuff like "I_GROUPID", "B_MUTE", "B_LOOPSRC", they only belong in the "parname" of GetMediaItemInfo_Value, but I don't think there's a way to tell Sublime Text.

I am very new to this and there may be Sublime Text features that I'm not making use of.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 09-20-2014 at 10:47 AM.
Argitoth is offline   Reply With Quote