Fork me on GitHub
#emacs
<
2022-05-23
>
Benjamin10:05:39

do you use magit and submodules? How do I update all ?

practicalli-johnny12:05:07

Either Select all sub-modules and call magit-submodule-update Or use the universal argument (`C-u`) before calling magit-submodule-update to apply to all modules (same applies toany other sub-module commands)

Benjamin15:05:16

Ah thanks relief

otfrom14:05:44

at the risk of starting a flame war. Should I go with evil or lots of hydra stuff if I'm going to be doing a lot of work in a terminal with someone who will be learning emacs as well (I'll be creating their first config)

otfrom14:05:32

I do have to admit that I like hitting C- and M- less often

apt14:05:40

I’m not sure if I get the question. In principle, evil is for editing text, hydra is for having prefixes for a set of keys.

otfrom14:05:39

both allow for chaining of commands together and make emacs more mode like (tho the hydra modes seem much more ephemeral)

otfrom14:05:58

and both allow you to do a serious amount of key rebinding

enn15:05:29

I think a new emacs user will have an easier time if they learn how to get around in vanilla Emacs first.

☝️ 1
César Olea15:05:42

As an emacs user hydra makes the most sense to me. I've tried evil mode before but I could never stick with it long term. I like the flexibility of using hydras in the few places where I think it can make a difference to my workflow. But as @U060QM7AA mentions, for a new emacs user I think it's best for them if they learn vanilla emacs, if anything so they are able to search for answers when they get stuck.

otfrom16:05:44

there is that. We'll be pairing a lot and it will be remote which is why I was looking at evil as a solution. I've had issues with keybindings having fights with the terminal or desktop environment in frustrating ways.

otfrom16:05:15

evil has been pretty frustrating for me, but then I've been an emacs user for over 25 years.

César Olea16:05:51

I'm on the same boat as you are. Not as impressive as 25 years, more like 15 but nevertheless long enough that the "emacs way" has been burned into my subconscious.

otfrom16:05:15

well, just get old and you can rack up those years too 😉

César Olea16:05:33

I'm doing my best!

fedreg16:05:25

There's also god-mode... I've been an evil user for years and trying to switch over to vanilla bindings. god-mode has worked great for me... easy on the hands and I learn the vanilla bindings

practicalli-johnny16:05:58

While I like the hydra concept, I've rarely used it in practice. Spacemacs has transient states, the same principle as hydra, although I rarely use them for consecutive commands (maybe for organising windows in a frame) I find the mnemonic menu in Spacemacs and Evil cover 99% of my actions I would highly recommend getting comfortable speaking the vim language with your fingers, it's made me noticeably more productive

otfrom16:05:07

that is the thing that is keeping me coming back to it. I'm finding I'm still having to do too many things in holy mode (like editing the minibuffer) or that I'm missing something important in a mode I use a lot

otfrom16:05:04

I'm also struggling with a weird bug where after a while of using emacs I get the cursor jumping from the minibuffer to the top left buffer, which is pretty maddening. Restarting emacs seems to fix it, but I'm not quite sure what I do to start it

otfrom16:05:59

I do find entering ()[]{}"" a bit annoying as I've not got a good keybinding for stepping over them other than closing the paren

otfrom16:05:11

and surely that is what C-f is for

otfrom16:05:21

but I think that is just me being a noob

otfrom16:05:32

I'm finding your stuff on evil really helpful @U05254DQM

practicalli-johnny16:05:05

@U0525KG62 happy to do an Evil pairing session video call if it helps. I don't seem to have any of those issues.

practicalli-johnny16:05:38

I mainly use [ and ] to jump around sexp's (and magit)

practicalli-johnny16:05:34

I do use C-y to paste in the mini-buffer and C-c C-e to edit the results of a helm search, but I think that's all

otfrom16:05:19

what keys do you use to move around in the minibuffer to edit things?

otfrom16:05:34

I don't need to worry about helm

otfrom16:05:57

a massive list of all the keybindings for loads of modes would help. I think most of those are in evil-collection

otfrom17:05:34

re: the jumping bug. I've not triggered it again yet

enn17:05:59

I also occasionally run into situations where the minibuffer is still open but my cursor ends up in another buffer. Usually I can do C-x o to cycle through all my open windows until I get to the minibuffer, and then I can either finish was I was doing or close it with C-g.

otfrom17:05:43

I've never had that problem until I started using evil

practicalli-johnny17:05:52

I use command-log-mode to see what commands I am calling, https://github.com/lewang/command-log-mode

otfrom17:05:00

or if I did it was b/c I clicked on something

otfrom17:05:15

@U05254DQM I've been using command-log-mode to keep an eye on things

otfrom17:05:23

and to see what things our bound to

practicalli-johnny17:05:28

To navigate the mini-buffer, i.e selecting a file path, I either use arrow keys or C-h, or backspace (or C-j C-k) to navigate an a list of selections

otfrom17:05:30

I'm usually editing my jack-in command after doing C-u , j j to jack-in

otfrom17:05:51

so I'll not feel too bad about the arrow keys or using C-y

practicalli-johnny17:05:18

I havent found the mini-buffer to be that Evil... I usually add custom jack-in commands to the .dir-locals.el file, although if there are several different command for each project that may be a bit annoying to edit that file and revert a buffer to load the change each time.

