reddit / emacs

Newcomer - Value in Learning Emacs Text Editing Language?

[deleted] 路 2022-02-11 20:42
Hello all, I'm new here and to emacs, so sorry if I'm asking a repeated question or something just not acceptable for some reason. I've used vim for many years and then neovim for about two years. I am/was very happy with neovim's current state of plugins, ecosystem, lua configuration and vi's philosophy on editing text. However I've reached a point where I A) have become very interested in lisp languages and B) realized that I would like a much more flexible and complete computing environment that goes beyond my text editor. Funnily enough this problem was solved many years ago by the dark side (just a joke 馃ぃ). So I'm pretty excited to dive into Emacs, learn all about it and I know today its exactly the tool Id like for the rest of my computing career. I wanted to ask however to other emacs users, especially ex-Vimmers if readily slapping evil on emacs to make myself comfortable (at least on the text editing side) can hinder me from learning all the ins and outs of emacs? I have grown very accustomed to vim's text editing experience. Its so precise and short. I'm very used to changing text with up to 3 or 4 keystrokes to a precision that is very hard to get out of. I mean this in the best of ways, I really like Emacs and am having a lot of fun learning it. I'm just asking to better understand how I should go about this. I'd imagine that the text editing part is such a minor attribute of the power of Emacs and what its capable of that maybe it wouldn't make a difference how one chooses to edit text. Thanks in advance 馃憤
nv-elisp 路 2022-02-11 20:48
You will get a range of responses which essentially boil down to: "You must learn the default bindings first! Otherwise you'll be hopelessly lost when evil-mode isn't available. In fact, the defaults are better than modal editing! etc." "Just use evil-mode. It emulates 80% of vim's bindings fine. It can be extended as well." "Use evil-mode + evil-collection." Like most things, it's a matter of preference. I came from a decade of vim to Emacs. It's worth learning the very basics (run through the tutorial several times) just so you know them. Just start using Emacs and see what works for you.
dcreno 路 2022-02-11 20:49
I went with learning eMacs native keys. I found it easier to know they always worked, in all the situations, without configuration. On an unrelated note, I still find modal (eg vim) better suited to editing existing text while non-modal editors like eMacs better for composing.
fragglestickcar0 路 2022-02-11 20:56
> [300 words equivalent to "Pepsi drinker curious about Coke?" Well, you certainly have an emacser's longwindedness nailed down.
[deleted] 路 2022-02-11 20:56
Hey thanks for the reply. Yeah I got the basics covered, ran through the tutorial and if anyone's used to CLI/readline keybindings, you already have a head start there. How did you go about it at the time?
[deleted] 路 2022-02-11 20:57
[deleted]
nv-elisp 路 2022-02-11 21:00
> How did you go about it at the time? I just used Emacs to do things I wanted to do.
[deleted] 路 2022-02-11 21:01
I meant in terms of the choice of keybindings. Did you just go vanilla with it?
nv-elisp 路 2022-02-11 21:10
No. I already had a decade of vim's bindings in my fingers. No reason to. I just use evil-mode.
cazzipropri 路 2022-02-11 22:16
I learned elisp enough that I can glue emacs modules together and sort of do what i need. It's 100x ahead of vs:code in terms of features, but it's ugly. The cost-value analysis is too much dominated by YMMV considerations.
wsppan 路 2022-02-11 23:20
>I wanted to ask however to other emacs users, especially ex-Vimmers if readily slapping evil on emacs to make myself comfortable (at least on the text editing side) can hinder me from learning all the ins and outs of emacs? I went with evil mode via Spacemacs then Doom. I prefer the power of modal editing and feel it does not hinder me from learning the ins and outs of Doom Emacs but does hinder me from picking up and running with a vanilla Emacs install. This is acceptable to me as I find most Emacs users eventually heavily customize their install of Emacs to suit their needs.
deaddyfreddy 路 2022-02-12 00:56
> Value in Learning Emacs Text Editing Language? there's no such thing as `Emacs Text Editing Language` you make Emacs speak your language, it's not the 70s anymore
deaddyfreddy 路 2022-02-12 00:58
bindings don't matter
[deleted] 路 2022-02-12 01:32
Yeah that makes sense
00-11 路 2022-02-12 04:13
1. Don't get hung up on key bindings. It doesn't matter much what you use to start with. (I'd say vanilla/default, but it doesn't really matter.) 2. Learn some Emacs Lisp. See the Emacs Wiki [Learn Emacs Lisp](https://www.emacswiki.org/emacs/LearnEmacsLisp) page. 3. The wiki also has links to resources for [learning to use Emacs](https://www.emacswiki.org/emacs/LearningEmacs). 4. Learn to *ask Emacs*, starting with the help commands/keys.
[deleted] 路 2022-02-12 04:27
Hi, thanks for the reply. Will for sure look into what you referred to. Luckily Ive had experience with lisps, had to write in CL for a project at work, so Im not bugged on that. In terms of keybindings, if it really doesn't matter Id keep the vim keybindings through evil at least when im just editing text directly into a buffer, because the muscle memory is just instinctive at this point and im much faster that way. I just wanted to know if there was some correlation to Emacs text-related keybindings to the overall emacs internals that would justify someone religiously following them to have a greater understanding of the tool.
luvs_spaniels 路 2022-02-12 08:03
I've used Emacs for almost 20 years. The original key bindings died during the first month. I don't miss them. My two cents... standardize your key bindings based on which ones you currently use most often, regardless of program, and what you expect to happen when you use them. Emacs made, and stuck by, some bizarre decisions that often hinder adoption or--worse--lock you into Emacs because your workflow is built around esoteric key bindings like ctrl-s. In Emacs, that's search. In most other programs, it's save. In terminal, well... 99% of the time, it's save. Being consistent with the 99% lets me use the best tool for the job without hunting for key bindings or fiddling with a mouse. Plus, I prefer Dvorak. Most of the time, qwerty-optimized key bindings are pretty uncomfortable.
Frostmaine 路 2022-02-12 09:20
Its personal preference me personally vim does way better for my carpal tunnel syndrome. Emacs default key binds have borderline painful hand positions. So I use evil mode and evil collection. I am unaware of anything I am missing out on as far as emacs goes. I mean I guess I could make it my window manager too. But xmonad has my heart and soul so. Yeh. I recommend sticking with modal editing, but it's all personal preference
Horrih 路 2022-02-12 10:48
I think he meant emacs-lisp. My two cents here : i used emacs on and off over the past few years, didn't really see the value until - i discovered magit, an amazing git client with Everything available with a few modal keybindings - i followed the built in elisp tutorial Then you discover that in a couple of key presses you can check Which function is bound to Which keybinding, and in a couple more you see the source code of this function (well documented and easy to read). Is is so easy to customize Everything just the way you want. Defining your own modal 茅dition with 50+rebound commands takes fewer than 100lines of code. On the less good side : plugins are overall less mature than most IDE If you dont want to use the config file and elisp, customization through thegui sucks
ftrx 路 2022-02-12 14:23
I was a hardcore Unix-er/Vim-er, then I tried Emacs, not because of text editing but because I felt the need of a modern Desktop Environment, yes, you have read correctly. Elisp as a language I think it's not interesting, it's bound to Emacs, it's virtual machine, and Emacs is not much meant to develop other software on top. Emacs is an operating environment so you can't much compare it to Vim, you need to compare with unix/shell+vim environment. That's is. In that sense elisp means a system language, like C for unix, where you do not have to compile, restart an executable to see changes etc, you can change your own OE (Operating Environment) live, as you do something else. You can put and execute code anywhere, you have live help anywhere etc. Is a simpler and more powerful SmallTalk classic desktop environment. In that sense elisp is probably not the top of lisp, CL is better, some say Scheme is better, but only elisp offer a so much capable development environment. In that sense "why lisp?" can be answered "because in few SLoC you can get what you can get from a tenth SLoC of shell script in unix, and without the same level of integration". My advise is trying a bit at a time, Emacs can be your full DE (EXWM), mail client powerful than GMail (notmuch, some prefer mu4e, some Gnus etc), office suite (org-mode and tons of packages around it), ... but you have to learn not a new "tool" but a new "environment", as per unix you can start easily if you've read a bit of docs or being told how to work, but to benefit it take a bit more effort, it will pay back countless of time forever.
[deleted] 路 2022-02-12 15:43
Yes, I agree fully with what you said and I think Im coming from a similar background. I was/am using Linux for about 6 years now and for the most part of it I was running my system as a combination of different TWMs, (neo)vim, tmux, mutt and other power tools, where I aimed to try to compose them together as minimally as possible to reproduce a productive working environment. However Ive gotten to what I believe is the limit of said attempt. Emacs presents itself as basically a programmable system where literally the sky is the limit and integration is a major focus. This is exactly what I would want. Lisps are very interesting and I have had experience with CL due to work, so elisp already feels very natural. Im working right now to transfer my herbstluftwm setup to exwm, because I feel that the longer I live within emacs the faster Id get accustomed. Thanks a lot for the reply!
[deleted] 路 2022-02-12 15:49
No I meant the "language" used to edit text. Like in vim there is somewhat of a language structure where you can combine "verbs"/"actions" and "nouns" to edit text. So 'c' stands for change, if I then add 'w' to 'c' as in 'cw', I'll change the word under the cursor. This then extends to many different keybindings, can be programmed, grouped as macros and so on. Emacs also has its own from what I gather. Where you jump words, sentences, pages, granular jumps by letters and so on. So the question was if it does make much of a difference to learn the emacs way of editing text (just editing text, everything else would be learned properly) or its not actually the core of the tool and would not make a difference to just use vim keybindings through something like evil.
AuroraDraco 路 2022-02-12 16:21
Emacs keybindings where what originally held me back on using Emacs. I really dont like them. Then I discovered Spacemacs, which had evil by default and suddenly, emacs didn't intimidate me that much. Now I use my own, stupidly large config containing a million of things. People might call it bloat, but for me it's just a collection of everything I like. So my answer would be, you don't need to learn emacs keybindings. Imo vims keybindings are much more comfortable. Emacs is much more than that, and you can learn a million things besides it's keybindings. Besides evil, I would recommend evil-collection and general to be installed on your system. Evil-collection has evil keybindings for a lot of modes and general is a great package for making your own keybindings. Its very simple and one of my favourite packages. Also as a beginner I would recommend you also install packages such as which-key, helpful and a completion framework such as Helm/Ivy to help ease you into learning
Horrih 路 2022-02-12 16:28
From my understanding there is no such thing in emacs. It is more centered around using modifiers Ctrl, alt Which is called Meta or M, shift , ctrl+key does something, alt+key does the same but stronger, ctrl+shift does the same but backwards. In this regard is is more similar to other text editors than vim Learning it won't take long and is useful because tjose bindings are used in your terminal and various other command line tools. but it's really opposit to the modal editing of vim. Personally i use modal edition, but i don't regret learning the basic emacs commands for their ubiquity elsewhere
00-11 路 2022-02-12 16:47
Key bindings are of course important. And they're typically individual preferences (opinion-based, experience-based, habit-based). I really meant that for learning Emacs it probably doesn't help to stress out about the key bindings to use. You'll end up binding keys the way you like as you go along. On the other hand, in some cases Emacs help or doc can be hard-coded to speak of *default* bindings. That's one (among others) reason you might want to start with the default bindings.
[deleted] 路 2022-02-12 17:23
I see, ok. Yeah I'm aware its used in the terminal. Learning the basic readline keybindings helped me a lot when I first began messing around with computers.
telesonico 路 2022-02-12 17:32
Such a great answer - I hate that I鈥檓 laughing because it鈥檚 just reminding me that yes, I鈥檓 still a nerd.
[deleted] 路 2022-02-12 17:41
I see, that makes sense. Thanks a lot for the reply. You mentioned that emacs help and docs will always speak in relation to default keybindings and that is among others reasons to learn the basics, which makes a lot of sense Would you mind adding your own personal thoughts to other reasons for it? Would really like to know a different perspective as well.
Horrih 路 2022-02-12 19:32
If you already know the basics (try the built in tutorial) and like the vim way of doing it i'd say go straight to evil mode To unlock the full potential, Get familiar with the help commands : ctrl+h k, ctrl+h f, ctrl+h v, + install a completion plugin like helm to easily search built in functions / variables. As an exercise view the source code of the function bound to ctrl+e (go to the end of line) and replace it with your own which prints "vim is evil" in addition to the rest. If you can do that you're pretty much ready for the full emacs exp茅rience :)
[deleted] 路 2022-02-12 19:41
Hahaha that's a great idea! I've done the tutorial on the first day, the text related keybindings are somewhat intuitive when someone already knows the basic CLI readline keybindings on bash for example. I will for sure try out that exercise tho haha
suggestmeacoolname 路 2022-02-16 16:39
VI keybidings are dangerous and you should not use them
suggestmeacoolname 路 2022-02-16 16:43
don't use VI keybindings they're dangerous
AuroraDraco 路 2022-02-16 16:44
Why though