Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IDE suggestions / editor questions
#1
Hey all! 

I use the IDE for realtime syntax checking, autoformatting, and to run my code, but I use Notepad++ to do the bulk of my editing, and then copy path/filename & open in the IDE to syntax check, autoformat & run. 

The main gripes I have about the IDE's editor are 
  1. The way the cursor's position gets lost when you scroll, making it hard to select text is the top reason. This to me is the #1 thing that makes it unusable for me for editing code. 
  2. Limited find/replace options - in Notepad++ you can search + replace carriage returns & other special chars using backslash as escape char, i.e., "\r\n".
  3. The archaic keyboard shortcuts - no option to use the more modern Windows standard shortcuts, e.g., CTRL+F for find & CTRL+H for search/replace. 

I can grunt & bear 2 & 3, but that first one is a deal breaker for me using the IDE for anything but the most basic edits. So fixing that (or adding an option to keep insertion point on scroll, to accomodate those who prefer the default behavior) would make a HUGE difference to me.

Okay, so having said that, as is, I use Notepad++ to edit my code, and then open it in QB64PE when I'm ready to run. In Notepad++, you right-click the file's tab and click Copy to Clipboard > Copy Full File Path. I know that like a minor annoyance, but when you have to do it again and again, it's like Chinese water torture. This could be fixed by adding an option to the IDE that if it detects changes to the current file outside the editor (by simply monitoring the modified timestamp) it prompts you with a yes/no popup "Changes have been detected to your file outside the editor, reload?", and if you click Yes it automatically reloads the latest version from disk, that would save a lot of accumulated time. 

Is there any chance of any of these changes being done? 

OR, is there a way to get Notepad++ or even VS.code, to do the full realtime syntax checking and autoformatting that the IDE does? I know you can set up VS.Code to have QB64PE run the code using some key combination (though not the handy-dandy F5!) but not the full realtime syntax checking & autoformatting or console output the IDE does so well.
Reply
#2
Right? scrolling just one bit puts your cursor all the way down, a better way would be for the cursor to move only when its outside the screen, so you don't end up writing outside it.
As for the "CTRL+F" to search, its already a thing, it just doesn't use a pop up, its the "FIND[ ]" section (at least in the latest version, not sure about the older ones)
Reply
#3
In Notepad++, I found you can record a macro for right-clicking the file's tab and clicking Copy to Clipboard > Copy Full File Path, then do Save Current Recorded Macro and call it something like CopyFullFilePathToClipboard and assign it a keyboard shortcut like CTRL+SHIFT+C. That helps. But having the IDE autocheck if the file changed outside the editor and auto-reload (or prompt yes/no) would save some steps.
Reply
#4
(04-29-2025, 07:19 PM)Bhsdfa Wrote: Right? scrolling just one bit puts your cursor all the way down,

I just want the option for the cursor / selection / editing to behave exactly like every other Windows/GUI text editor, from Notepad to Notepad++, MS Word & VS.code, especially: 
scrolling with Page Up / Page Down or the scroll bar should not move the insert point! Smile
Reply
#5
(04-29-2025, 07:00 PM)madscijr Wrote: The main gripes I have about the IDE's editor are 
  1. The way the cursor's position gets lost when you scroll, making it hard to select text is the top reason. This to me is the #1 thing that makes it unusable for me for editing code. 
  2. Limited find/replace options - in Notepad++ you can search + replace carriage returns & other special chars using backslash as escape char, i.e., "\r\n".
  3. The archaic keyboard shortcuts - no option to use the more modern Windows standard shortcuts, e.g., CTRL+F for find & CTRL+H for search/replace. 

I can grunt & bear 2 & 3, but that first one is a deal breaker for me using the IDE for anything but the most basic edits. So fixing that (or adding an option to keep insertion point on scroll, to accomodate those who prefer the default behavior) would make a HUGE difference to me.


you could just use qb64pe executable with -y option on a temporary copy of your source code.  then use notepad++ or vscodium or whatever else you want.  it could teach you to keep backups and versions of your code.  like git fame.