otfrom17:05:25

I do think you've hit on part of the core that confuses me a bit. Evil offers a lot of extra on top of holy-mode, but you still need to be holy in particular places.

otfrom17:05:50

so I suppose I don't know where to draw the lines. What should be holy, what should be evil

otfrom17:05:59

(do people still do the holy/evil puns?)

practicalli-johnny17:05:53

I use Evil everywhere its implemented in Spacemacs, which is almost everywhere (mini-buffer seems to be a special case where multi-modal editing isnt supported, although I havent really investigated). I tried a hybrid approach initially, but it just slowed the adoption of Evil and was worse than using just holy or just evil.

otfrom17:05:15

ok, so evil everywhere except in the holy of holies that is the minibuffer

practicalli-johnny17:05:12

Unless I can find a way to go full Evil in the mini-buffer 🙂

otfrom17:05:29

:the_horns:

otfrom17:05:45

I suppose you'll have to be holy in anything new

otfrom17:05:56

unless things start coming with evil bindings

otfrom17:05:27

or you just SPC SPC everything which feels like suffering for ones evil while you are alive, which just feels wrong

otfrom17:05:34

(I'm going to carry on with the extended pun)

otfrom17:05:57

having an #evil channel for spacemacs/doom/corgi would be nice to trade ideas, but I'm happy to hang out in 3 or 4 channels as long as it doesn't annoy anyone

practicalli-johnny17:05:46

I am not missing evil key bindings for anything new. Spacemacs provides evil keybindings for pretty much everything, except mini-buffer and navigating the Emacs customize menu. I assume Doom does as well, but havent checked. I only really use the mini-buffer for interacting with the completion framework (helm-ivy-etc...). I rarely edit in customize, instead adding customisations to the init.el instead.

practicalli-johnny17:05:20

There was a couple of new functions in Cider I was going to add keybindings to Spacemacs for (once I remember what those commands were - off to check the Cider changelog...)

practicalli-johnny17:05:57

Hmm, according to this commit it seems you can have multi-modal Evil in the mini-buffer.. https://github.com/emacs-evil/evil/pull/1059/files

hkjels06:05:34

There’s quite a bit of rambling to unpack here, so I’m not going to 🥸. Did you reach a conclusion? I’ll post my two cents anyways and you can treat them as you wish. • Evil if vim-bindings is in your muscle-memory (You can use evil in the mini-buffer as well) • God-mode if you are already familiar with Emacs bindings • Meow if you want total control • Transient over hydra Personally, I switched from Vim to Emacs about six/seven years ago and went with evil and have stuck with it. I also used to have a bunch of hydras, but I’ve either killed them or replaced them with which-key and transients by now.

otfrom06:05:15

Thanks that's helpful

👍 1
practicalli-johnny07:05:42

I've added (setq evil-want-minibuffer t) to my init.el to see how I get on with Evil in the minibuffer (its like a whole new world 🙂 )

👍 1
hkjels08:05:13

I don’t see it mentioned here, but if you decide to go with evil, you should also add evil-collection or else you’ll have a awkward mix of emacs-bindings and vim-bindings all over the place

practicalli-johnny08:05:33

Spacemacs includes quite a few evil packages and I definately recommend evil-cleverparens for Clojure and other lisp syntaxes, as it respects your parens

evil-anzu
        evil-args
        evil-collection
        evil-cleverparens
        evil-ediff
        evil-escape
        evil-exchange
        evil-goggles
        evil-iedit-state
        evil-indent-plus
        evil-lion
        evil-lisp-state
        evil-nerd-commenter
        evil-matchit
        evil-numbers
        evil-surround
        evil-textobj-line
        evil-tutor
        (evil-unimpaired :location (recipe :fetcher local))
        evil-visual-mark-mode
        evil-visualstar

otfrom15:05:58

at what point on my evil journey do I stop doing jjjjjjjjjjjjjjjjjjjjjj and kkkkkkkkkkkkkkkk?

practicalli-johnny16:05:26

when you start doing 21j or 21k 😆 turning on relative numbers helps jump to a line that is x number of lines away.

otfrom16:05:42

yeah, I've got that turned on already. It can be a bit fun with folding in some modes.

otfrom16:05:19

mostly I was wondering when I'd stop forgetting to hit ESC before hitting normal mode keys

practicalli-johnny16:05:08

visual-line-numbers should work better when using truncated lines (wrapped text), it should only show line numbers for distinct lines evil-escape is a nice package that allows an Esc key binding short-cut on the center row of the keyboard, e.g. fd , although it does take a little practice as they have to be presses in very quick succession

practicalli-johnny16:05:03

Or just buy a Keyboardio model01 keyboard (or the https://shop.keyboard.io/) with the Esc key near the left index key (I can probably do you a good deal on a second hand one, as I have 3 of them)

practicalli-johnny16:05:44

I like the http://keyboard.io keyboards, they are vim-tastic. I have 3 model01 keyboards, 2 atreus keyboards (for all the travelling - when I start doing that again) and have a couple of Model 100's coming when they have been manufactured later this year.

practicalli-johnny16:05:18

I could sell off the model01s and replace them with the model100s