Page 1 of 1

Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 2:18 pm
by Keya
I dont want to go about requesting shorter aliases for every function - I can deal with MessageRequester, but I feel this one really would be a good efficiency boost for all PB developers, and hopefully take Fred only a minute to implement:
- having native support for something like "Proc/EndProc" instead of "Procedure/EndProcedure"

It might even sound like a petty request, maybe it is - it's only a few keystrokes afterall... but the amount of times we have to type them, it really adds up, and so does the frustration of having to type what are essentially useless keystrokes

Thankyou for considering my 1st-world request :)

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 2:54 pm
by TI-994A
Keya wrote:...requesting shorter aliases for every function... like "Proc/EndProc" instead of "Procedure/EndProcedure"
You could simply implement macros for that. Just six lines, and your wish come true. :wink:

Code: Select all

Macro Proc
  Procedure
EndMacro

Macro EndProc
  EndProcedure
EndMacro

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 3:03 pm
by Keya
yes of course, but as that's not native support you still have to type or include them every time

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 3:34 pm
by IdeasVacuum
I run a one-click macro in UltraEdit which inserts Procedure-EndProcedure, including an underline. That can also be done for functions such as message requester where you simply "fill-in the blanks".

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 4:16 pm
by Marc56us
I type only pro followed by [Tab][Tab]
IDE reply: Procedure EndProcedure


Faster: With some other macro external tool, I have done some macro like

Code: Select all

pep=Procedure{return}EndProcedure{up}{space}
msb=MessageRequester("", ""){left}{left}{left}{left}{left}{left}
sgt=SetGadgetText(){left}
sgs=SetGadgetState(){left}
Etc.

{left/right/up/return} = cursor commands: set where I need to put next text

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 4:27 pm
by Fred
We won't implement such change in PB because it will be messy to have 2 ways to do the same thing. Using autocomplete is useful to save some typing:

https://youtu.be/Zf6a2KPHI_U

You can use tab/tab after typing 'proc' and it will autocomplete the keyword and add the endkeyword (works for any keywords which got an endkeyword)

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 5:23 pm
by Mistrel
Autocomplete is the solution for this. :|

You can do this in your own custom environment already with macros:

Code: Select all

Macro Proc
Procedure
EndMacro

Macro EndProc
EndProcedure
EndMacro

Proc a()
  Debug "Hello!"
EndProc

a()
The IDE supports adding custom keywords so that they will highlight as the proper color.

Re: Procedure/EndProcedure -> Proc/EndProc

Posted: Tue Jan 03, 2017 9:39 pm
by Tenaja
When I first started with PB, I would have been a HUGE +1 for this. I even implemented my own macros. Unfortunately, macros killed code samples unless you also include those, so I set up the autocomplete and after a week or so haven't looked back.