I have tried it out loved the ease of it, but not the trade off for hangs and crashes.
I found that on windows Emacs feels sluggish, load times (first open + os files or Ctrl+r+l, scrolling), GUI update on scroll, colors and overall speed of things like shell/auto-complete work 'faster' in mac or Ubuntu/Arch. I don't have any benchmarks to prove it but I do notice a difference between the environments I work on and the machines are relatively close in hardware specs.
as a side note, I did try to use Emacs as a SQL client but it becomes really difficult really quickly, for db development SSMS/VS, or pgAdmin would be better. Unfortunately I was still unsatisfied with those tools until I found Data Grip from JetBrains, it's worth every penny and has an a-okay vim plugin that allows me to work on databases a lot easier. Sadly there are limits to what I can develop inside Emacs productively.
(defun duplicate-line
(interactive)
(kill-whole-line)
(yank)
(yank))
Five lines, and it took me all of ten minutes to write, including looking up the names of all the functions. Of course, there's probably a better way to do this, but I don't know what it is. Now all you have to do is bind it to a key.Or, of course, you could just record a keyboard macro to do it instead.
https://gist.github.com/asummers/7784d40b1bc53ee309777274e9d...
That way I can hit M-w when I don't have a region and get the copy behavior for the whole line.
I think that's reasonably short (same number of non-modifier keys as vi!). Of course, if you find yourself doing it a lot, you can configure Emacs however you want.
https://en.wikipedia.org/wiki/Vi#/media/File:KB_Terminal_ADM...
I guess it'd be more like tab, but whatever.
Just the leader key and layers alone are incredibly powerful concepts Spacemacs brings on top of Emacs/Vim :)
But I can highly recommend anyone to give it a try. It's a good example how you can split configs into smaller packages and do keybindings the right way.
I went back to neovim and re-wrote my vimrc from scratch. With mnemonic keybindings, layered config and all the likes
Then coworkers suggested spacemacs after I talked about an Emacs/Vim hybrid and tried it afterwards, oh boy :)
The main advantages of Spacemacs, IMO, are its community creating good quality layers, the concept of layers itself (think of it as a group for a major mode and its associated minor modes - makes config a lot cleaner), running almost everything through helm-mode (which isn't fun to integrate that well yourself), and its space leader key (hence spacemacs) on top of helm-mode giving you self-documenting navigation through every single command.
So saving files becomes "space f s" opening files is "space f f" and if you idle a few seconds at any point helm-mode shows you all the possible options, so its very easy to learn gradually.
I gotta admit I jumped headfirst into its tutorial and when I had completed it went on to read the full Spacemacs documentation, so most of the the learning curve was rather easy over a week or two, yet months later I'm still learning new things :)
Maybe I haven't understand well exactly what you wanted to delete, but if I have, then you might reconsider your emacs-fu, because there is much easier way to do that: Meta+<Backspace><Backspace>.
I did use plain Emacs mapping for the first few months of learning Emacs but as many have mentioned it's like do acrobats with your fingers and I lost the benefit that I was looking for in Emacs (better productivity). The benefit of not having to lose my thoughts and use the arrow keys or mouse, once those benefits were achieved I noticed that there could still be a bit more improvement and the vim modal editing was the solution. I still use all default Emacs mapping for everything else org mode, bookmarks and standard plugin stuff, Such as C-c C-j for jumping to the declaration in go-mode or things like mapping imenu to C-x C-i.
The most important part about this is the fact Emacs supports multiple Frames (different than windows). So I can work on 2 monitors and use window-numbering to move between windows and 'other-frame' to change what monitor I am working on I usually bind that to M-` as it's in the same row for navigating windows or search across all open buffers and use ace-mode across 2 monitors. (I'm not sure if VIM has that).
one other note, ace-jump originated from vim under a different package, VI(M) does have a lot of neat features and I believe the Ying and Yang need to balance and be in harmony which Emacs allows with vim (EVIL) :)
Vim's d2b actually moves far away from the home row (note the "2")!
Not wanting to do the finger acrobatics? I'm even more with you here: I remapped Ctrl and Alt to be just next to space, and space to serve both as space and shift.
And, to point out that vim absolutely requires pinky acrobatics all the time with its reliance on : and ESC, so IMHO it is even more demanding than emacs there.
and I do believe all the numbers are within home row distance not like <Esc> which way up in the Artic on most keyboards before being remapped.
- I use "jk", typed quickly, to exit insert mode. Most vim users I know use either this or "jj".
- I have rebound Caps Lock to Ctrl, and in the few situations where I would otherwise hit Esc, I hit Ctrl-C, which causes much less strain. (This is technically different than Esc, but the difference doesn't usually matter; if it's necessary, Ctrl-[ functions exactly the same as Esc.)
And in emacs, working with the selection does similar things for me (esp. once you add some functions/modules like expand-selection to it).
For movement, it's mostly search forwards/backwards, in both vim and emacs. Raskin was definitely along the right track with his leap keys (and someday I'm going to remap some dedicated keys to C-s/C-r/\//?).
others don't seem to like this, but i've found the following global key swaps effective
swap ctrl->alt
LCtrl::LAlt
RCtrl::RAlt
swap capslock->alt
Capslock::Alt
this enables you to hit "ctrl" with your thumb (next to the spacebar), and capslock becomes the new "alt". so no more reaching for that hard to reach LCtrl key with your pinky.
I can easily without leaving home row move a few letter to the right or back with hl or f and F. but things started to get a lot more fun when you realize that Vim is a programming editing language and it's beauty is in the commands. This leads to amazing things that I hated before, such as deleting 2 words back from my current position would simple be d3b. instead of shift+ctrl+left arrow x 2 + delete.
Overall it's been about 2 months since I've started using EVIL mode for Emacs and I love it. I'll stand by the saying that Emacs is a great OS and vim is a great for editing text in it's modal editing.
lastly modal mode really felt powerful only after I had re-mapped my CAPS key to ESC. I mean throughout the past decade I don't think I've even used Caps for anything. so I've remapped the machines I work on the have caps as esc.
- for those that think it's not reasonable to do so and the whole point of using vim is so that you can edit machines via ssh then use vim on that machine, my suggestion is to use tramp in Emacs with ssh or plink to get to the server and edit (you will still have the local caps to esc key mapped)
TL;DR - Vim modal editing is amazing and feels has straining than other editing layouts - IMO.