otherwise you are being a bit unappreciative.  try using the editor written by eoredson.  that also comes with "sick64."  it's quite good but might not be to your tastes neither.  also on linux, nano isn't going to grab the imagination.  much less vim.  the qb64pe editor is way better than those other ones.
Reply
#6
(04-29-2025, 07:00 PM)madscijr Wrote:
  1. The archaic keyboard shortcuts - no option to use the more modern Windows standard shortcuts, e.g., CTRL+F for find & CTRL+H for search/replace. 

Everyone knows that ctrl-h is backspace, and has been since the beginning of time.  The universe might implode if you change this.
Microsoft/Windows standards?  Isn't that an oxymoron?  Someone actually thinks Microsoft/Windows is well designed?


Big Grin

(just in case - all said in jest)
Reply
#7
Haha! CTRL+H opens Search/Replace in Notepad++, Word, and VS.code. 

Microsoft standards - well, yes! There was a time, back in the days when Caesar Bill was Emperor, that MS did have some maybe not perfect, but pretty ubiquitous, standards. 

TLDR: long rant about Microsoft standards and WIMP  Tongue
<rant>Certainly in the area of GUI application design, back when all things were WIMP and they enforced and encouraged things like all dropdown menus had to conform to the standard of having an equivalent keyboard shortcut (so you could navigate without a mouse, attempting to be backwards-compatible with the old pre-mouse DOS systems, and accommodate people who could touch type and were speed demons with the keyboard). This of course all started to go out the Window when the iPhone appeared and Microsoft started trying to compete with Apple with Metro and the flat design and the ribbon toolbar, and getting rid of the File menu, and hiding the toolbar by default (or altogether eliminating it) in apps. The barbarians had invaded and the empire was falling! 

I for one, appreciated the standard toolbar menus, and skeuomorphic buttons & controls - you pretty much automatically know where to find a given function in any application because they all used the same menus, and there was no guesswork in identifying form fields because they were obvious! Call me an old-timer but for me that beats the "creative" and "artful" approach of the post-iPhone world where a form field could be ANYTHING because the purpose of flat design is to make your app nice and purdy, so everything is seamlessly formatted. And so we had to get used tto clicking everywhere because something MIGHT be a form field, and we're completely reliant on the mouse because a function might not have a keyboard equivalent. 
</rant>

(04-30-2025, 01:19 AM)hsiangch_ong Wrote: you could just use qb64pe executable with -y option on a temporary copy of your source code.  then use notepad++ or vscodium or whatever else you want.  it could teach you to keep backups and versions of your code.  like git fame.
Thanks for the suggestions, I'm looking for ways to _simplify_ my use of QB64PE - I already use temporary copies and keep back ups and versions of my code. I save often, and increment the filename, e.g., MyProgram1.BAS, MyProgram2.BAS, etc., which works fine for backup AND versioning. That's why it's a pain to go between Notepad++ and the QB64PE window - the filename changes pretty much everytime I get to a point to increment the "version". I do NOT want to rely on git or some source control application, that stuff only complicates things for me. I find it much easier to just increment the filename{version#}.bas, and when enough accumulate, just move the old ones into an /archive/ folder & ZIP them up everynow & then (or delete if not needed).

(04-30-2025, 01:19 AM)hsiangch_ong Wrote: otherwise you are being a bit unappreciative.  try using the editor written by eoredson.  that also comes with "sick64."  it's quite good but might not be to your tastes neither.  also on linux, nano isn't going to grab the imagination.  much less vim.  the qb64pe editor is way better than those other ones.
Not unappreciative - honest! This is the first time in 5 years of using QB64/PE I've really spoken up about the annoyances of the editor. How can they, or anyone, improve their program / product / etc. if no one speaks up and voices their frustrations?

(I only named Nano as a vanilla example of a GUI text editor I had used, I am by no means a Linux user - part-time dabbler, at best.)

Those editors you mention might be good, but unless they can talk to QB64PE.EXE to seamlessly syntax check & format my code in realtime, they don't do anything that Notepad++ or vs.code can't already do. 

Thanks again guys!
Reply
#8
(04-30-2025, 04:06 PM)madscijr Wrote: Haha! CTRL+H opens Search/Replace in Notepad++, Word, and VS.code. 

