1. 43
  1.  

  2. 3

    Rectangular editing is good by default (without cua-mode). To select a region: C-x SPC and to switch “corner”: C-x C-x.

    1. 3

      I like transpose-region. It’s super useful.

      This is a bit of an understatement:

      Semantic is part of CEDET, a large collection of (mostly) built-in tools to try to turn Emacs into a full-fledged IDE. It… doesn’t work great on a code base of serious size or import, but it’s good at analyzing exploratory code/small utilities.

      CEDET on large projects is hopeless. LSP really is the better choice for just about anything you want to do that is IDE-like.

      1. 3

        Awesome! 5 years of adding packages and I never thought to just dig in to built in functionality. We need more of these articles!

        1. 3

          Great stuff. I’ve been using emacs for 30 years, but half the items were still new to me.

          1. 2

            I’m in the process of learning emacs after using vim for roughly 15 years; give or take a couple of years. These articles are really helpful.

            I’ve been going through his .emacs as well on GitHub. Just like with vim, I wouldn’t recommend just copying everything he did, but I’ve found some nice bits here and there.

            1. 2

              Any advice for vimmers looking to be a little more comfortable in Emacs? I tried Spacemacs for a little while but got frustrated debugging my own setup / configuration and went back…

              1. 4

                I’m probably not the right person to ask this question, but I will give you my advice anyway.

                Some caveats
                First, my vim-fu is pretty weak if I’m honest. I know I’ve been using it for over a decade, but even still I’m not super efficient and I know I do a lot of things poorly. Habits die hard though; especially the bad ones. Second, this is my second attempt to learn emacs. The first failed because I wasn’t serious. This attempt is going much better so far, but I’m only a couple of weeks into it.

                My advice (in no particular order)

                • Use vanilla emacs. I know there are a bunch of different pre-made emacs out there. They’re shiny and promise lots of great things. I’m not going to say those are bad, they’re not, but they also prevent you, IMO, from learning a lot of basics.
                • It’s okay to look at other people’s configurations, but don’t blindly copy. If you don’t know what it does, forget it. My general rule of thumb is if I can’t write a comment explaining what it is and/or how it works, I don’t borrow it. I made this mistake with vim years ago, and while it didn’t hinder me, it very much didn’t help me.
                • I’m not the kind of guy who reads tech books. They just don’t hold my interest 9 times out of 10. I am fighting that as hard as I can with emacs and it’s paying off for me. So far I’m really enjoying Mastering Emacs. I would be curious if anyone else has recommendations here.
                • My biggest problem so far is movement. After all this time hjkl is pretty hardwired into my hands. So learning how to efficiently move around has been a real struggle. I highly recommend you take the time to really get used to this though. This is the number 1 thing you need to learn bar none.
                • If you don’t already know it, learn, or at least get comfortable reading, emacs lisp. I don’t know it, but the more I use emacs, and the more comfortable I get reading it, the easier learning the rest of emacs has been.
                • Resist the urge to go back to vim. You’ll never truly learn emacs if you don’t use it. If you keep vim around as a crutch you’ve already failed IMO.
                1. 3

                  Use vanilla emacs.

                  Absolutely seconded 100%. Do not start off by installing a lot of different packages and reading too many config setups. It will take you in the wrong direction.

                  I’ve been using Emacs for nearly 25 years and about 10 years ago I set about re-learning it because I realized I didn’t use it very effectively. What worked well for me was ignoring nearly all the extensions and getting to know the builtin functionality. I avoid installing packages as much as I can. That said, Emacs is deficient in three main categories to me: project navigation (an unbelievable oversight, really), completion interface (the default is absolutely awful), and help UX.

                  Emacs seems to be moving to use project as the default project interface, so you may want to install that. It’s not bad, even for large projects. As for completion, there is ido (inteactive do) that comes with Emacs and is okay, but the other choices are helm and ivy. My personal preference is for helm, but you may want to try ido first.

                  You should install which-key. It’s just too useful, even for veterans. You may also want use-package, although I do not use it so I can’t say how complicated it is to setup. It seems to be quite popular, though.

                  After that, limit yourself to a colour theme that you like and any language major modes you need.

                  The rest of your advice is all good, too.