agzam / .spacemacs.d

spacemacs config and layers
9 stars 1 forks source link

Use your `ag-lang-tools` without spacemacs. #1

Open hongyi-zhao opened 3 years ago

hongyi-zhao commented 3 years ago

I noticed you mentioned here the usage of combining mw-thesaurus and sdcv, and the corresponding Spacemacs layer. But in my situation, I use the vanilla Emacs configured by myself from scratch, instead of the Spacemacs. But I'm really interested in trying out your configuration. It seems the core configurations are stored in the file packages.el. Any hints for use this file lonely?

Regards, HY

agzam commented 3 years ago

Spacemacs layers are just neatly organized collections of elisp packages. packages.el you're pointing to is basically a "meta" package.

Of course one can cherry pick whatever they want from there. Mostly, you want to grab things within use-package blocks. What exactly are you confused about?

hongyi-zhao commented 3 years ago

Of course one can cherry pick whatever they want from there. Mostly, you want to grab things within use-package blocks. What exactly are you confused about?

Thank you. This is what I've done finally. And I've successfully set up most of them according to my requirements.

Another question is the following strange short key setting:

https://github.com/agzam/.spacemacs.d/blob/dfb51a04f8f6dfab3411d8003e52a0cb07558ce5/layers/ag-lang-tools/packages.el#L103

Any hints for setting, grouping, invoking, and management a lot of personal customized shortcut keys?

Regards, HY

agzam commented 3 years ago

Another question is the following strange short key setting:

That particular bit as you probably guessed is specific to Spacemacs. In Spacemacs there's a lead key (by default set to SPC - hence the name). Basically, pressing "SPC x l d" sequence would call (define-it-at-point) function.

hongyi-zhao commented 3 years ago

Basically, pressing "SPC x l d" sequence would call (define-it-at-point) function.

Is this achieved by hydra in mechanism?

agzam commented 3 years ago

Any hints for setting, grouping, invoking, and management a lot of personal customized shortcut keys?

That's a dense question. Without knowing your preferences, your setup - is it based on vanilla Emacs; Doom; Spacemacs; Prelude; maybe something else? It is hard to answer that question (sometimes, even knowing all that).

If you ask me, I am a die-hard Vimmer. I am completely sold on the idea of modality. I use Spacemacs and I would try to find good, easily recognizable mnemonically and ergonomically right combination of keys. For example, you may have noticed, most language related things in my config are collected under "SPC xl". "SPC x" in Spacemacs is used for "text related things", and I chose "l" for "language". So, "SPC xll" - runs sdcv-search-at-point, "SPC xlm" - Merriam-Webster thesaurus, etc.

agzam commented 3 years ago

Is this achieved by hydra in mechanism?

Similar mechanism, but no, not hydra. AFAIK Spacemacs uses evil and evil-leader.

hongyi-zhao commented 3 years ago

So, "SPC xll" - runs sdcv-search-at-point, "SPC xlm" - Merriam-Webster thesaurus, etc.

According to your above explanation, why not take the following easier to remember, more consistent way?

"SPC xls" - runs sdcv-search-at-point

agzam commented 3 years ago

According to your above explanation, why not take the following more recognizable mnemonically and consistent way? "SPC xls" - runs sdcv-search-at-point

Ha, because x and s are too close to each other. Pressing them quickly after each other is very inconvenient. And for something I use very often I usually would try to find double letter combinations. Like for example SPC xx is bound to flyspell-correct-at-point - I do use that a lot.

hongyi-zhao commented 3 years ago

Good idea, but combination and permutation theory limits your total available key binding number when you use too many repeated characters.