4 ms·
Do you have any resources you can link for learning? I tried to learn Emacs before and I ended up with cramped pinkies. Conversely, gdb looks like black magic t
by treehau5 10y ago
Do you have any resources you can link for learning? I tried to learn Emacs before and I ended up with cramped pinkies. Conversely, gdb looks like black magic to me.
- webkike 10y agoI found it was straight forward enough to not necessitate any tutorials, even at a young age. I would say maybe just watch a video on the topic. I know for one thing a lot of colleges have recorded sessions explaining. The only real black magic I ever found was GDB script, which is also kind of straightforward
- qwertyuiop924 10y agoGDB has fairly complete documentation. Like most FSF projects, the documentation is amazingly complete, and also fantastically comprehensible. If you want to use GDB, it's a good place to look. Brendan Gregg had a blog post about using GDB that was on HN a few months back, which also helps explain some of the basics. Finally, Google is, of course, your friend. As for Emacs, the first step is remapping control onto your your capslock key. It ought to stop your pinkies from cramping. xmodmap, xkbcomp, or xkb rules all provide relatively simple ways to do this. Which one you'll use depends on your distro. It's a fairly common procedure, so you can probably find instructions for your system online. The next step is to install useful elisp packages, configure your settings, and learn all the bindings, as well as how to do the above. The excellent emacswiki can help with this. If you're interested in a more vi-like experience, spacemacs is apparently an excellent starting config/package for this. If you're not a vi fan, however, I'd stay away from it. You can find it on github.
- groovy2shoes 10y agoRemapping caps lock to control is one of the best things I've ever done in terms of configuration (along with switching to a tiling window manager). I'm not even (primarily) an emacs user, but have been a vim user for over a decade. It wasn't even an awkward switch -- it felt natural almost immediately, and I never get any kind of finger or wrist pain anymore. I do it on all of my systems. Here's a cheat sheet: X11: Stick `setxkbmap -option 'ctrl:swapcaps'` in your ~/.xsession (if using a display manager), ~/.xinitrc (if using startx or xinit), or your startup programs if you're using a fancy-schmancy desktop environment. Linux vtty: Run `loadkeys emacs.map` (provided it's available in /usr/share/kbd/keymaps/). It's a good idea to stick this in your rc.local or rc.conf.local or whatever the hell the systemd equivalent is. OpenBSD vtty: Run `kbd us.swapctrlcaps` (there are similar variants for uk and some other keyboards). To make it "permanent", `echo 'us.swapctrlcaps' >/etc/kbdtype`. OSX / macOS: There's a dropdown menu in the System Preferences under "Keyboard & Mouse". Windows: You'll need to edit the registry. Follow the instructions here: http://superuser.com/a/916887 http://superuser.com/a/916887 . I don't have info for other systems handy, but it's most likely just a quick Google search away.
- qwertyuiop924 10y agoemacs.map is a thing? I used to just edit the keymap by hand. It was... unpleasant. So thanks for that.
- groovy2shoes 10y agoIt is on Slackware, at least! :)
- qwertyuiop924 10y agoI'm on arch :(.
- groovy2shoes 10y agoIs Arch missing emacs.map?
- qwertyuiop924 10y agoNo, it has it. I just didn't know that when I wrote the above comment.
- JdeBP 10y agoIt's not a very good cheat sheet. I recommend something like https://emacswiki.org./emacs/MovingTheCtrlKey https://emacswiki.org./emacs/MovingTheCtrlKey instead. Whilst that has its share of problems, such as getting Linux and NetBSD mixed up, it's better. It's actually a bad idea to stick a loadkeys command in /etc/rc.local, since that's a system that van Smoorenburg rc itself superseded, back in the 1990s. It's between 2 and 4 init/rc system overhauls in the past, at this point. It also has no guaranteed ordering relative to native mechanisms; and on many systems there are native services that configure the kernel's terminal emulator. And /etc/rc.conf.local is a configuration settings file that largely hasn't been around on Linux operating systems since those pre-van Smoorenburg rc days. (BSDs retain /etc/rc.conf.local . Some of them actually have a strict rule about not putting anything other than a map of name=value settings in there, though.) On Linux operating systems, the kernel's terminal emulator's configuration hasn't been done by explicitly writing a loadkeys command for almost as long. * /etc/default/keyboard has been the Debian mechanism since roughly the turn of the century, and one has to work out what XKBLAYOUT, XKBVARIANT, and XKBOPTIONS combination means "swap capslock and control". The Debian people designed it to do both the kernel's terminal emulator and X11 in one. So one probably uses XKBOPTIONS='ctrl:swapcaps' and ignores what you wrote about X11 entirely. (-: * The vanilla systemd mechanism is /etc/vconsole.conf , which doesn't have the internally complex Debian approach of trying to have the kernel terminal emulator and X11 configured in lockstep, and the variable to change is named KEYMAP . On FreeBSD/PC-BSD one just sets the keymap variable in /etc/rc.conf . Out of the box, FreeBSD/PC-BSD only comes with a few keymaps that swap capslock and control, and their names aren't regular. So one will have keymap="uk.iso-ctrl" but also keymap="bg.bds.ctrlcaps" . The nosh user-space terminal emulator uses FreeBSD/PC-BSD keymaps. But it supports overlaid keymaps. Using an overlay, the configuration import subsystem makes both a vanilla (.kbdmap) and a swap-capslock-and-control (.capsctrl.kbdmap) compiled keyboard map from each of the FreeBSD/PC-BSD keymap source files.
- brudgers 10y agoSince I started using Emacs, I adopted Xah Lee's advice: use a keyboard with symmetric Control and Alt keys so that there is access with either hand. This greatly reduces contortion...oh and use the thumbs on the Alt keys. This winds up meaning I use Thinkpads for laptops and Microsoft Natural Ergonomic 4000 at the desktop. The upside of it is that much of the software I use allows Emacs keybindings.
- qwertyuiop924 10y agoI agree that using thumb on alt is a good idea, but I didn't find the extra hardware necessary: A simple control/capslock swap on my Unicomp Model M is all it took to make emacs perfectly usable. I also used to map lshift to alt. I find it convenient. I don't know if anybody else would.