[OT] Which IDE / Editor do you use?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Sep 16 10:03:24 PDT 2013


On Mon, Sep 16, 2013 at 10:24:18AM -0400, Adam D. Ruppe wrote:
> On Sun, Sep 15, 2013 at 08:47:32PM -0700, H. S. Teoh wrote:
> > - Its default escape sequence is extremely annoying (ctrl-A clashes
> >   with bash's go-to-beginning-of-line, which I use literally *all*
> >   the time).  Switching it to something like ctrl-U makes it more
> >   tolerable.
> 
> I never really got into using C-a for start of line. I just use
> the home key. (I prefer the arrows to hjkl too!)

I used to prefer those too. But I eventually found that it slows me down
because I have to constantly move my right hand over to the keypad and
back. With C-a and C-e for home/end, I never have to lift my hands off
the keyboard. It's a miniscule time savings, but it does add up when
you're editing a complex command-line pipeline.


> > - It doesn't seem to pick up terminal settings correctly sometimes.
> >   Which results in needing to set $TERM manually, or type
> >   `TERM=rxvt-unicode program args`, instead of just `program args`.
> >   Quite annoying.
> 
> Yeah, I've had trouble with this too and got around it by messing
> with .rc files. My .vimrc
> 
> 
> if $TERM=='screen'
>   set ttymouse=xterm
> endif
> 
> for example. (There's more $TERM hacks in there too.)
> 
> I also changed the escape when puttying in to C-s. The main reason is
> the laptop's keyboard is laid out differently, so the same finger
> position for C-a on the desktop hits s on the laptop.

Eek. I use C-s frequently for throttling program output; it would suck
to have to escape it! But yeah, the fact that it's configurable is
pretty nice. I have my remote screen keyed to C-u, and local screen
left as C-a (though ostensibly I should change that since it clashes
with C-a as home), and it's nice to be able to suspend exactly the right
screen when they are nested inside each other.

On that note, some pretty strange things can happen when you're inside
nested screens on the same host, and you try to screen -D between them.
:-P


> But a second nice benefit is I can nest screens: use the C-s to switch
> top level ones and then screen -d -r my project screens, and C-a them.
> Pretty boss.

Yep.


> My putty shortcut on the laptop also runs screen -S -something laptop,
> thus creating a screen if needed and reattaching if it is already
> present.

Hmm, maybe I should start doing that. It would greatly lessen the
annoyance of working remotely from a flaky wifi connection that
disconnects every 5 mins for no good reason. Screen is one of those
things that make ssh sessions even usable on such connections, since
otherwise the constant disconnection makes it pretty much unusable.


> So whenever I open that putty window, it goes right back to where I
> was... and of course, screen -r laptop works on the desktop too if I
> forget to handle something.
> 
> Really convenient, and works across network disconnects. I love it.

Yeah, it makes it actually possible to get things done over those flaky
wifi connections in hole-in-a-hole cafés. Otherwise you're spending 90%
of the time reconnecting and getting back to where you were, instead of
actually getting stuff done.


> > Whoa, that's a lot. I usually have only 3-4 things open at a time,
> 
> The thing with me is I kinda hate closing things. If I leave it open,
> then when I finally get around to looking at it again, I can kinda
> pick up where I left off.
> 
> Otherwise, I'll forget it even exists!

True dat. I really need to get cracking on writing my D replacement for
ratpoison... ratpoison is nice and everything but it does have annoying
limitations and bugs. One of the most annoying things about it is its
inability to handle UTF-8 (in this day and age! seriously!). The other
is the inability to handle raw keysyms (see below).


[...]
> > Heh. I used to have *three* X servers running, keyed to vt7, vt8,
> > vt9, for 3 simultaneous login sessions, multiplexed by xdm. I still
> > use xdm
> 
> oh man i haven't used xdm for a while. I used to have a cool diskless
> terminal setup in my house. Old pentium 1 computers whose hard drives
> died repurposed into netbooting from my linux box.

Nice! Hmm maybe I should start doing that.

My last hardware upgrade was done a bit too hastily... and I ended up
with an unsupported 3D integrated card on the mobo that doesn't work
with the Linux ATI drivers (well, it works, but no 3D accel, which
sucks). Worse yet, my previous mobo had a *supported* ATI card, but it
was AGP and the new mobo is PCIe (a little detail I overlooked while
researching the parts to upgrade). So maybe I can reconnect the
monitor/keyboard to the old mobo and have it serve as an X terminal, and
have the new mobo serving as a headless compute server, then I can have
the best of both worlds!


> (BTW there was a place where getting xorg.conf right was a pain! Not
> to mention other nfs and kernel stuff. I saw more kernel panics while
> setting that up than I saw blue screens of death in the time I used
> windows 95.)

Really? I never had a kernel panic from misconfigured X11. But the X
server itself *did* crash in horrible ways... in the old days before
KVM, it would segfault and drop me back in the Linux console, but with
the graphics card stuck in graphics mode and no way of switching it back
('cos the kernel didn't know how to do the mode switch). Pretty
annoying, since the kernel (and every else) actually still works, and I
can ssh into it, etc., but it's unusable from the desk and requires a
hard reboot to fix.


> But then I could just hit the button in the other rooms and get a nice
> X login screen presented, and my same blackbox based desktop a few
> seconds later. I liked it.

Nice! Makes me wanna collect used PCs from various people to reservice
as X terminals. That would be really nice.


> But with my last desktop hardware failure - a bad power supply killed
> the motherboard - I decided to finally dive into a 64 bit kernel and
> with that came updated distro that killed the whole diskless setup.
> 
> Maybe some day I'll redo it, but I don't really remember how it worked
> and don't want to spend days figuring it out again. I'll just stick to
> my Windows laptop :<

Well, nowadays X.org is pretty good about autodetecting most settings,
so you rarely need a config file anymore. Dunno about diskless X11,
though, that might be a bit trickier.


> > (Why multiple sessions, you ask? 'cos at one point I was
> > experimenting with different WM setups to see which one(s) I like
> > better, but I still wanted to continue working on whatever it is I
> > was working on without interruption, so having multiple copies of X
> > running allowed me to keep
> 
> xnest is pretty cool too for playing with window managers.
> 
> > getting interrupted and dropping back to the Linux consoles.)
> 
> Linux consoles rock so much btw. I really enjoy the time I spend on
> them - when the above mentioned motherboard died, I went back to my
> old computer for a while and since I was accustomed to Linux by that
> point, I passed on the Win98.

I *would* just use the Linux console -- it's lightweight, stable, and
pretty efficient unlike X11, but it doesn't support unicode fonts.
That's a showstopper for me.


> But, that computer was too slow to run the bloated X11. So I just used
> linux consoles. And it was *awesome*.
> 
> 1) I had most the same programs I use all the time anyway, but now
> they were prettier! I really like the way vga text mode looks. 80x25
> is a bit small, but it is workable and really beautiful.

