7 ms·
The Emacs Widget Library
- milkytron 8y agoAfter using vim for years and becoming what I would consider proficient in it, is there any reason to try out emacs? I've been wondering if I could be more productive in it after the learning curve, or if I should spend that time further solidifying and slightly improving my vim skills. Has anyone here used both and have any thoughts on this?
- applecrazy 8y agoI've been using spacemacs for a bit now, mainly because of org-mode. Most of the keybindings from Vim transfer to spacemacs, so it hasn't been very hard to learn, so for you I think it would be a nice middle ground, if you don't want to immediately go full Emacs.
- platz 8y agoSpacemacs unfortunately suffers from slow startup speed and an unnecessary "layers" abstraction. I could never use Emacs without vim keybindings, but I don't need to install Spacemacs to get that. It's as easy as package-install evil package-install evil-commentary package-install evil-leader package-install evil-org package-install evil-surround
- celeritascelery 8y agoYour missing he part where you have to configure all those packages. Having new features already setup and integrated for me is a huge plus. It takes a lot of work to mimic something as well done as Spacemacs.
- platz 8y agohere's the total configuration required: (require 'evil) (require 'evil-matchit) (require 'evil-surround) (evil-mode 1) (global-evil-matchit-mode 1) (global-evil-surround-mode 1) (evil-commentary-mode) judge for yourself whether this is too much work to paste into your .emacs
- SmirkingRevenge 8y agoSpacemacs does a lot more than provide vim key bindings and modal editing. The biggie to me is discoverability, with it's pneumonic key combos, and integrating with packages like helm. Even with evil, the vim semantics are often violated in special buffers, making for a rather disjointed experience. Spacemacs also does a lot to smooth out a lot of those problems.
- PurpleRamen 8y agoLayers are not an abstraction, it's an organization-system for the configuration. Anyone who has more then a handful lines of configurations develops some system to avoid the infamous .emacs bankruptcy. And Spacemacs comes with dozen packages pre-configured, while offering the option to allow the user to choose from hundred more package-configurations. Similar slow startup. Majority impact on spacemacs startup is the regular search for package updates. Without it the startup-time is relative tame, though there is of course some place for improvment if you aim for <1 sec-startups.
- akashakya 8y agoHave you tried doom-emacs? https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs It has an insane startup speed! I tried once and it opened within a second. I'm not an evil user myself, so don't know about the vim compatibility. If you are interested in making the startup faster, check https://github.com/hlissner/doom-emacs/wiki/FAQ#how-is-dooms-startup-so-fast https://github.com/hlissner/doom-emacs/wiki/FAQ#how-is-dooms... from the same author
- nextos 8y agoEmacs is not just an editor, it's a text-mode Lisp machine. If you like this idea, it does make sense to try it. Some people love Evil, a Vim emulation layer on top of Emacs. I do all my computing using just StumpWM, Emacs, Firefox and xterm. I'm much happier than with my previous setup. Curses-based CLI applications don't compose well. They are little silos. In contrast, on Emacs everything is hackable and alive. There's a wealth of classic packages (calc, dired, gnus, ansi-term, ess, auctex...) and modern ones (org-mode, magit, notmuch, pdf-tools, projectile, ivy, company...) that can let you craft a great environment. Even if you are not a fan of huge customizations, I'm not either, small tweaks that adapt everything to your preferred workflow really do increase productivity. For example, my agenda view on org-mode emulates a kanban board. I prefer to do as much of my computing as possible on a text-mode Lisp machine for this reason. Everything is friendly and customizable alive. I do web stuff on a regular browser inside a container: Firefox + Tridactyl. And plumbing is left to Unix, either NixOS or a simple Linux (Arch or Slackware) on xterm. I find that trying to move stuff that naturally falls into one of these platforms (Emacs, Web, Unix) into another one makes me unhappy. For example, trying to browse the web on Emacs or composing emails on a web browser.
- ams6110 8y ago> I do all my computing using just StumpWM, Emacs, Firefox and xterm Same, though I use Awesome for my window manager.
- pjmlp 8y agoIf only it was an actual graphical-mode Lisp machine. XEmacs did better there, but it seems to have faded away.
- good4parts 8y agoWhat type of container do you use for your browser?
- nextos 8y agoJust firejail (despite the name it has no association to Firefox): https://firejail.wordpress.com/ https://firejail.wordpress.com/ https://wiki.archlinux.org/index.php/Firejail https://wiki.archlinux.org/index.php/Firejail It's super easy to use.
- 87 8y agoI think you shouldn't concern yourself too much with the editor. Negative productivity gains are a possibility too. Emacs can be the ultimate productivity trap if you love customizing stuff. Using Emacs often feels like working on a buggy, never-ending project.
- SmirkingRevenge 8y agoI've been down this road and negative gains are likely. I like tinkering with these things and find it fun, so that's fine with me. But efficiency/productivity we're secondary to exploration. Unless you have it your heart to become an absolute elisp guru, emacs won't really offer you anything more than vim or any other editor, except plugins that are harder to integrate and configure.
- kqr 8y agoInteresting perspective. I know the thought has sometimes struck me how much time I put on extending my Emacs... but as of late, I have also been shocked by how much time it has saved me. I can now do rather complicated sequences of actions with the press of a key or two. This would not have been as easy to implement without Emacs!
- tashlandiq1 8y agoI also used Vim for about 5 years. I have been using Emacs for about two years now. Emacs, hands down, is the better editor, and not only that. When I first decided to learn one of them, Vim seemed cool because modal editing was something new to me. I'm glad I learned it, but I wish I had switched to Emacs earlier. Emacs offers so much than Vim plus many other programs combined. Emacs users often mention org-mode, but to me Gnus is the best non-programming related Emacs package. Life's short. In addition to learning an editor, I don't want to learn an email client UI (all of the ones I used (Thunderbird, Gmail website, Evolution, Geary, Kmail, etc.) suck compared to Gnus), an IRC UI, or any other software that I may want to use in the future. With Emacs, once I grasped the basics, learning ERC (an IRC client), org-mode, Gnus, Projectile, etc. was not that hard. For example, using org-mode I can create flashcards and export them to Anki (it' so much faster and less frustrating than the Anki editor). Emacs is also well documented. Moreover, Elisp introduced me to the Lisp family of languages. I'm amazed how the Common Lisp development environment with Slime and Quicklisp is so much better than anything else out there. People think Python notebooks are great for easy prototyping. I say they should try Slime first. yada yada yada (You should try Emacs yourself and see if you like it.) yada yada yada.
- nextos 8y agoHave you tried Notmuch. I like Gnus, but I find Notmuch's architecture really neat. Besides, it's super fast. Have you considered org-drill instead of exporting to Anki? Or you run Anki on a phone? The only thing I miss on Emacs is a good OMEMO XMPP or Signal implementation. Currently Bitlbee lacks both.
- tashlandiq1 8y agoI tried mu4e before Gnus. Haven't tried Notmuch. I like reading hackernews and some mailing lists on Gnus without cluttering my inbox. Not sure if Notmuch can handle that. Yes, I use Anki on my phone too. I haven't thought about using Emacs as an IM, but I use w3m for browsing, which is great given all JS/CSS crap we get from websites these days. I just want text and can easily search for it within w3m.
- clircle 8y ago
- abhiyerra 8y agoI've used Emacs for about 8 years now and before that I used vim. I think Emacs in Evil mode is the best. Emacs default keybindings were giving me the Emacs pinky. Then again nowadays I am trying to be pragmatic with editors and more get things done. It is easy to go into endless customization in Emacs where you don't actually solve any real problems. (i.e I once used elnode https://github.com/nicferrier/elnode https://github.com/nicferrier/elnode to build and host a website... great little project that took way too much time better used elsewhere.) Nowadays I basically do VSCode for many things and jump onto Emacs if VSCode can't do it. Still using vim bindings though.
- orbital-decay 8y agoA classic trick to avoid Emacs pinky is swapping Caps Lock and Ctrl. I'm using it everywhere though; swapcaps makes it much more comfortable to use the Ctrl key on a standard PC keyboard.
- Pimpus 8y agoWith the placement of the Control key on most keyboards, your pinkie is doing a straight downwards motion which is much less straining than going sideways, even if it is a bit of a long stretch. Most keyboards (maybe not on laptops though) also have two Control keys so the load is distributed over two pinkies instead of one and neither hand makes any crazy stretches. Personally, I think Caps Lock as Control is categorically terrible advice. I'm sure your intentions were good, but I wouldn't be surprised if this classic trick wasn't originally some vile Vim scheme designed to undermine Emacs users. Ideal would be to use a keyboard and OS (MacBooks have both) where you can map Control to the keys immediately next to the spacebar. Using the strongest finger (thumb) instead of the weakest finger and the strongest movement (thumb curl) rather than the weakest is a true upgrade.
- kaens 8y ago> With the placement of the Control key on most keyboards, your pinkie is doing a straight downwards motion On every keyboard I have in my apartment, and every keyboard I've used for a long time, moving my left pinky straight down with my hands on the home row hits left shift and the windows key, in that order. Hitting caps lock with my left pinky is barely a movement at all.
- hyperion2010 8y agoI've been on vim for 8+ years. About 2 years ago I set up emacs because I wanted to start working in lisp land and use org mode. I couldn't use emacs without vim keybinds so I installed evil. I still use both editors, but I find emacs much easier to customize and the 'operating system' part of emacs makes it much easier to manage all the things I need to do. It sucks for big files, and there are some annoying quirks where repeating actions don't quite match vim's behavior, otherwise, I can hardly tell the difference, and when I do it is much easier to adjust to fit my needs. If you have your workflows set, then as with anything, there isn't much reason to switch, but emacs opens up a whole new world of possibilities in other ways.
- zcid 8y agoI have used vim/tmux/screen for almost 20 years, and while I only use a subset of the functionality, I am extremely at home in that workflow. I recently switched over to Emacs because I started spending a lot of time in Scheme. I set it up over a couple of days to almost entirely emulate my vim setup: leader key, 'jk'->ESC, evil binding everywhere, you name it. At this point, my config file is only 165 lines, yet it provides all the editing comforts to which I'm accustomed. The only thing I haven't figured out yet is how to map my enter key to ':' in normal mode. I still use vim out of habit when I'm in the terminal, but the transition is so smooth I don't even notice which one I'm using. It's difficult to say if it's worth the effort to switch unless you are looking at a specific use case with which vim struggles. I am in love with the ease of CL/Scheme editing in Emacs, but without that itch, I probably wouldn't have switched. I've had many people try to convert me in the past, but they couldn't provide the why.
- jaytaylor 8y agoCan you share this config you speak of? Would like to give it a whirl!
- zcid 8y agoSure. https://pastebin.com/R7zmfhp0 https://pastebin.com/R7zmfhp0 I don't use a lot of plugins in vim so it's relatively trim. The only thing I'm planning on adding at this point is https://github.com/emacs-evil/evil-surround https://github.com/emacs-evil/evil-surround. Ivy probably requires some tweaking to get the behavior right, and I'm not super familiar with it yet.
- wraithm112 8y agoI too have vim muscle memory in the terminal, so what I do is alias vim to emacsclient. It's actually really great! Terminal emacsclient with evil is basically indistinguishable from terminal vim.
- cup-of-tea 8y agoDefinitely yes. Use evil if you have to. Then check out org-mode and magit and you'll never go back.
- platz 8y agoThe only thing lacking in magit is the graph log renderer, which is just ASCII and can't deal with complicated graphs well
- cup-of-tea 8y agoI wrote a graph renderer in emacs lisp a few years ago [0]. It never got included in magit because my code wasn't very good. I'm not sure it would have been better for complicated graphs than the standard git log one, though. Do you have an example of a complicated graph and how a better renderer deals with it? [0] https://github.com/magit/magit/issues/495#issuecomment-17480757 https://github.com/magit/magit/issues/495#issuecomment-17480...
- platz 8y agowell, gitk is really my high-bar standard. Of course it't not ascii, but in terms of the end-user-goal of clarity, it's the best. as for ascii renderers, tig doesn't do too badly. your project looks very nice though, certainly an improvement over the default in magit.
- cup-of-tea 8y agoOh, I see, tig puts merges on one line. I used two for some reason. I think I was copying git graph too closely and missed that opportunity. It would be rather easy to modify my elisp version to be like tig. When I was testing mine the worst case repository for me was git.git. It's essentially useless to view the graph in any ASCII viewer. It actually breaks tig right now on my box. gitk does much better because it breaks some of the long branches rather than piling them all up until it no longer fits on the screen.
- anotheryou 8y agoi switched for org mode. spacemacs keeps the vim keys and offers great discover of commands. initially learning to navigate files and buffers is awkward though
- kovek 8y agoOne thing I tried to make in Emacs was a window at the top which shows the lines that you do not see that are unindenting from the currently visible indentation. It would act almost like a header. Next, would be to display these vertically inside the space created by the indentation itself. I don't see how to pack more source code context information on a screen than that
- anotheryou 8y agodid it work? can you share? I imagine a sticky header for the last line of any text from another level, is that would you built?
- anotheryou 8y agoedit: found a plugin that does it nicely for org-mode :) org-sticky-header
- jibal 8y agoWhat's the news here? The widget library has been around since 2000. The comments seem to have devolved into yet another vi/emacs debate, but the article isn't about emacs per se.
- meken 8y agoEmacs can embed gtk widgets https://www.emacswiki.org/emacs/EmacsXWidgets https://www.emacswiki.org/emacs/EmacsXWidgets
- pjmlp 8y agoOne step closer to Genera. :)