various fixes
[dot-emacs] / init.el
diff --git a/init.el b/init.el
index d2411eb0ee0fd6f7f9c8be6f79d0645074ff1dbc..6b9094f3983550ebbb26f913042eacc58772cff5 100644 (file)
--- 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 "<C-backspace>") '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 "<M-return>") '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 "<C-M-return>") 'newline-anywhere-previous)
-
 ;;;;; C-space - org-edit-special
 
   ;; commented due to new keyboard needing ctrl-space for mark