Heh.  My current rxvt is configured with very large fonts in full-screen
so that the resolution is 105*42. If I could, I'd make that 80*whatever.
I'm pretty comfortable working with 80 columns, though 25 lines *is*
rather cramped once you start using split panes in vim.


> 2) I used some text mode replacements for other graphics programs,
> like naim instead of gaim. Worked pretty well, though I didn't stick
> to it once I fixed my newer computer.  (Did however write my own p2p
> messenger that was beautiful and didn't have AOLs servers to depend
> on. Sadly, I lost it though, the people I chatted with refused to use
> it :( Now one of them wants to get on custom stuff again, thanks NSA,
> but I can't find that code. Meh, eventually I'll just rewrite it in D
> anyway. (The original was written in C.))

Hooray for rewriting old lost projects in D. :) You'd probably get it
back up and running faster anyway, thanks to D's awesome features.


> 3) Less idiocy with incompatible terminals. TERM=linux believe it or
> not, just works, everywhere I tried it.

Really? It never used to work when I was logging remotely from Solaris.
But nowadays, I don't know if anyone even uses Solaris anymore, so I
guess it's moot. TERM=xterm tends to work a lot better, actually (even
in rxvt, which is AFAICT a backwards-compatible extension of xterm).


> I'm tempted to go back to that for a while, but I probably can't avoid
> needing to open something in gimp or firefox for a couple weeks
> straight anymore.

What I'd *really* like, is to extend the Linux console to handle inline
graphics (rounded to the next largest multiple of the character tile
size). Well, it sorta already supports that (e.g., bootup logo), but it
just needs support in the shell and ELinks. Then I'd dump X11 altogether
and just use the console. :) It would save so much memory for other
stuff, esp. at my old work PC which is starting to show signs of being
unable to keep up with the latest bloat everybody and his neighbour's
dog is adding to the browser.


> > TBH, I'm still not quite happy with the choice of escape sequence.
> > If I had my way, I'd rather have <windowsKey> <F1..F12> instead.
> > Maybe one of these days I'll write a D replacement for ratpoison
> > that does just that.
> 
> Probably not too hard to just hack the source.

Yeah, but it's written in (rather ugly) C, and has other design
limitations as well. If I were to do anything about it, I'd rather just
rewrite it in D.


> > (Ratpoison does let you configure the escape key, but it doesn't
> > work with <windowsKey> for some stupid reason).
> 
> xev tells me the Windows key's keysyms are
> 
>  keycode 133 (keysym 0xffeb, Super_L)
>  keycode 134 (keysym 0xffec, Super_R)
> 
> 
> The bbkeys program I uses calls it Mod4 in its config file.
> 
> Maybe one of those names will help?

No, it's a fundamental design flaw in ratpoison that it can only use
non-modifier keys for the escape key (why such a lame choice, is beyond
my ability to fathom). I'd probably end up rewriting a lot of code just
to make it work. Which, if I'm going to do it at all, I rather rewrite
in D instead.


> > Yeah, people can rant and rave about how Linux sux and what-not, but
> > the fact of the matter is, I could run 3 copies of X11, each with 15
> > windows open on a Pentium with 128MB RAM, and be fully functional,
> > whereas it takes every last drop of juice the system's got just for
> > Windows'98 to
> 
> It's not even the memory that is good for me: it is the more efficient
> layouts.  The Windows taskbar gets unusable with more than about 10
> windows (especially on XP+, where it hides entries or combines them.
> Ugh, the point of the taskbar is that everything is visible at once!)

I never liked the taskbar. I think it's a wrong design choice. Ratpoison
had it right -- C-w and it shows a popup at the top right corner of the
screen containing a *vertical* list of windows with full names.  Trying
to cram everything into a *horizontal* bar just doesn't scale beyond 10
items or so. At least a vertical list, given a small enough font, can
support at least 25 items, probably more like 40, before a scrollbar is
even needed.


> > lets you use a minimal WM should you choose to, rather than in
> > Windows where you *have* to use whatever MS has decided everyone
> > must use, and
> 
> you can do that in Windows too, actually, though of course it is rare
> to see in practice.

OK, I learned something new today. :) Haven't used Windows in any
significant way for the last almost 20 years, so I admit to being a bit
out of touch with the current state of things. :-P


T

-- 
I am a consultant. My job is to make your job redundant. -- Mr Tom


More information about the Digitalmars-d mailing list