Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
--- a/.emacs-my Wed May 21 16:09:02 2014 +0300
+++ b/.emacs-my Wed May 21 20:07:17 2014 +0300
@@ -811,7 +811,31 @@
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "selecting/switching, creating, killing buffers")
+(message "selecting/switching, creating/killing buffers, open file")
+(message "ido, ffap")
+
+;; Loaded and used by ido.
+;; (require 'ffap)
+
+(require 'ido)
+
+(setq ido-enable-flex-matching t)
+
+(setq ido-use-filename-at-point 'guess)
+(setq ido-use-url-at-point t)
+(setq ido-enable-tramp-completion t)
+(setq ido-use-virtual-buffers t)
+
+(setq ido-create-new-buffer 'always)
+
+(setq ido-file-extensions-order '(".java" ".c" ".py" ".xml" ".txt" ".el" ".ini" ".cfg" ".cnf" ".log"))
+
+(setq ido-ignore-buffers
+ '("\\` "))
+;; ido-ignore-directories
+;; ido-ignore-files
+
+(ido-mode 1)
(global-set-key [?\C-x right] 'next-buffer)
(global-set-key [?\C-x left] 'previous-buffer)
@@ -831,20 +855,6 @@
(other-window -1)))
(global-set-key [?\C-x down] 'other-window)
-(iswitchb-mode 1)
-(setq iswitchb-regexp t)
-(setq iswitchb-use-virtual-buffers t)
-(setq iswitchb-buffer-ignore
- '("^ "
- "^\\*Buffer"
- "^\\*Completions\\*"
- "^\\*tramp"
- "^\\*Dired log\\*"
- "^\\*Quail Completions\\*"
- "^\\*Disabled Command\\*"
- "^TAGS"
- ))
-
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
(setq uniquify-separator "|")
@@ -859,14 +869,6 @@
(icomplete-mode 1)
(setq icomplete-with-completion-tables t)
-(mapc (lambda (ext) (add-to-list 'completion-ignored-extensions ext))
- '(
- ".class" "~" ".aux"
- ".o" ".obj" ".map" ".lib" ".lo" ".la" ".a" ".bin" ".exe"
- ;; Place dir at end to appear at the start of completion-ignored-extensions.
- "CVS/" ".hg/" ".svn/" ".git/" ".bzr/"
- ) )
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "completion")
@@ -888,27 +890,13 @@
;; (mapc 'yas/load-directory yas/root-directory)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "open file, ffap, dired")
+(message "dired")
(setq-default save-place t)
(require 'saveplace)
(require 'dired)
-(require 'ffap)
-(ffap-bindings)
-
-;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file,
-;; because when file if directory find-file load dired, if regular file open it.
-(global-set-key (kbd "C-x C-f") 'find-file-at-point)
-(global-set-key (kbd "C-x C-d") 'find-file-at-point)
-(global-set-key (kbd "C-x d") 'find-file-at-point)
-
-;; Stop 'ffap' in Dired as its suggestion is inconvenient.
-(define-key dired-mode-map (kbd "C-x C-f") 'find-file)
-(define-key dired-mode-map (kbd "C-x C-d") 'find-file)
-(define-key dired-mode-map (kbd "C-x d") 'find-file)
-
(setq dired-dwim-target t)
;; dangerous
;; (setq
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs-obsolete Wed May 21 20:07:17 2014 +0300
@@ -0,0 +1,44 @@
+;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*-
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(iswitchb-mode 1)
+
+(setq iswitchb-regexp t)
+(setq iswitchb-use-virtual-buffers t)
+(setq iswitchb-buffer-ignore
+ '("^ "
+ "^\\*Buffer"
+ "^\\*Completions\\*"
+ "^\\*tramp"
+ "^\\*Dired log\\*"
+ "^\\*Quail Completions\\*"
+ "^\\*Disabled Command\\*"
+ "^TAGS"
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'ffap)
+(ffap-bindings)
+
+;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file,
+;; because when file if directory find-file load dired, if regular file open it.
+(global-set-key (kbd "C-x C-f") 'find-file-at-point)
+(global-set-key (kbd "C-x C-d") 'find-file-at-point)
+(global-set-key (kbd "C-x d") 'find-file-at-point)
+
+;; Stop 'ffap' in Dired as its suggestion is inconvenient.
+(define-key dired-mode-map (kbd "C-x C-f") 'find-file)
+(define-key dired-mode-map (kbd "C-x C-d") 'find-file)
+(define-key dired-mode-map (kbd "C-x d") 'find-file)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(mapc (lambda (ext) (add-to-list 'completion-ignored-extensions ext))
+ '(
+ ".class" "~" ".aux"
+ ".o" ".obj" ".map" ".lib" ".lo" ".la" ".a" ".bin" ".exe"
+ ;; Place dir at end to appear at the start of completion-ignored-extensions.
+ "CVS/" ".hg/" ".svn/" ".git/" ".bzr/"
+ ) )