Re: [dev] [sandy] Undo, redo and repeat

2014-07-15 Thread Rafa Garcia Gallego
On Tue, Jul 15, 2014 at 6:10 PM, Markus Teich wrote: >> i never got the "." command to do much other than repeat the latest insert or >> delete...(probably me). > I find it quite handy as an easy way of interactive search and replace. > Instead > of „:%s/bla/blub/gc“ I can just „*“ on the word, „

[dev] [sandy] Undo, redo and repeat

2014-07-15 Thread Rafa Garcia Gallego
Hi, With Dimitris' recent vi(m) bindings came a bug. BUG: operations added via multiplication appear as a set of unchained single Undo(s). They should be chained so they are undone / redone together. Which made me realize: TODO: need to extend the repeat framework (i.e. the '.' command) to sto

Re: [dev] [sandy] Implement copy/paste/replace?

2014-07-15 Thread Rafa Garcia Gallego
On Mon, Jul 14, 2014 at 6:50 PM, Charlie Kester wrote: >> I just wanted your opinion in implementing a feature inside the code >> or calling it via sh. Let's try to keep as many possible text operations "scripted out" as possible. Right now this holds true for: - Buffer C&P (xsel | tee) - Autoin

Re: [dev] [patch] sandy

2014-07-13 Thread Rafa Garcia Gallego
On Mon, Jun 30, 2014 at 6:42 AM, wrote: > Subject: [PATCH 1/5] call endwin on suspend > Subject: [PATCH 2/5] better regcomp failure messages > Subject: [PATCH 3/5] simplify c file regex > Subject: [PATCH 4/5] optionalize to use term status feature > Subject: [PATCH 5/5] possibilize title bar at b

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-13 Thread Rafa Garcia Gallego
On Sun, Jul 13, 2014 at 2:40 PM, Dimitris Zervas wrote: >>Great work! I found a couple of bugs, but they should be easy to fix. > Add a comment to be able to track them 'm', 'n' and 'N' were not working in command mode (the Arg was 0 so it was starting a sequence). I fixed it by creating a stub m

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-13 Thread Rafa Garcia Gallego
On Sun, Jul 13, 2014 at 2:29 AM, Dimitris Zervas wrote: > I think that the patch is ready. > It has some little bugs and some beautiful vim keys were not implemented > (such as r), but I'll work on them... > I'm not into creating a dozen more functions, so it will take me some time to > think a

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-11 Thread Rafa Garcia Gallego
On Fri, Jul 11, 2014 at 12:32 AM, Dimitris Papastamos wrote: > There are many ways to do this, I'd go for the simplest approach in terms of > code > readability and stop worrying about performance. That. The reason sandy uses a double-linked list of lines is obviously not performance, but code s

Re: [dev] [sandy] [PATCH] VIM key bindings.

2014-07-09 Thread Rafa Garcia Gallego
Hi Dimitris, Thanks for working on sandy! I'm skimming over the changes and they look promising. When you are done polishing, they would fit nicely upstream. In fact... does anyone use the default / non-modal sandy bindings on a daily basis? I find they work nicely for simple edits or when typing

Re: [dev] [sandy] Undo & redo man page entries

2014-05-03 Thread Rafa Garcia Gallego
On Sat, May 3, 2014 at 6:55 AM, Wolfgang Corcoran-Mathe wrote: > The man page mentions sandy's undo feature, but does not the appropriate > keybinding. No mention is made of the redo/repeat feature. Good catch. Applied.

Re: [dev][sandy][patch] minor typo correction

2014-04-24 Thread Rafa Garcia Gallego
> On Thu, 24 Apr 2014 06:33:00 +0200 Rafa Garcia Gallego > wrote: >> ... However, I cant seem to push to git.suckless.org: Fixed. Kudos to Christoph for making it happen. Cheers, Rafa

Re: [dev][sandy][patch] minor typo correction

2014-04-23 Thread Rafa Garcia Gallego
On Wed, Apr 23, 2014 at 7:26 AM, wrote: > Minor typo correction. > diff --git a/TODO b/TODO > index 6e01237..535a8e4 100644 > --- a/TODO > +++ b/TODO > @@ -13,7 +13,7 @@ In no particular order, at sandy.c: > At config.def.h: > - Bindings! > - Use local/system script path and all > -- Choose co

[dev] [st][patch] Fix segfault when pressing PrintScr without a selection

2014-03-26 Thread Rafa Garcia Gallego
Hi, Attached is a silly patch to prevent a segmentation fault in st when you accidentally press PrintScr with no text selected. BTW does anybody use this with a plumber? Care to explain the details? BR, Rafa diff --git a/st.c b/st.c index 69b2491..97abcbb 100644 --- a/st.c +++ b/st.c @@ -2315,9

[dev] [st] Tip adds non-existing trailing whitespace upon mouse selection + fix

