Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Commit missing file

  • Loading branch information...
commit b0d86c7e9edbe56eb09fb0907930eb27266882ca 1 parent fbd3942
Michael Klishin authored

Showing 1 changed file with 113 additions and 0 deletions. Show diff stats Hide diff stats

  1. +113 0 initializers/kbd_initializer.el
113 initializers/kbd_initializer.el
... ... @@ -0,0 +1,113 @@
  1 +;;; Text manipulation
  2 +
  3 +(global-set-key (kbd "C-M-h") 'backward-kill-word)
  4 +(global-set-key (kbd "C-c l") (lambda () (interactive) (insert "lambda")))
  5 +(global-set-key (kbd "C-x \\") 'align-regexp)
  6 +(global-set-key (kbd "M-/") 'hippie-expand)
  7 +(global-set-key (kbd "C-c n") (lambda () (interactive)
  8 + (delete-trailing-whitespace)
  9 + (untabify-buffer)))
  10 +
  11 +(global-set-key (kbd "C-x :") 'ispell-buffer)
  12 +(global-set-key (kbd "C-x ;") 'ispell-region)
  13 +(global-set-key (kbd "M-DEL") 'backward-kill-word)
  14 +
  15 +(global-set-key (kbd "C-c C-p b") 'gist-buffer-private)
  16 +(global-set-key (kbd "C-c C-p r") 'gist-region-private)
  17 +(global-set-key (kbd "C-c C-p f") 'gist-fetch)
  18 +
  19 +;;; Text indentation
  20 +
  21 +(global-set-key (kbd "C-M-\\") 'indent-buffer)
  22 +
  23 +;;; Navigation
  24 +
  25 +(global-set-key (kbd "M-g") 'goto-line)
  26 +(global-set-key (kbd "C-x C-r") 'jump-to-register)
  27 +(global-set-key (kbd "C-s") 'isearch-forward-regexp)
  28 +(global-set-key (kbd "C-r") 'isearch-backward-regexp)
  29 +(global-set-key (kbd "C-M-s") 'isearch-forward)
  30 +(global-set-key (kbd "C-M-r") 'isearch-backward)
  31 +
  32 +(global-set-key (kbd "C-x C-i") 'imenu)
  33 +(global-set-key (kbd "C-c C-o") 'browse-url-at-point)
  34 +
  35 +
  36 +;;; Buffers, files and directories management
  37 +
  38 +(defun switch-to-other-buffer ()
  39 + (interactive)
  40 + (switch-to-buffer (other-buffer)))
  41 +(global-set-key (kbd "C-'") 'switch-to-other-buffer)
  42 +(global-set-key (kbd "C-|") 'switch-to-other-buffer)
  43 +
  44 +(global-set-key (kbd "M-t") 'far-search)
  45 +
  46 +(global-set-key (kbd "C-x C-f") 'ido-find-file)
  47 +(global-set-key (kbd "C-x M-f") 'ido-find-file-other-window)
  48 +(global-set-key (kbd "C-x d") 'ido-dired)
  49 +(global-set-key (kbd "C-c r") 'revert-buffer)
  50 +(global-set-key (kbd "C-c C-[") 'find-file-recursively)
  51 +;;(global-set-key (kbd "C-c C-]") 'find-file-in-project)
  52 +(global-set-key (kbd "C-x C-p") 'find-file-at-point)
  53 +(global-set-key (kbd "C-M-k") 'bury-buffer)
  54 +;; Rebind `C-x C-b' for `ibuffer'
  55 +(global-set-key (kbd "C-x C-b") 'ibuffer)
  56 +(global-set-key (kbd "C-c d c") 'make-directory)
  57 +
  58 +(global-set-key (kbd "C-c g l") 'lgrep)
  59 +(global-set-key (kbd "C-c g r") 'rgrep)
  60 +(global-set-key (kbd "C-c g d") 'find-grep-dired)
  61 +(global-set-key (kbd "C-c g f") 'find-grep)
  62 +(global-set-key (kbd "C-c g g") 'grep)
  63 +
  64 +(global-set-key (kbd "C-h g") 'man)
  65 +
  66 +;;; Window management
  67 +
  68 +(global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1)))
  69 +(global-set-key (kbd "C-x C-o") (lambda () (interactive) (other-window 2)))
  70 +(global-set-key (kbd "C-x .") (lambda () (interactive) (enlarge-window 1 t)))
  71 +(global-set-key (kbd "C-x ,") (lambda () (interactive) (shrink-window 1 t)))
  72 +
  73 +(global-set-key (kbd "C-x M-k") (lambda () (interactive) (kill-buffer (current-buffer)) (delete-window)))
  74 +
  75 +
  76 +;; Compilation
  77 +
  78 +(global-set-key (kbd "C-c C-r") 'compile)
  79 +(global-set-key (kbd "M-<f9>") 'compile)
  80 +
  81 +
  82 +;; Version control
  83 +
  84 +(global-set-key (kbd "C-x C-g") 'magit-status)
  85 +
  86 +
  87 +;; Web
  88 +
  89 +(global-set-key (kbd "C-x w") 'browse-url-default-macosx-browser)
  90 +(global-set-key (kbd "C-c o") 'google-region)
  91 +
  92 +
  93 +;;; Utility
  94 +
  95 +(global-set-key (kbd "C-c p") (lambda () (interactive) (message "%s" (point))))
  96 +(global-set-key (kbd "C-c b") 'bookmark-jump)
  97 +(global-set-key (kbd "C-c B") 'bookmark-set)
  98 +(global-set-key [f1] 'menu-bar-mode)
  99 +(define-key read-expression-map (kbd "TAB") #'lisp-complete-symbol)
  100 +(global-set-key (kbd "C-h a") 'apropos)
  101 +;;(global-set-key (kbd "C-c a") (lambda () (interactive) (switch-or-start 'autotest "*autotest*")))
  102 +;;(global-set-key (kbd "C-c j") (lambda () (interactive) (switch-or-start 'jabber-connect "*-jabber-*")))
  103 +;;(global-set-key (kbd "C-c J") 'jabber-send-presence)
  104 +;;(global-set-key (kbd "C-c e") 'elunit)
  105 +;;(global-set-key (kbd "C-c x") 'elunit-explain-problem)
  106 +
  107 +(define-key isearch-mode-map (kbd "C-o") ;; occur easily inside isearch
  108 + (lambda ()
  109 + (interactive)
  110 + (let ((case-fold-search isearch-case-fold-search))
  111 + (occur (if isearch-regexp isearch-string (regexp-quote isearch-string))))))
  112 +
  113 +(provide 'my-bindings)

0 comments on commit b0d86c7

Please sign in to comment.
Something went wrong with that request. Please try again.