From: Ces V. <ces...@gm...> - 2020-08-14 21:33:52
|
On Fri, Aug 14, 2020 at 8:12 PM Bernard Desgraupes <bde...@or...> wrote: > > Hi César, > > thank you for your message. Thanks a lot for your prompt reply, Bernard!! > [...] > This is not supported at the moment but should be easy to implement. I’ll try to assemble something and will post the code. > If I understand correctly, when you press the right arrow for instance and there are four spaces, you want the cursor to immediately jump four positions to the right. Actually, I'm not sure how other editors do it, because I have always used true tabs in my code. I want to change to spaces now, given how strong the general advice is about this. I know that some editors have a key combination (such as Ctrl, Opt, or other) which when combined with the cursor keys, jump to the next non-whitespace character in the line. However, I feel that's not natural. I mean, this should work without any key combination, because every coder uses tabs (the only difference is that you emulate tabs with spaces, but in your mind you are using tabs, so the natural behaviour should be exactly the same as if they were true tabs). However, I don't know how other editors do this. It would be interesting to take a look at vim, emacs, or other editors out there for seeing how they do that. > [...] > For instance if you want to bind function::next to Opt-Ctrl-N and function::prev to Opt-Ctrl-P, put the following instructions in your file CPrefs.tcl (select Alpha ↣ C Mode Setup ↣ Edit Prefs File to open it) > binding create -tag C {oz 'N'} function::next > binding create -tag C {oz 'P'} function::prev > > Then after relaunching Alpha, the key combos will work as expected when you are in C mode. Hmm... it seems function::next and function::prev have a weird behaviour in C mode: If I have a /* */ comment made of several lines, the function::next and prev jump to such comment lines in addition to function definitions... it's definitely something unexpected going on there... > [...] > Usually in Alpha, this kind of thing is achieved by Shift-Command-Double-Click but I think this is not implemented in the C modes. I’ll see if it is feasible. Ok, keep me informed. Anyway, the usefulness of such a feature is most of the time across-files (I mean, you are working in a C file where a function is called, but however the function is defined in another C file in your Fileset... I don't know if Alpha supports looking for marks from another file because I just started using it today and I'm a novice). However, sometimes you are working in a large C file (imagine the Nuklear UI source, for example), and in that scenario finding a mark in the same file would be very useful too. > [...] > If you Option-Click in the toolbar or titlebar of a document window, you’ll see a popover with the list of all the sibling files. Double-click in the popover on the file you want to edit. This only lists the siblings, but, however, I'm getting used to the Windows menu, from where you can also switch windows reasonably quickly. Anyway, I believe that a Fileset combo (having all the files in the Fileset) would be very convenient, especially considering that there's a lot of empty space in the windows toolbar. Thanks a lot for all your comments, Bernard! Kind regards, César |