2012-10-09 Thread Rafa Garcia Gallego
Hi, Upon selecting text with the mouse, st tip fills the selection straight from its term matrix and replaces unset glyphs with a whitespace. This results in some really annoying trailing whitespace at the end of each line when you paste/pipe the selection. Is there any reason for this? The attac

Re: [dev] Missing hg repo after move?

2011-09-30 Thread Rafa Garcia Gallego
> Should I do the "hg --config > format.dotencode=0" trick that the hg docs suggest and push it? It > seems fair since other repos don't seem to need dotencode. I did that for now, so the sandy repo is back online. It's not like we were going to have files starting with "._" or " " anyways Apolog

Re: [dev] Missing hg repo after move?

2011-09-29 Thread Rafa Garcia Gallego
Hi, On Thu, Sep 29, 2011 at 9:28 PM, Rob wrote: > On 29 September 2011 20:08, Jeremy Jackins wrote: >>    hg clone http://hg.suckless.org/sandy >> gives >>    abort: HTTP Error 500: Internal Server Error Also, if I do: $ hg -v pull running ssh r...@suckless.org "hg -R /repos/sandy serve --stdi

Re: [dev] Commit messages

2011-09-18 Thread Rafa Garcia Gallego
On Sun, Sep 18, 2011 at 12:04 PM, Connor Lane Smith wrote: > It looks like sandy's hgrc wasn't set up properly. I checked the other > repos and sandy was the only "full project" missing this mercurial > hook. I've fixed it, and future commits should be mailed to > hack...@suckless.org as expected.

[dev] [st] Scroll selection patch

2011-09-14 Thread Rafa Garcia Gallego
Hi, One thing from st that bugs me a little: whenever I select some text with the mouse it remains marked even if I type in the same line and change its content. The same happens if I keep typing and the window scrolls, since the selection box does not scroll along with it. In either case, a new p

Re: [dev] slmenu - dmenu spinoff for the console

2011-09-01 Thread Rafa Garcia Gallego
On Thu, Sep 1, 2011 at 7:46 PM, Bjartur Thorlacius wrote: > Şann miğ 31.ágú 2011 12:09, skrifaği Rafa Garcia Gallego: >> I sometimes use sandy in a SSH session, so I wrote some code around >> dmenu to have it work in the console. The resulting program takes >> input from s

[dev] slmenu - dmenu spinoff for the console

2011-08-31 Thread Rafa Garcia Gallego
Hi, I sometimes use sandy in a SSH session, so I wrote some code around dmenu to have it work in the console. The resulting program takes input from stdin, reopens the tty, prints the UI to stderr, gets your input (again from stdin) and prints the result to stdout, so it mostly works as a drop-in

[dev] [st] Fix terminfo op for light backgrounds

2011-08-12 Thread Rafa Garcia Gallego
Hi, Attached is a tiny change to st's terminfo entry to set 'op' (original pair) to \E[39;49m. This is akin to what urxvt and xterm do, and fixes some issues in certain curses apps (e.g. top) if your terminal had a color scheme other than white on black. Cheers, Rafa. st-terminfo_op.patch Descr

Re: [dev] How to monitor battery status

2011-06-20 Thread Rafa Garcia Gallego
A while back I put together a crappy C monitor, which I still use to the day. Find the .c attached, compile with -lX11 as normal, peruse at will. Cheers, Rafa. #include #include #include #include #include #include #include #include #include #include #define BATTERY "BAT1" #define BATT_

Re: [dev] Experimental editor

2011-06-10 Thread Rafa Garcia Gallego
Hi On Fri, Jun 10, 2011 at 12:05 AM, Connor Lane Smith wrote: > > Hey all, > > I'd like to include those of you who aren't in IRC in the discussion > we're having wrt writing a new text editor. We do already have Sandy > of course, and I think Rafa is doing a great job, but there are a > couple o

Re: [dev] Sandy editor

2011-06-04 Thread Rafa Garcia Gallego
Hi, On Sat, Jun 4, 2011 at 9:48 PM, Connor Lane Smith wrote: > Some things I've noticed: >  1. Vertical movement doesn't take tabs into account for horizontal offset. Yeah, that's the first item in my TODO list, yet I keep postponing it even though it seems simple enogh. It also includes moving

Re: [dev] Sandy editor

2011-06-02 Thread Rafa Garcia Gallego
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 ('/'

[dev] [st] Statusline terminfo entries patch

2011-06-01 Thread Rafa Garcia Gallego
Hi, Attached is a patch to add terminfo entries asserting st has indeed an statusline (i.e. you can change the window title) and how to write to it. The code to do so is already there, but it has not been properly specified in the terminfo file. Some software (e.g. sandy O:-)) uses those entries t

Re: [dev] Sandy editor

2011-05-31 Thread Rafa Garcia Gallego
Yeah. Ncurses is really the lesser evil. Thanks for your support! > On 31 May 2011 17:51, Rafa Garcia Gallego > wrote: >> - ^U works as it should. >> - ^C kills the next word (former META-D). Sorry, I seem to use this one a >> lot. >> - ^K, ^W, ^H and ^D complete your

