Forum > Editor
Feature request/suggestion about file saving
Martin_fr:
--- Quote from: 440bx on May 10, 2025, 03:30:00 pm ---I've tried to configure it to work more like M.E but, it that doesn't go very far (to my great chagrin.)
--- End quote ---
If you feel like it, open a thread and describe the missing features... I am always interested in what other editors do different.
That said, I am not always able (e.g. time) or even willing (e.g. prioritize) to implement all the stuff (and I still have a list of items to be done).
Of course if it's obvious stuff, like
- speed: Well that's already known. (Not that SynEdit is that terrible slow, but certain parts are, and any part can always be improved)
- bugs...
- codetools (for the purpose of my interest not part of the editor, despite being needed, and despite no shortage of interesting ideas)
Some of my personal todo:
- Major and minor keyboard modes like Emacs.
- Control commands via "edit at bottom" (also like Emacs, but could be vi like too)
- Some yet to be determined much more flexible bookmark system.
- [EDIT/ADDED] configurable editor commands
e.g. cursor-left-next-____ => user can create any amount of such commands by selecting which "stoppoints" to stop at: word-start, word-end, at snake _ in word, after snake, before CamelCase, before symbol with/without lead space, after symbol, ...
But none of them is in the works, not now, likely not soon... :(
440bx:
--- Quote from: Martin_fr on May 10, 2025, 03:47:37 pm ---If you feel like it, open a thread and describe the missing features... I am always interested in what other editors do different.
--- End quote ---
I probably won't open a thread because what's missing feels like it's caused by a different editing philosophy instead of simply missing features.
One example that hopefully will make the statement above a bit clearer. In M.E, the user doesn't need to press keys to copy a block of text into a buffer. In M.E, you simply select text, usually using the arrow key(s), page-up, page-down, etc. Once the text is selected, it's ready to be manipulated. No need to copy it to a buffer.
A common editing task is to copy some text. In most editors, it goes 1. select the text, 2. copy the text into a buffer, 3. paste the text in the target spot. In M.E, it goes, 1. select the text, 2. copy the text in the target spot.
In that simple and common operation, no keystrokes were needed to copy the text into a buffer. The selected text is persistent and typing does not overwrite/replace the text (Lazarus can do that part too.)
As you are aware, telling Lazarus to make the text persistent changes some of its cursor movement behavior. That's already a deal breaker. The fact that text is selected shouldn't change anything at all as far as caret movement goes.
What makes M.E so good (and desirable to me) is that it takes _very few_ keystrokes to get the job done and, the reason for that is rooted, not so much in its feature set but, in an editing philosophy that cannot be fully duplicated in "normal editors".
Since you mentioned bookmarks and, the setting and recovery of bookmarks is more "feature" than philosophy. In Lazarus, it's not really straightforward to see which bookmarks have been set and which are still available (seems like the only way is by opening menus.) Contrast that with setting and recovery of bookmarks in M.E, please refer to the attachment. When setting a bookmark (ctrl-s), a little popup shows up showing me which bookmarks are already used and suggesting what the next bookmark should be. I can accept that or press a number and that's it (no need to press an ok button or return or anything else. When recovering a bookmark (ctrl-g) I get the little popup showing which bookmarks are set, therefore ready to be recovered by just pressing the number.
In the case of bookmarks, Lazarus' method is reasonably succinct (it doesn't take a bunch of keys to set/recover them) but, seeing which bookmarks are available is, as previously stated, not straightforward and that subtracts from the feature's usefulness. I really need to mention that the bookmark improvement you made recently (exact recovery of bookmark state), greatly enhanced the usefulness of bookmarks in Lazarus. Thank you for that. :)
There are dozens of small details like that, that in every day use, make a considerable difference.
One problem the Lazarus editor faces, which I doubt can be fully overcome is that, it shares key combinations with a whole lot of other functions. That removes those key combinations for the editor's use, that's a handicap and as I mentioned in another thread, I don't see a good solution for that. A partial solution would be to make key combinations context sensitive but, that may not be easy to do (depends on how things are already coded/implemented.)
Martin_fr:
--- Quote from: 440bx on May 10, 2025, 05:29:17 pm ---A common editing task is to copy some text. In most editors, it goes 1. select the text, 2. copy the text into a buffer, 3. paste the text in the target spot. In M.E, it goes, 1. select the text, 2. copy the text in the target spot.
--- End quote ---
Sounds like the old Turbo Pascal block.
Using a persistent block, and then
Ctrl K B set block begin
Ctrl K K set block end
and some other place Ctrl K C insert a copy of that block
--- Quote ---As you are aware, telling Lazarus to make the text persistent changes some of its cursor movement behavior. That's already a deal breaker. The fact that text is selected shouldn't change anything at all as far as caret movement goes.
--- End quote ---
Agreed to be a bug.
The behaviour come (probably) from changing the selection. And by accident applies to having a selection.
--- Quote --- In Lazarus, it's not really straightforward to see which bookmarks have been set and which are still available (seems like the only way is by opening menus.)
--- End quote ---
Yes, you can however use a key-combo to get this as popup menu. That allows you to look which are free.
--- Quote ---Contrast that with setting and recovery of bookmarks in M.E, please refer to the attachment. When setting a bookmark (ctrl-s), a little popup shows up showing me which bookmarks are already used and suggesting what the next bookmark should be. I can accept that or press a number and that's it (no need to press an ok button or return or anything else.
--- End quote ---
We have "Set a free bookmark". But it wont ask, it just does. You then see in the gutter which one it was.
This "Set a free bookmark" is also in the popupmenu that you can pop up via keycombo.
--- Quote ---In the case of bookmarks, Lazarus' method is reasonably succinct (it doesn't take a bunch of keys to set/recover them) but, seeing which bookmarks are available is, as previously stated, not straightforward and that subtracts from the feature's usefulness.
--- End quote ---
What is imho missing is a tool-window that stays open, and keeps the info visible.
There is a package "stacked bookmarks" or similar, but its a different concept.
--- Quote ---One problem the Lazarus editor faces, which I doubt can be fully overcome is that, it shares key combinations with a whole lot of other functions. That removes those key combinations for the editor's use, that's a handicap and as I mentioned in another thread, I don't see a good solution for that. A partial solution would be to make key combinations context sensitive but, that may not be easy to do (depends on how things are already coded/implemented.)
--- End quote ---
Some keycombos are context sensitive already.
Either
- Depend on which window is focused (but Anchordock sometimes breaks that)
- What the editor currently does (e.g. syncro edit)
Of course you got stuff that the OS does, like Alt-T opens the tools menu.... (not sure if the editor keymap would overrule that).
As for other stuff, like keys that control the debugger, well yes: currently that is: if you want to use them for debugging, then you can't have them for editing.
That would be the "major mode".
A major mode, is a separet keymap, that can either be toggled according to the "mode" of the IDE (modes would need to be defined).
Minor modes are also keymaps, that can be user toggled within each major mode.
I have to look at the emacs docs again (its long since I last used it) to remind myself of the exact distinction.
But the goal is, different keymaps for different tasks.
440bx:
Just for the record,
The little popups in the snapshot I posted don't stay open. The moment the bookmark is set or recovered they go away (as they should, otherwise they would obscure text which is undesirable.)
dsiders:
--- Quote from: 440bx on May 10, 2025, 05:29:17 pm ---Since you mentioned bookmarks and, the setting and recovery of bookmarks is more "feature" than philosophy. In Lazarus, it's not really straightforward to see which bookmarks have been set and which are still available (seems like the only way is by opening menus.) Contrast that with setting and recovery of bookmarks in M.E, please refer to the attachment. When setting a bookmark (ctrl-s), a little popup shows up showing me which bookmarks are already used and suggesting what the next bookmark should be. I can accept that or press a number and that's it (no need to press an ok button or return or anything else. When recovering a bookmark (ctrl-g) I get the little popup showing which bookmarks are set, therefore ready to be recovered by just pressing the number.
In the case of bookmarks, Lazarus' method is reasonably succinct (it doesn't take a bunch of keys to set/recover them) but, seeing which bookmarks are available is, as previously stated, not straightforward and that subtracts from the feature's usefulness. I really need to mention that the bookmark improvement you made recently (exact recovery of bookmark state), greatly enhanced the usefulness of bookmarks in Lazarus. Thank you for that. :)
--- End quote ---
Are you aware of Ctrl+Shift+B to set or toggle a bookmark and Ctrl+B to select an existing bookmark? I see no difference (other than button versus menu item layout) when compared to your images.
Navigation
[0] Message Index
[#] Next page
[*] Previous page