1. 29
  1.  

  2. 9

    From my perspective, I think template configurations like these are far better in the long term, than so-called “distributions”, that create their own ecosystem on more and more layers of abstraction. Recently there have been discussions on the emacs-devel mailing list to include a configuration wizard of sorts, and setups like these are being considered to see what people like to have configured by default. It doesn’t sound right, but it would be better if packages like Prelude didn’t have to exists, in the same way as before Emacs became Emacs, it was also just various TECO macros people used to pass around, that were then gathered into what then became Emacs. Something along those lines would be cool to see for all these starter and template configurations that have rose to prominence in the last few years.

    1. 5

      Prelude is a wonderful starter config for Emacs. Thanks for the years of hard work!

      1. 2

        You’re welcome!

      2. 4

        Nice, congratulations! I tried Emacs two or thee times, but it’s only after installing prelude that I was able to stick with it for a long time! Also, Zenburn is the best color theme ever <3

        1. 3

          Also, Zenburn is the best color theme ever <3

          Lies and innuendo! (its alright, best is a bit much)

          1. 1

            Happy to hear that!

          2. 1

            I have tried to get into Emacs several times, it agrees with me in many ways.

            However, each time I am driven away by the keyboard bindings system.

            I find it tedious to keep hitting Ctrl and all those multi-key shortcuts.

            I also find myself dead in the water, barely able to even open a file, let alone do things like:

            • Global file search for a term (ctrl+shift+f usually)
            • Switch between open buffers (ctrl+tab)

            I’ve also lately been spoiled by IntelliJ’s handling of all these things with keyboard bindings I’m familiar with since VB in the 90’s, not to mention it having GUI wrappers for Git.

            Any advice?

            1. 2

              You could try something like doom or spacemacs or even prelude + evil-mode if you don’t like hitting the control key. These are built atop evil-mode which gives you vim-like keybindings. I genuinely believe knowing Vim and Emacs keybindings is useful (for instance readline - and by extension most CLI tools use Emacs keybindings like C-a/C-e for begining/end of line and C-k/C-y for killing (cutting) and yanking (pasting).

              At the same time, why do you want to learn Emacs? If you are productive in IntelliJ, stick to it. You cannot grok the utility of Emacs unless you have been using it for a few months at least. I have been using it since 2005 and I still uncover features that I am unaware of that are older than me.

              YMMV, but I prefer the way emacs opens files to the Intellij/code way since it doesn’t open a file-open dialog box - I use ivy and that gives me fuzzy search on file opening.

              Global search is a different beast - Emacs doesn’t have a built-in notion of projects - but projectile-mode adds this in - and there are bindings in projectile to do global search in the current project. I also use swiper for searches and avy for on-screen jumps but as I said before - emacs is a gift that just keeps on giving - you could never have tried everything that is possible with it.

              C-Tab would be C-x <right> and C-S-Tab would be C-x <left> in Emacs by default Buffers are ubiquitous in emacs - as a newbie you might also want to C-x C-b and pick the buffer you want. I personally use C-x b remapped to ivy-switch-buffer which gives me fuzzy search on buffer names.

              1. 1

                BTW, https://github.com/bbatsov/guru-mode and https://github.com/justbur/emacs-which-key could also help a lot in discovering emacs keybindings

                1. 1

                  Global search is a different beast - Emacs doesn’t have a built-in notion of projects

                  Actually, this isn’t true anymore. Since Emacs 26 project.el has been bundled with Emacs, and depending on the version you’re using, C-x p f should be bound to project-find-file. If not, you can install project.el from ELPA. I’ve been using it for the last few months, and it does everything projectile used to do, just without the need for a minor mode and an external package.

                  1. 1

                    C-x p f doesn’t seem bound to anything in Emacs 26, perhaps that happened in Emacs 27? (I’m still on 26) I’ve been monitoring the development of project.el for a few years and it’s great that Emacs has some built-in project support these days, but there are still many things that Projectile does and project.el doesn’t. Of course, I’m obviously biased, being the author of Projectile. :D

                    1. 1

                      I’m not sure, but updating project includes

                      ;;;###autoload (define-key ctl-x-map "p" project-prefix-map)
                      

                      so it will probably only be bound from 28 onwards :/

                      there are still many things that Projectile does and project.el doesn’t. Of course, I’m obviously biased, being the author of Projectile. :D

                      True, but it has been improving recently, with a lot of inspiration form Projectile. It would be interesting to see if projectile would evolve to become an “extension package” for project.el.

                      1. 1

                        The approaches of project.el and Projectile are somewhat different, so rebasing Projectile on top of project.el is not something I ever plan to do. I’m happy that Emacs users are getting something out-of-the-box, but I don’t plan to change my vision or goals for my project just because of that. Even if I’m the only Projectile user at the end of the day that’s be fine by me, as it covers my needs perfectly. :-)

                  2. 1

                    At the same time, why do you want to learn Emacs? If you are productive in IntelliJ, stick to it. You cannot grok the utility of Emacs unless you have been using it for a few months at least. I have been using it since 2005 and I still uncover features that I am unaware of that are older than me.

                    Because it is FOSS, and because I’ll be able to have it work the way I want instead of being at the whim and mercy of JetBrains, as cool as they are. I don’t mind a learning curve to gain productivity, but so far it’s been more of a wall than a curve for me. Also, IntelliJ CE has missing features like CSS support.

                    I also think there may be other features in Emacs which I have not even imagined yet, but would improve my productivity.

                    I’m also enticed by Emacs’ console mode and universality.

                    YMMV, but I prefer the way emacs opens files to the Intellij/code way since it doesn’t open a file-open dialog box - I use ivy and that gives me fuzzy search on file opening.

                    I use Ctrl+Shift+N for opening files, which lets me type, e.g. “green css” to select ~/project/default/theme/green/style.css

                    1. 1

                      I also think there may be other features in Emacs which I have not even imagined yet, but would improve my productivity.

                      Yes! There definitely is - welcome aboard. Org mode alone makes it worth it.

                      Just don’t expect keybindings to work like they do elsewhere since emacs predates most of them and is significantly more powerful - Emacs has sub-maps For instance C-x is not the final shortcut - C-x C-s is. Similarly, when you use counsel, C-x p will still not execute anything - it will wait for the next keystroke. At this point p will switch project, f will fuzzy find files, d will find a directory, s would wait for a further keystroke to pick the search backend. And the best thing is most commands take a prefix C-u, For instance C-f goes forward one character but C-u 30 C-f goes forward 30 characters.

                      There is no need to learn this all in one shot - you can simply pick things up as you need them.

                      I use Ctrl+Shift+N for opening files, which lets me type, e.g. “green css” to select ~/project/default/theme/green/style.css

                      That only works within the current project - what if I want to make a quick edit to my ~/.bashrc? If you want to search or files within the current project, C-x p f exactly that (including incremental filtering) if you use https://github.com/ericdanan/counsel-projectile which wraps around projectile which I mentioned before.

                  3. 2

                    not to mention it having GUI wrappers for Git.

                    Emacs has either the built-in vc commands, that provide a generic UI for various version control systems, but that might be cumbersome to use in some cases. For Git specifically, there’s Magit, that’s often praised as a very flexible UI for working with Git.

                    1. 1

                      I’ve been using Emacs for, I don’t know, 20 or 25 years? I’ve never liked the default keybindings and that is the power of Emacs: you mold it to your likings.

                      (For the longest time I had my own keybindings but since I was also familiar with Vim I’ve been using evil-mode for 8+ years now.)

                      My suggestion for you: configure the keybindings to IntelliJ’s since that’s what you’re used to.

                      1. 1

                        They’re not really IntelliJ’s keyboard bindings, more like Windows-derived ones which I’ve grown used to since using VB3 also 20-25 years ago…

                        I’m not even sure how to begin changingl the bindings.

                        1. 1

                          I would just begin with the global-set-key command, although some modes can overwrite it.

                          Once you’ve used Emacs for a little longer you can start looking into mode-specific keybindings (local-set-key, but also the :bind option in use-package) but I would skip that for now.

                          1. 1

                            looking into mode-specific keybindings (local-set-key, but also the :bind option in use-package)

                            define-key would be the easier way to define mode-local keybindings, local-set-key would require invoking it in a hook.