And try CTRL-H in any browser you like.  Big Grin   
(Ctrl-H in a browser is the browser history.)

In Microsoft PowerPoint, in the Slide Show view, Ctrl+H hides the cursor or any activated tools, like the pen or highlighter.

When used in the Microsoft Windows calculator, pressing Ctrl+H displays the history of everything entered into the calculator.

It's hardly an universal hotkey, and it certainly wasn't one back in the days of QB45, which is where our IDE was based and built to mimic as closely as possible. Wink

We have a F3 shortcut, and a CTRL-F shortcut already for Find. Do we really need another one to do the same thing? (And yes, back in the olden days of QB45, CTRL-H *was* backspace, just as CTRL-M was enter, and CTRL-G was beep, and so on.)



That said, it shouldn't be hard for you to modify a copy of QB64 to accept those hotkeys yourself and then recompile the change into your personal version. It'd basically be in ide_methods.bas, I'd imagine, and would be all of one line which you'd have to alter to swap hotkeys. Just take a look for it yourself, and do a search for "Find" and you should see what needs tweaking to suit your personal needs.
Reply
#9
Here's what you'd want to tweak and change in the ide_methods.bas:

Code: (Select All)
        IF KCTRL AND KB = _KEY_F3 THEN
            IF IdeSystem = 3 THEN IdeSystem = 1
            GOTO idefindjmp
        END IF

        IF KALT AND KB = _KEY_F3 THEN
            IF IdeSystem = 3 THEN IdeSystem = 1
            GOTO idefindchangejmp
        END IF
Reply
#10
(04-30-2025, 05:20 PM)SMcNeill Wrote:
(04-30-2025, 04:06 PM)madscijr Wrote: Haha! CTRL+H opens Search/Replace in Notepad++, Word, and VS.code. 
It's hardly an universal hotkey, and it certainly wasn't one back in the days of QB45, which is where our IDE was based and built to mimic as closely as possible.  Wink
We have a F3 shortcut, and a CTRL-F shortcut already for Find.  Do we really need another one to do the same thing?  (And yes, back in the olden days of QB45, CTRL-H *was* backspace, just as CTRL-M was enter, and CTRL-G was beep, and so on.)

Well, we're talking about editors not web browsers, and Notepad, Word, Notepad++ and vs.code use CTRL+H for search/replace. 
That means CTRL+H for search/replace is in the muscle memory of anyone who uses those, and they are all very popular programs.

Keep in mind that I was asking for an option in the preferences to use the alternate keyboard shortcuts that those other programs use, I wasn't suggesting that the current existing keyboard shortcuts be replaced.

Anyway, to make this more useful for everyone, perhaps just add an options screen to set your own hotkeys for different functions. That way it's configurable for whoever wants to use a different shortcut. That's just what I would prefer, I don't expect anyone to agree!

(04-30-2025, 05:20 PM)SMcNeill Wrote: That said, it shouldn't be hard for you to modify a copy of QB64 to accept those hotkeys yourself and then recompile the change into your personal version.  It'd basically be in ide_methods.bas, I'd imagine, and would be all of one line which you'd have to alter to swap hotkeys.  Just take a look for it yourself, and do a search for "Find" and you should see what needs tweaking to suit your personal needs.

Thanks for the info - although I played with gwmini to compile a C program a couple yrs ago, I don't know if I'd even know how to do a build of QB64PE.

^^^
UPDATE: oh wow, I didn't realize the IDE was itself made in QB64PE, that changes things a little  Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Half baked pipe dream questions - hardware and os Parkland 9 1,303 05-23-2025, 03:00 PM
Last Post: madscijr
  _IIF limits two questions doppler 18 2,983 05-14-2025, 04:33 PM
Last Post: madscijr
  Questions about INSTR Circlotron 7 1,019 04-27-2025, 03:12 PM
Last Post: mdijkens
  animated GIF creator / editor ? madscijr 1 579 09-23-2024, 05:23 PM
Last Post: TerryRitchie
  IDE almost flatlines 4 of 4 cpus - linux - any cure? desA 5 1,042 07-28-2024, 02:49 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: 2 Guest(s)