emacs: key-binding
authorPeng Li <seudut@gmail.com>
Mon, 1 Jun 2015 12:07:59 +0000 (20:07 +0800)
committerPeng Li <seudut@gmail.com>
Mon, 1 Jun 2015 12:07:59 +0000 (20:07 +0800)
emacs.d/config/init-elscreen.el
emacs.d/config/init-key-binding.el
emacs.d/init.el

index 18d5607..6aba31c 100644 (file)
@@ -3,13 +3,6 @@
 
 (elscreen-set-default-directory (elscreen-get-current-screen) "~/")
 
-;; change default keybinding
-(global-set-key (kbd "<M-tab>") 'elscreen-next) ;; "C-M-I"
-(global-set-key (kbd "M-n") 'elscreen-next)
-(global-set-key (kbd "M-p") 'elscreen-previous)
-(global-set-key (kbd "M-t") 'elscreen-create)
-;;; split 
-
 
 ;; tab face
 
@@ -35,6 +28,7 @@
   (cd dir)
 )
 
+    
 (defun sd-show-dir ()
   "show elscreen default directory."
   (interactive)
index 09c9f66..9e030b4 100644 (file)
@@ -1,6 +1,8 @@
+;; This  file is for some global key binding
 
-;; This is file is for some global key binding
-;; Super key binding is for some global windows/tab operations
+;;----------------------------------------------------------------------------
+;; super prefix binding for elscreen TAB/Windows operation
+;
 (setq mac-command-modifier 'super) ; make cmd key do Meta
 
 ;; super key for elscreen tabs
 
 
 
-(global-set-key (kbd "M-g M-v") 'split-window-right)
-(global-set-key (kbd "M-g M-s") 'split-window-below)
-(global-set-key (kbd "M-g M-o") 'delete-other-windows)
+;(global-set-key (kbd "M-g M-v") 'split-window-right)
+;(global-set-key (kbd "M-g M-s") 'split-window-below)
+;(global-set-key (kbd "M-g M-o") 'delete-other-windows)
 
 
-(global-set-key (kbd "M-g M-w") 'other-window)
+;(global-set-key (kbd "M-g M-w") 'other-window)
 
-;;; C-o 
+;;----------------------------------------------------------------------------
+;; C-o prefix binding for some File/Buffer switching/openning
+;;
 (global-unset-key "\C-o")
-(global-set-key (kbd "C-o C-o") 'keyboard-quit);; same as C-g to quit
+;;(global-set-key (kbd "C-o C-o") 'keyboard-quit);; same as C-g to quit
+(global-set-key (kbd "C-o C-o") 'fiplr-find-file)
 (global-set-key (kbd "C-o C-f") 'ido-find-file)
-(global-set-key (kbd "C-o C-r") 'recentf-ido-find-file)
-(global-set-key (kbd "C-o C-b") 'ido-switch-buffer)
-(global-set-key (kbd "C-o C-j") 'ido-find-file)
+(global-set-key (kbd "C-o C-n") 'recentf-ido-find-file)
+(global-set-key (kbd "C-o C-j") 'ido-switch-buffer)
+;(global-set-key (kbd "C-o C-j") 'ido-find-file)
 
 
 (global-set-key (kbd "C-o C-g") 'ggtags-find-file)
 
 (global-set-key (kbd "M-g M-g") 'magit-status)
 
-;;;;
+
+(defun recentf-ido-find-file ()
+  "Find a recent file using Ido."
+  (interactive)
+  (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
+    (when file
+      (find-file file))))
+
+
+;;----------------------------------------------------------------------------
+;; M-g prefix binding for some commands
+;;
+
+
 
 (provide 'init-key-binding)
index 1c27dc9..88b081b 100644 (file)
 
 (global-set-key (kbd "C-x f") 'fiplr-find-file)
 
-;;---------------------------------------------------------------------------------------
-;; Wind-move
-;;
-(global-set-key (kbd "C-x C-l") 'windmove-right)
-(global-set-key (kbd "C-x C-h") 'windmove-left)
-(global-set-key (kbd "C-x C-k") 'windmove-up)
-(global-set-key (kbd "C-x C-j") 'windmove-down)
 
 ;;---------------------------------------------------------------------------------------
 ;; sr-speedbar
 (require 'recentf)
 (recentf-mode 1)
 (setq recentf-max-menu-items 100)
-(defun recentf-ido-find-file ()
-  "Find a recent file using Ido."
-  (interactive)
-  (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
-    (when file
-      (find-file file))))
+
 
 (require 'recentf-ext)