It is currently Fri Nov 24, 2017 3:43 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 12:49 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
Little tool to insert code snippets from custom text shortcuts... for a faster coding experience ;)

LazyCoder.zip (Windows)
Quote:
Updates:

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)

Quote:
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 Sat Sep 16, 2017 2:43 am, edited 15 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 6:08 am 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 887
Location: Ukraine
Nice tool name ^^
Looks like might be useful, though I'm already using built-in IDE templates for lazying

_________________
Time beyond time

Like a copyleft notify: all the source code created by me and posted on Purebasic official forums is free to use and modification in all possible (and several impossible) ways for anyone, without asking my permission


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 6:44 am 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 871
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 5.45 LTS / 5.61 (Windows x86/x64) | Windows10 Pro x64 | Z87-PLUS | i7 4770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language...


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 7:49 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
I updated the zip and added a little how-to... Just give it a try ^^


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 10:59 am 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 871
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 5.45 LTS / 5.61 (Windows x86/x64) | Windows10 Pro x64 | Z87-PLUS | i7 4770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language...


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Tue Sep 12, 2017 7:32 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
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 ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Wed Sep 13, 2017 1:18 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 141
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


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Wed Sep 13, 2017 11:40 am 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 871
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 5.45 LTS / 5.61 (Windows x86/x64) | Windows10 Pro x64 | Z87-PLUS | i7 4770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language...


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Wed Sep 13, 2017 4:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
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?!


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Wed Sep 13, 2017 5:59 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Oct 09, 2007 2:15 am
Posts: 871
chi wrote:
@Bisonte: I assume it's working now for you with the latest version?!


Uh i forget.... yes, now it works ;)

_________________
PureBasic 5.45 LTS / 5.61 (Windows x86/x64) | Windows10 Pro x64 | Z87-PLUS | i7 4770k | 32GB RAM | iChill GeForce GTX 980 X4 Ultra | HAF XF Evo​​
English is not my native language...


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Wed Sep 13, 2017 11:27 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
Updated to v1.02

@Bisonte: happy to hear that :)


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Sat Sep 16, 2017 2:23 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 367
Location: Linz, Austria
Updated to v1.03

edit: fixed a bug, please redownload


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] LazyCoder
PostPosted: Mon Sep 18, 2017 3:00 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 377
Location: Berlin and Ibiza
Nice Image

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye