From a26bf7fee70786c51a4a0a9485212c6430d02f6b Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 28 Jun 2019 17:57:50 -0400 Subject: [PATCH] various fixes --- ian-notes.org | 156 +++++++++++++++++++++++++------------------------- init.el | 38 +++++++----- 2 files changed, 102 insertions(+), 92 deletions(-) diff --git a/ian-notes.org b/ian-notes.org index 347b3db..1dfb3c1 100644 --- a/ian-notes.org +++ b/ian-notes.org @@ -1803,84 +1803,87 @@ plan to use calc. * keybind tables - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | left primary | C- | M- | C-M- | C-S- | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | 2 | copy-symbol | shell-cd-to-file | --- | | - | 3 | dot-mode-execute | | recenter-top-bottom | | - | q | org-cycle, comint previous arg | org-archive-to-archive-sibling | quoted-insert | | - | w | goto-t.org | org-clock-in | | | - | e | copy-line | org-clock-in-last | | | - | r | isearch-backward | org-clock-out | | | - | a | copy-all | | | | - | s | C-x prefix | | split-window-vertically | | - | d | C-c prefix | | swap buffer | | - | f | kill-whole-line | print-var-at-point | kill rest of line | | - | g | other-window / cancel | abort-recursive-edit | gnus | | - | z | undo-tree-undo | | | | - | x | kill-region | append-next-kill | append-next-kill | | - | c | copy | org-capture | copy-to-register | | - | v | yank | insert-register | yank pop | | - | b | delete-other-windows | isearch-backward-current-symbol | isearch-current-symbol | | - | tab | yas-insert-snippet | indent line | | | - | delete | kill-symbol | | kill-sexp | | - | left-arrow | compile | | org-shiftup | | - | right-arrow | paste selection | | org-shiftdown | | - | backspace | backward-kill-symbol | | backward-kill-sexp | | - | f7 | | | | | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | right primary | C- | M- | C-M- | C-S- | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | * | split-window-horizontally | | calc-dispatch | | - | 9 | delete-window-or-exit | kill-buffer-and-window | kill client buffer | | - | u | universal-argument | | search-keybind | | - | i | ----- | | query-replace-regexp | | - | o | occur | | counsel-imenu | | - | p | move-mouse-to-point | | delete-horizontal-space | | - | j | pop-to-mark | previous-error | register prefix | | - | k | jump to register | next-error | man | | - | l | ivy-switch-buffer | | move cursor top bottom mid | | - | ; | comment-dwim | comment-dwim | comment-current-line-dwim | | - | m | | | recursive grep | | - | , | counsel-find-file | | find-file-in-project | | - | . | recentf-ido-find-file | | - | | - | / | join lines | | copy-variable | | - | 8 | calc-embedded-word | | | | - | up-arrow | back defun/headline | | | winner undo | - | down-arrow | forward dfun/headline | | toggle-mark-activation | smex-major-mode-commands | - | lbracket | ---- | | scroll-right | | - | rbracket | fill-paragraph | | scroll-left | | - | return | newline next line | non-indented newline | open newline on previous line | | - | space | org-edit-special | | spell check word | | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | left secondary | C- | M- | C-M- | C-S- | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | = | | | | | - | 1 | | | | | - | 4 | | | widen | | - | 5 | | | | | - | tab-key | query-replace | | | | - | t | org change todo state | | org insert timestamp | | - | home | start of buffer | | | | - | end | end of buffer | | | | - | f9 | | | | | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | right secondary | C- | M- | C-M- | C-S- | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| - | 6 | save-buffers-kill-emacs | | insert-small-copyright | | - | 7 | | | insert-full-copyright | | - | 0 | text-scale-reset | | insert-apache | | - | - | | | org-edit-src-exit | | - | y | undo-tree-redo | | | | - | \ | sr-speedbar-toggle | | mark-defun | | - | h | help-prefix | | | | - | ' | eval-expression | | | | - | n | unpop-to-mark-command | | narrow-to-region | | - | rshift | | | | | - | escape | find-tag | | | | - |-----------------+--------------------------------+---------------------------------+-------------------------------+--------------------------| + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | left primary | C- | M- | C-M- | C-S- | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | 2 | copy-symbol | shell-cd-to-file | --- | | + | 3 | dot-mode-execute | | recenter-top-bottom | | + | q | mode specific | org-archive-... | quoted-insert | | + | w | find-file | org-clock-in | | | + | e | copy-line | org-clock-in-last | | | + | r | isearch-backward | org-clock-out | | | + | a | copy-all | | | | + | s | C-x prefix | | split-window-vertically | | + | d | C-c prefix | | swap buffer | | + | f | kill-whole-line | print-var-at-point | kill rest of line | | + | g | other-window / cancel | abort-recursive-edit | gnus | | + | z | undo-tree-undo | | | | + | x | kill-region | append-next-kill | append-next-kill | | + | c | copy | org-capture | copy-to-register | | + | v | yank | insert-register | yank pop | | + | b | delete-other-windows | search back symbol | isearch-current-symbol | | + | tab | --- | indent line | | | + | delete | kill-symbol | | kill-sexp | | + | left-arrow | backward-symbol | | org-shiftup | | + | right-arrow | forward-symbol | | org-shiftdown | | + | backspace | backward-kill-symbol | | backward-kill-sexp | | + | f7 | | | | | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | right primary | C- | M- | C-M- | C-S- | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | * | split-window-horizontally | | calc-dispatch | | + | 9 | delete-window-or-exit | kill-buffer-and-window | kill client buffer | | + | u | universal-argument | | search-keybind | | + | i | | | query-replace-regexp | | + | o | occur | | counsel-imenu | | + | p | move-mouse-to-point | | delete-horizontal-space | | + | j | pop-to-mark | previous-error | register prefix | | + | k | jump to register | next-error | man | | + | l | ivy-switch-buffer | | cursor top bottom mid | | + | ; | comment-dwim | comment-dwim | comment line | | + | m | | | recursive grep | | + | , | counsel-find-file | | find-file-in-project | | + | . | recentf-ido-find-file | | - | | + | / | join lines | | copy-variable | | + | 8 | calc-embedded-word | | | | + | up-arrow | back defun/headline | | | winner undo | + | down-arrow | forward dfun/headline | | toggle-mark-activation | smex-major-mode | + | lbracket | ---- | | scroll-right | | + | rbracket | fill-paragraph | | scroll-left | | + | return | newline next line | newline plain | | | + | space | org-edit-special | | spell check word | | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | left secondary | C- | M- | C-M- | C-S- | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | = | | | | | + | 1 | | | | | + | 4 | | | widen | | + | 5 | | | | | + | tab-key | query-replace | | | | + | t | org change todo state | | org insert timestamp | | + | home | start of buffer | | | | + | end | end of buffer | | | | + | f9 | | | | | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | right secondary | C- | M- | C-M- | C-S- | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| + | 6 | save-buffers-kill-emacs | | insert-small-copyright | | + | 7 | | | insert-full-copyright | | + | 0 | text-scale-reset | | insert-apache | | + | - | | | org-edit-src-exit | | + | y | undo-tree-redo | | | | + | \ | sr-speedbar-toggle | | mark-defun | | + | h | help-prefix | | | | + | ' | eval-expression | | | | + | n | unpop-to-mark-command | | narrow-to-region | | + | rshift | | | | | + | escape | find-tag | | | | + |-----------------+---------------------------+------------------------+-------------------------+-----------------| * keybind notes +todo: + + common keys, which would be better off doing swaps than rebinds: c-x prefix -> c-s c-c prefix -> c-d @@ -1899,7 +1902,6 @@ occur command to make more accessible, ... - * TESTING / DEVELOPMENT AREA (defun comint-send-string (process string) diff --git a/init.el b/init.el index d2411eb..6b9094f 100644 --- a/init.el +++ b/init.el @@ -969,7 +969,7 @@ and Ian Kelling as the name" ;; and git will automatically remove it unless i manually disable it. mail-signature " --- +-- Ian Kelling | Senior Systems Administrator, Free Software Foundation GPG Key: B125 F60B 7B28 7FF6 A2B7 DF8F 170A F0E2 9542 95DF https://fsf.org | https://gnu.org @@ -2360,6 +2360,7 @@ indent yanked text (with prefix arg don't indent)." (dolist (r `( (?i (file . ,"~/.emacs.d/init.el")) + (?w (file . ,"/a/work.org")) (?t (file . ,"/a/t.org")) (?x (file . ,"/a/x.txt")) )) @@ -2372,6 +2373,12 @@ indent yanked text (with prefix arg don't indent)." ;;; keybinds ;;;; misc + + (define-prefix-command 'terminal-key-map) + (global-set-key (kbd "\e[") 'terminal-key-map) + + + (global-set-key (kbd "C-x C-b") 'ibuffer) @@ -2803,8 +2810,10 @@ modes like org-mode which have their own yank function." (global-set-key (kbd "C-M-q") 'quoted-insert) -;;;;; C-w --- - ;; in terminal, it's ctrl-backspace, duplicate keybind. +;;;;; C-w + + (global-set-key (kbd "C-w") 'counsel-find-file) + ;;;;; M-w org-clock-in (global-set-key (kbd "M-w") 'org-clock-in) @@ -3130,6 +3139,9 @@ modes like org-mode which have their own yank function." ;;;;; C-backspace - backward-kill-symbol + (define-key terminal-key-map (kbd "4b") 'backward-kill-symbol) ;c-backspace in my konsole + + ;; c-w is duplicate in terminal (global-set-key (kbd "") 'backward-kill-symbol) (add-hook 'comint-mode-hook (lambda () @@ -3200,7 +3212,8 @@ modes like org-mode which have their own yank function." (delete-windows-on "*Help*") )) -;;;;; C-i - ----- +;;;;; C-i - + (define-key input-decode-map [?\C-i] [C-i]) ;;;;; C-M-i - query-replace-regexp (global-set-key (kbd "C-M-i") 'query-replace-regexp) @@ -3291,13 +3304,16 @@ modes like org-mode which have their own yank function." (move-beginning-of-line 2)) (global-set-key (kbd "C-M-;") 'comment-current-line-dwim) +;;;;; C-m +(define-key input-decode-map [?\C-m] [C-m]) ;;;;; C-M-m - recursive grep (define-key global-map (kbd "C-M-m") 'rgrep) -;;;;; C-, - counsel-find-file +;;;;; C-, - --- +;; not recognized by terminal, can't get konsole keydef file to recognize comma, +;; todo: dig into konsole sources, or try newer version than t8 - (global-set-key (kbd "C-,") 'counsel-find-file) (add-hook 'flyspell-mode-hook (lambda () (define-key flyspell-mode-map (kbd "C-,") nil))) @@ -3330,6 +3346,7 @@ modes like org-mode which have their own yank function." (add-hook 'flyspell-mode-hook (lambda () (define-key flyspell-mode-map (kbd "C-.") nil))) (define-key dot-mode-map (kbd "C-.") nil) + (define-key terminal-key-map (kbd "4c") 'recentf-ido-find-file) (global-set-key (kbd "C-.") 'recentf-ido-find-file) (add-hook 'php-mode-hook (lambda () (define-key php-mode-map (kbd "C-.") nil))) @@ -3465,15 +3482,6 @@ modes like org-mode which have their own yank function." (global-set-key (kbd "") 'plain-newline) -;;;;; C-M-return - newline-anywhere-previous - (defun newline-anywhere-previous () - "Add a newline from anywhere in the line." - (interactive) - (forward-line -1) - (end-of-line) - (newline-and-indent)) - (global-set-key (kbd "") 'newline-anywhere-previous) - ;;;;; C-space - org-edit-special ;; commented due to new keyboard needing ctrl-space for mark -- 2.30.2