Re: [dev] Sandy editor
Hi, I've pushed a couple of changes: the control-only keymap is now the default (the former one is there as config.old.h, but should be removed soon unless someone reports using and preferring it), Ctrl-Q warns before quitting, Ctrl-t copies and the prompt commands are a bit more vi-like now ('/' and '?' search, '|' pipes, 'w' saves) for convenience and speed since some actions as changing syntax or saving with a different filename, etc., did not find their own keybinding. Please test and comment. Back to the modal/non-modal conundrum: - Most normal editors *do* have a slight modality (e.g. replace instead of insert, etc). Sandy does have a different behavior when selecting text vs. when moving, but it is bearable and IMHO it does no lead to confussion. Some questions: do we want to avoid modes as much as possible? even if that means losing some power-user functionality? - Vi OTOH *does* have keybinding chains / compound commands (try typing a simple text in English, then do d2Fe in command mode and think what went on there), though I think we can all agree their damage is lesser than in emacs. Some more questions: do we want to avoid prefixes and modifiers as much as possible? even if this means having to repeat a keybinding a couple of times? If the answer to all these questions is 'yes', then we will probably end up with a quite simple, suckless editor. As long as it lets me select text using a regex and then filter the selection trough an arbitrary command, it ought to be enough for me. At least in theory. Answering direct questions: accepting a number modifier to commands seems cool and simple enough and I do use it a lot in vim. I was trying to avoid it for simplicity's sake, but if you lot feel it is necessary, then we can go ahead and add it. Let me know what you think. BR, Rafa.
Re: [dev] [st] revised mouse handling/reporting
I wonder if those patches are going to be commited.. I find them right. But it's about the third patch in a week without any reply.. /me pings Aurélien? On 06/02/11 12:51, Bert Münnich wrote: Hi, the attached patch resolves some minor issues of mouse handling and changes some of its behaviours: * Fixed: double-clicking on first word of a line does not select it * Text is only selected with Button1; pasting when Button2 is released (maybe in the future: Button3 to expand the current selection like in xterm/rxvt-unicode) * Support for (xterm-specific) '\E[1002' button-event-tracking: report mouse motion events while some button is pressed (only if pointer is moved to another character; used in e.g. `vim -c set mouse=a ttymouse=xterm2'; the old '\E[1000' is kept working) * When MODE_MOUSE is set: only report mouse events but do not handle them inside st, selecting text in vim was kind of awkward, because it was selected inside and outside of vim and caused double (i.e. no) highlighting of the selected text * Listen for MotionNotify events only when at least one button is down (PointerMotionMask - ButtonMotionMask) Regards, Bert
Re: [dev] Sandy editor
On 6/2/11, Rafa Garcia Gallego rafael.garcia.gall...@gmail.com wrote: - Most normal editors *do* have a slight modality (e.g. replace instead of insert, etc). Sandy does have a different behavior when selecting text vs. when moving, but it is bearable and IMHO it does no lead to confussion. Some questions: do we want to avoid modes as much as possible? even if that means losing some power-user functionality? I suppose the answers to those questions depend on what the goal of this project is. If the goal truly is a simple editor, then -- according to my definition of simple, anyways -- it ought to be modeless. And if that means sacrificing some power-user functionality then that's fine. It can't necessarily do _everything_. And if it does, then.. it would probably end up being just another bad clone of vi or Emacs. - Vi OTOH *does* have keybinding chains / compound commands (try typing a simple text in English, then do d2Fe in command mode and think what went on there), though I think we can all agree their damage is lesser than in emacs. Some more questions: do we want to avoid prefixes and modifiers as much as possible? even if this means having to repeat a keybinding a couple of times? If the answer to all these questions is 'yes', then we will probably end up with a quite simple, suckless editor. As long as it lets me select text using a regex and then filter the selection trough an arbitrary command, it ought to be enough for me. At least in theory. I'm all for simple. John
Re: [dev] Sandy editor
On Thu, Jun 2, 2011 at 6:49 AM, Rafa Garcia Gallego rafael.garcia.gall...@gmail.com wrote: Answering direct questions: accepting a number modifier to commands seems cool and simple enough and I do use it a lot in vim. I was trying to avoid it for simplicity's sake, but if you lot feel it is necessary, then we can go ahead and add it. Let me know what you think. How would you add a number modifier in the Ctrl-only bind system? Chain it with Ctrl (Ctrl-1 Ctrl-2 to mean 12), or a new bind (also a chain) for selecting numbers (Ctrl-X 12 to mean 12)? I think regex-selection should be good enough to replace this feature. --Andrew Hills