Re: [dev] Sandy editor

2011-05-31 Thread Rafa Garcia Gallego
Hi, Thanks for your input. On Tue, May 31, 2011 at 8:07 PM, Bjartur Thorlacius wrote: > On 5/31/11, Rafa Garcia Gallego wrote: >> A tad unrelated, but not really... I was quite sure about using >> keyboard positioned bindings before (be them hjkl, ijkl, the wordstar >> t

Re: [dev] Sandy editor

2011-05-31 Thread Rafa Garcia Gallego
Hi, On Tue, May 31, 2011 at 4:40 PM, pancake wrote: > After reading the libregex9 code (1200LOC, and probably the best regexp > library out there) > (because openbsd regex is about 3KLOC and musl 5KLOC and have some > documented bugs, > gnu one is about 35.000LOC... > > the thing is that \b is th

Re: [dev] Sandy editor

2011-05-29 Thread Rafa Garcia Gallego
Thinking about a couple of issues now: 1.- The regexes used for syntax highlight relied on a GNU extension (\< \> to mark word boundaries). We changed those to \b, which is the POSIX equivalent, but some testing has determied this does not work in some systems (MacOS as far as we know). We looked

Re: [dev] Sandy editor

2011-05-27 Thread Rafa Garcia Gallego
I asked around, found about a couple of very keybind maps using only Control: http://www.wordstar.org/wordstar/history/wmvswscmds.htm Then again they do not implement the unix standard ^U ^W ^H, which sucks a bit. Also, WordMaster may be unfeasible straight up as the Return key generates ^J and a

Re: [dev] Sandy editor

2011-05-26 Thread Rafa Garcia Gallego
On Thu, May 26, 2011 at 9:53 PM, Rafa Garcia Gallego wrote: > I'll take a quick look at the quote regexes now, but since I don't > really know which are working where :S I hope nothing bad comes out of > this. That was really dumb. I defined the regexes to match for a quoted

Re: [dev] Sandy editor

2011-05-26 Thread Rafa Garcia Gallego
Hey, On Thu, May 26, 2011 at 10:41 AM, Hiltjo Posthuma wrote: > I agree with pancake. I also noticed the selection of text using the > mouse is very laggy / slow (using xterm). Anyway I'll keep an eye on > this project since it seems promising to me. That might be the screen updating every time

Re: [dev] Sandy editor

2011-05-26 Thread Rafa Garcia Gallego
Hi, On Thu, May 26, 2011 at 3:14 PM, pancake wrote: > i have noticed that the sucky terminal cannot handle shift+control, so my > bindings for > ^[hjkl] ^[HJKL] does not work... So i'll think in other keybindings for it.. Yeah. If I recall, the old sandy prototype (ugly gtk+) used Control+Shift

Re: [dev] Sandy editor

2011-05-25 Thread Rafa Garcia Gallego
Hi, Thanks a lot for your detailed mail. On Thu, May 26, 2011 at 12:33 AM, pancake wrote: > About moving sandy to hg.suckless.orgshould be discussed with Anselm. We can > setup a cron sync to clone your repo.. But it would be better to have it > there. I'm fine with moving the main repo to suck

Re: [dev] Re: sbase

2011-05-25 Thread Rafa Garcia Gallego
On Wed, May 25, 2011 at 10:54 AM, pancake wrote: > On 05/24/11 19:12, Rafa Garcia Gallego wrote: >> >> On Tue, May 24, 2011 at 6:16 PM, Christian Neukirchen >>  wrote: >>> >>> Remotely reminds me of http://code.google.com/p/aoeui/ which also is >>&

Re: [dev] Re: sbase

2011-05-24 Thread Rafa Garcia Gallego
On Tue, May 24, 2011 at 6:16 PM, Christian Neukirchen wrote: > Remotely reminds me of http://code.google.com/p/aoeui/ which also is > pretty lightweight, has UTF8, is binary-safe, and has infinite > undo. ~7KLOC, no curses dependency. This reminds me of my very own sandy[1]. Sorry for the blatant

[dev] Re: [surf] Usual loop for non-reachable URI

2010-06-22 Thread Rafa Garcia Gallego
On Tue, Jun 22, 2010 at 1:53 PM, Rafa Garcia Gallego wrote: > When loading a non-reachable URI, surf tries to load it a good number > of times before giving up. I doubt this is intended and it gets really > annoying as you have to browse back several times to reach the > previous pag

[dev] [surf] Usual loop for non-reachable URI

2010-06-22 Thread Rafa Garcia Gallego
Hi, When loading a non-reachable URI, surf tries to load it a good number of times before giving up. I doubt this is intended and it gets really annoying as you have to browse back several times to reach the previous page. This tiny patch solves this and removes two (legacy?) unused pointers from