Compare commits
No commits in common. "4e7d759e25ab922bcbc3a78bdbe53a0e6acf885b" and "038ec85e0e554a45352cc7c16c0118e2cb3413ba" have entirely different histories.
4e7d759e25
...
038ec85e0e
3 changed files with 3 additions and 30 deletions
19
ha-evil.org
19
ha-evil.org
|
|
@ -193,29 +193,12 @@ I am not a long term VI user, and don’t have much need for any of its control
|
||||||
;; I have better window control:
|
;; I have better window control:
|
||||||
(kbd "C-w") 'sp-kill-region))
|
(kbd "C-w") 'sp-kill-region))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Evil Escape
|
|
||||||
I find that myself not noticing I’m in /insert/ mode, and start typing =j= repeatedly to go down a line, and end up typing something like: =jjjjjjjjjjjj=.
|
|
||||||
|
|
||||||
To remedy this, I’m using the [[https://www.emacswiki.org/emacs/KeyChord][KeyChord]] code:
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
|
||||||
(use-package key-chord
|
|
||||||
:config
|
|
||||||
(setq key-chord-two-keys-delay 0.1)
|
|
||||||
|
|
||||||
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
|
|
||||||
(key-chord-define evil-insert-state-map "jj" 'evil-normal-state)
|
|
||||||
(key-chord-define evil-insert-state-map "kk" 'evil-normal-state)
|
|
||||||
|
|
||||||
(key-chord-mode 1))
|
|
||||||
#+END_SRC
|
|
||||||
** Evil Text Object Line
|
** Evil Text Object Line
|
||||||
Delete a line, ~d d~ is in basic VI. Since some commands use text objects, and the basic text object doesn’t include lines, the [[https://github.com/emacsorphanage/evil-textobj-line][evil-textobj-line]] project adds that:
|
Delete a line, ~d d~ is in basic VI. Since some commands use text objects, and the basic text object doesn’t include lines, the [[https://github.com/emacsorphanage/evil-textobj-line][evil-textobj-line]] project adds that:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package evil-textobj-line)
|
(use-package evil-textobj-line)
|
||||||
#+end_src
|
#+end_src
|
||||||
Now ~v i l~ selects the line without initial/trailing whitespace, and ~v a l~ selects the line with spaces, and ~S-v~ selects the line with the final carriage return. Is this much of an improvement? Well, wrapping a line in parenthesis, is just ~y s i l )~
|
Now ~v i l~ and ~v a l~ works as you’d expect, but does this improve on ~S-v~?
|
||||||
** Text Objects based on Indentation
|
** Text Objects based on Indentation
|
||||||
The [[https://github.com/TheBB/evil-indent-plus][evil-indent-plus]] project creates text objects based on the indentation level, similar to how the ~b~ works with “blocks” of code.
|
The [[https://github.com/TheBB/evil-indent-plus][evil-indent-plus]] project creates text objects based on the indentation level, similar to how the ~b~ works with “blocks” of code.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
|
||||||
|
|
@ -122,9 +122,7 @@ Now we can load, instantiate it, as well as create a callback loop to call =upda
|
||||||
And bind a key to the mute ability that works good for both keyboards:
|
And bind a key to the mute ability that works good for both keyboards:
|
||||||
|
|
||||||
#+BEGIN_SRC lua
|
#+BEGIN_SRC lua
|
||||||
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "M", function()
|
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "M", spoon.Zoom:toggleMute)
|
||||||
spoon.Zoom:toggleMute()
|
|
||||||
end)
|
|
||||||
|
|
||||||
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "M", function()
|
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "M", function()
|
||||||
spoon.Zoom:toggleMute()
|
spoon.Zoom:toggleMute()
|
||||||
|
|
@ -192,14 +190,6 @@ Not that we could also do something for Wake:
|
||||||
end
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Oh, and here is a helper for [[file:laptop_keyboard.kbd][kanata]] to put the display to sleep:
|
|
||||||
|
|
||||||
#+BEGIN_SRC lua
|
|
||||||
hs.hotkey.bind({}, "F16", function()
|
|
||||||
hs.execute("pmset displaysleepnow")
|
|
||||||
end)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* Monitors
|
* Monitors
|
||||||
My company gave me a nice monitor … maybe a little too nice, as I don’t care to shift my neck to the extreme sides (serious first-world problem), so here I can /center/ a window Keeping it my field of view:
|
My company gave me a nice monitor … maybe a little too nice, as I don’t care to shift my neck to the extreme sides (serious first-world problem), so here I can /center/ a window Keeping it my field of view:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
(deflayer SYMBOLS
|
(deflayer SYMBOLS
|
||||||
esc 🔅 🔆 F3 F4 f5 f16 ◀◀ ▶⏸ ▶▶ 🔇 🔉 🔊
|
esc 🔅 🔆 F3 F4 f5 f6 ◀◀ ▶⏸ ▶▶ 🔇 🔉 🔊
|
||||||
_ f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 _ _ _
|
_ f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 _ _ _
|
||||||
_ S-1 S-2 { } S-\ F16 F17 F18 F19 pgup _ _ _
|
_ S-1 S-2 { } S-\ F16 F17 F18 F19 pgup _ _ _
|
||||||
_ S-3 S-4 S-9 S-0 ` left down up right pgdn _ _
|
_ S-3 S-4 S-9 S-0 ` left down up right pgdn _ _
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue