Most of my code has changed a lot recently. Check updated posts.
For each post can update code listed in that post. Keep in mind code for linux and wsl configs will have their own posts, except in the case of .early-init and init.el, which have system switches (to load system specific dot-files).
Also note: abandoned convention of listing init lines. Now if you want to find the code, and there is now plenty of decent emacs code, use the search function. The site is not large.
; add some shotcuts in popup menu mode
(define-keypopup-menu-keymap (kbd"C-i") 'popup-select)
(define-keypopup-menu-keymap (kbd"C-n") 'popup-next)
(define-keypopup-menu-keymap (kbd"C-p") 'popup-previous)
Added some keys to popup as I'm now using it when company-yasnippet offers multiple selections (see yasnippet when updated for that code)
The colors don't really come into play for pos-tip and tool-tip, as company is the main force for that.
Dropped which-key entirely as Poseidon has plenty of hydras, and fewer custom keys. This frees up memory, by which I mean your memory. Also, added counsel, ivy, and ivy-rich for exploring various functions and libraries.
Original Post Below
Emacs is old school. You're either new to it - which means you wouldn't be here unless it was your type of thing - or you know what you're looking for. In either case, go to the side bar of this page and click on the 'Emacs' tag. Then read the posts from oldest to newest.
In this earlier emacs post I covered lines 534 - 656 of my configuration file. This post covers lines 664 - 769
Some Key Bindings
Emacs is all about key bindings and shortcuts. The 'macs' part is short for 'macro.' Here are a few I use.
; Rebind C-m as prefix [before any C-m bound];unest C-m from RET
(define-keyinput-decode-map [?\C-m] [C-m])
; translate it as synonymous with <apps> key
(define-keykey-translation-map (kbd"<apps>") (kbd"<C-m>"))
;create a prefix command
;set C-m as the prefix-command (note s- is also enabled now;so all C-m can be run with s-
(global-set-key (kbd"<C-m>") super-keymap)
;(bind-key "<C-m>" super-keymap);Undo Undo Default Binding
(global-set-key (kbd"M-j") 'append-lines)
;(bind-key "M-j" append-lines);Bind Kill This Buffer
;New Scratch Buffer
; remap go-to-line
(global-set-key [remapgoto-line] 'goto-line-with-feedback)
;Bind New Line Dwim (gets next line bullet, creates new line with it)
;(setq there-is-no-variable-here );describe personal key bindings
Posframe and Popup
Popup and Posframe are standard packages you need to use other packages with popup frames, like hydra. Here's the code:
(define-keypopup-menu-keymap (kbd"SPC") 'popup-select)
);end popup;tooltip popups on mouse over
;customize tooltip background
;pos-tip, scroll over popups with info
(defvarpos-tip-foreground-color"#FFC300""Default foreground color of pos-tip's tooltip.")
(defvarpos-tip-background-color"#2471A3""Default background color of pos-tip's tooltip.")
Which Key opens a frame with next letter options and explanations after you type a letter. It's great until you have a system of hydras, at which point you won't need it. I leave up as it doesn't get in the way.
:config;(which-key-setup-side-window-right);(which-key-setup-minibuffer);(setq which-key-use-C-h-commands t)
; max width of which-key frame: number of columns (an integer);(setq which-key-frame-max-width 140); max height of which-key frame: number of lines (an integer);(setq which-key-frame-max-height 120);this is supposed to improve speed with custom fonts
;just so you can read your hyrda function titles in C-m m
);end which-key;Which Key Posframe
;(setq which-key-posframe-poshandlee 'posframe-poshandler-frame-center)
That’s all for now…
As good as we are, all this free stuff takes a few minutes here and there. It would be great if you could help us out a bit with a donation! Click the button below to donate funds via PayPal. DONATE
This kind man didn't invent the term scientist so you could make a mockery of earthly geometrics! He did it because science is badass, just like him. Taking science seriously is the first step to better health and a better world for all. You can take that first step here.
"We need very much a name to describe a cultivator of science in general. I should incline to call him a Scientist." ~ William Whewell.
Seriously though, most of our sciency posts are really about computer science, namely Emacs - but don't be swayed by the Old-Skoolers. If you're choosing a text editor for the first time, Emacs is dead.
Having said all that, we use Emacs, and around here, the Earth is round.