(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
(cd dir)
)
+
(defun sd-show-dir ()
"show elscreen default directory."
(interactive)
+;; 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)
(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)