[IDE Tool] LazyCoder

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

[IDE Tool] LazyCoder

Post by chi »

Little tool to insert code snippets from custom text shortcuts... for a faster coding experience ;)

LazyCoder_104.zip (Windows)
Updates:

2021.08.22, v1.04
· Tabs (Ascii 9) in the IDE are now treated like spaces (Ascii 32)
· Show all shortcuts (+ or * and Shift+Enter)
· Parameter underlining
· Minor UI and bug fixes

2017.09.16, v1.03
· Logic for evaluating the search word has been improved. Now it's also possible to trigger functions e.g.'OpenWindow('
· Added popup window style: Opacity, Shadow, SlideIn, FadeOut (LazyCoder.pref)
· Formatting of the popup window has been improved
· Added new formatting syntax to the editor
· Added/Changed default shortcuts (delete LazyCoder.pref manually)
· Allow only one instance of each window
· Made the editor window resizeable

2017.09.13, v1.02
· Added a button to rename shortcuts
· Shortcuts are now saved lowercase only. Finding words regardless of the case (works better with PB's autocomplete)
· Added keyboard shortcut Shift+Return to close the editor and the popup window. For a quick peek or if accidentally opened
· Added default shortcuts (delete LazyCoder.pref manually)
· Removed tabstops from text-only controls (popup window)
· Minor bug fixes

2017.09.12, v1.01
· Optimized keyword search. Can handle code with more than 10k lines now
· Fixed shortcuts not getting triggered in front of '(' and '|'
· Added default shortcuts (delete LazyCoder.pref manually)
Usage:

· Edit Mode: Hit Shift + Return (or the shortcut you chose for the tool) on an empty line (or without having a word selected) to open the editor.

· Action mode: Write 'proc' or 'for' (see editor) and hit Shift + Return while touching the last letter with the caret. Enter name + args and hit Return.
Image

Image

Have fun, chi
Last edited by chi on Mon Aug 23, 2021 5:01 pm, edited 18 times in total.
Et cetera is my worst enemy
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: [IDE Tool] LazyCoder

Post by Lunasole »

Nice tool name ^^
Looks like might be useful, though I'm already using built-in IDE templates for lazying
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: [IDE Tool] LazyCoder

Post by Bisonte »

chi wrote:Little tool to insert code snippets from custom text shortcuts... for a faster coding experience ;)
How this works ?
What must be done to ... whatever this tool does ?
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

I updated the zip and added a little how-to... Just give it a try ^^
Et cetera is my worst enemy
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: [IDE Tool] LazyCoder

Post by Bisonte »

I always get a requester : Could'nt open the file. After that, the main window of your program appears

What file ? I tried it with a saved source and a new sourcetab (unsaved).
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

Bisonte wrote:I always get a requester : Could'nt open the file. After that, the main window of your program appears

What file ? I tried it with a saved source and a new sourcetab (unsaved).
Please download the file again... You are using an older version (still using ReadFile instead of SCI_GETCURLINE).
I also updated the first post with an animated gif. Hope that helps ;)
Et cetera is my worst enemy
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: [IDE Tool] LazyCoder

Post by vwidmer »

Anyway to run on linux?
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: [IDE Tool] LazyCoder

Post by Bisonte »

I think it could be crossplatform. With the "Reload source after tool quit" and set the new cursor position....
But only chi know. if it using WinAPI commands or not.
But in big sources it could be a mess, to reload the source at every time you use this .... ;)
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

vwidmer wrote:Anyway to run on linux?
I'm sorry, Windows only...
Bisonte wrote:I think it could be crossplatform. With the "Reload source after tool quit" and set the new cursor position....
But only chi know. if it using WinAPI commands or not.
But in big sources it could be a mess, to reload the source at every time you use this .... ;)
The source code is about 99% cross-platform compatible, only using some WinAPI commands for the UI. Nothing important. The big problem is, how to retrieve the custom %WORD. You see, Purebasic's native solution (using %WORD in Tool-'Arguments') doesn't recognize the word, if the caret only touches the word on the right side. It has to be 'inside' the word (only Fred can fix that ;)). The next solution was to use ReadFile with %TEMPFILE, but as you stated, it's sluggish with big source files. So now I'm using VirtualAllocEx_(...) with SendMessage_(Scintilla, #SCI_GETCURLINE, cBuf, *pBuf) and I don't have a clue on how to translate that to Linux or Mac...

@Bisonte: I assume it's working now for you with the latest version?!
Et cetera is my worst enemy
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: [IDE Tool] LazyCoder

Post by Bisonte »

chi wrote:@Bisonte: I assume it's working now for you with the latest version?!
Uh i forget.... yes, now it works ;)
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

Updated to v1.02

@Bisonte: happy to hear that :)
Et cetera is my worst enemy
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

Updated to v1.03

edit: fixed a bug, please redownload
Et cetera is my worst enemy
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: [IDE Tool] LazyCoder

Post by RSBasic »

Nice Image
Image
Image
User avatar
chi
Addict
Addict
Posts: 1028
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] LazyCoder

Post by chi »

Updated to v1.04
Et cetera is my worst enemy
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: [IDE Tool] LazyCoder

Post by Cyllceaux »

ok... it does not work for me atm, because I use TAB and not SPACE as indentation.

But for new projects, this is really nice.
Post Reply