Skip to content

Instantly share code, notes, and snippets.

@etherald
Created July 29, 2016 14:00
Show Gist options
  • Save etherald/3f57bcb581f866b0b341944736d5453a to your computer and use it in GitHub Desktop.
Save etherald/3f57bcb581f866b0b341944736d5453a to your computer and use it in GitHub Desktop.
;;; ido-isearch-ibuffer.el --- isearch ibuffer with ido
;; Copyright (C) 2014
;; Author : ET Herald <web@etherald.com>
;; Keywords: buffer, ido, switch, search
;; URL:
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Overview
;; --------
;; `ido-isearch-ibuffer.el` searches the ibuffer list using ido completion.
(require 'ido)
(require 'ibuffer)
(defun ido-isearch-ibuffer ()
(interactive)
(unless (eq major-mode 'ibuffer-mode) (ibuffer))
(ibuffer-update nil t)
(with-current-buffer "*Ibuffer*"
(goto-char (point-min))
(search-forward
(ido-read-buffer "Buffer name: "))))
(global-set-key (kbd "M-\\") 'ido-isearch-ibuffer)
;;(add-hook 'ibuffer-hook #'ido-isearch-ibuffer)
(provide 'ido-isearch-ibuffer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment