Page 1 of 3

[IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 12:49 am
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

Re: [IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 6:08 am
by Lunasole
Nice tool name ^^
Looks like might be useful, though I'm already using built-in IDE templates for lazying

Re: [IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 6:44 am
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 ?

Re: [IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 7:49 am
by chi
I updated the zip and added a little how-to... Just give it a try ^^

Re: [IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 10:59 am
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).

Re: [IDE Tool] LazyCoder

Posted: Tue Sep 12, 2017 7:32 pm
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 ;)

Re: [IDE Tool] LazyCoder

Posted: Wed Sep 13, 2017 1:18 am
by vwidmer
Anyway to run on linux?

Re: [IDE Tool] LazyCoder

Posted: Wed Sep 13, 2017 11:40 am
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 .... ;)

Re: [IDE Tool] LazyCoder

Posted: Wed Sep 13, 2017 4:40 pm
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?!

Re: [IDE Tool] LazyCoder

Posted: Wed Sep 13, 2017 5:59 pm
by Bisonte
chi wrote:@Bisonte: I assume it's working now for you with the latest version?!
Uh i forget.... yes, now it works ;)

Re: [IDE Tool] LazyCoder

Posted: Wed Sep 13, 2017 11:27 pm
by chi
Updated to v1.02

@Bisonte: happy to hear that :)

Re: [IDE Tool] LazyCoder

Posted: Sat Sep 16, 2017 2:23 am
by chi
Updated to v1.03

edit: fixed a bug, please redownload

Re: [IDE Tool] LazyCoder

Posted: Mon Sep 18, 2017 3:00 pm
by RSBasic
Nice Image

Re: [IDE Tool] LazyCoder

Posted: Sun Aug 22, 2021 6:10 pm
by chi
Updated to v1.04

Re: [IDE Tool] LazyCoder

Posted: Mon Aug 23, 2021 6:00 am
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.