Skip to content

Instantly share code, notes, and snippets.

(defun linum-update-window (win)
"Update line numbers for the portion visible in window WIN."
(goto-char (window-start win))
(let ((line (line-number-at-pos))
(limit (window-end win t))
(fmt (cond ((stringp linum-format) linum-format)
((eq linum-format 'dynamic)
(let ((w (length (number-to-string
(count-lines (point-min) (point-max))))))
(concat "%" (number-to-string w) "d")))))
;;; jaunte.el --- Emacs Hit a Hint
;; Version: 20130413.219
;; 参考
;; yafastnav.el
;; vimperator
;; 設定
;; (require 'jaunte)
;; (global-set-key (kbd "C-c C-j") 'jaunte)
;;; widen-window.el --- Widen selected window
;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2003,
;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2008 Yuto Hayamizu
;; Copyright (C) 2014 Akira Tamamori
;; Author: Akira Tamamori
;; Keywords: convenience
;; Version: 0.1.2
(defun recentf-ido-find-files-and-dirs (arg)
"Find a recent file and a directory using Ido."
(interactive "P")
(let* ((show-full-path-p (cond (arg t) (t nil)))
(file-assoc-list ;表示する候補名とフルパス
(mapcar (lambda (x)
(cond ((equal (substring x (- (length x) 1) (length x)) "/") ;末尾がスラッシュ
(cons (file-name-directory x) x))
(t
(cond (show-full-path-p
;; response is a little heavy
(eval-when-compile (require 'multi-term) (require 'term))
(require 'multi-term)
(setq multi-term-program shell-file-name)
(setq multi-term-program "/usr/bin/bash.exe")
;; (setenv "CDPATH" "/")
(setenv "CDPATH" (concat (replace-regexp-in-string
"\\\\" "/" (getenv "HOME"))))
;;; framemove.el --- directional frame selection routines
;; Version: 20130328.1133
;;
;; Copyright (C) 2010
;;
;; Author: Trey Jackson (bigfaceworm@gmail.com)
;; Created: February 14, 2010
;; Keywords: frame, movement, convenience
;;
;; This file is not (yet) a part of GNU Emacs.
(require 'cl-lib)
(cl-defun split-window-vertically-n (&optional (num_wins 1))
(interactive "p")
(cond ((<= num_wins 2)
(split-window-below))
(t
(split-window-below
(- (window-height) (/ (window-height) num_wins)))
(split-window-vertically-n (- num_wins 1)))))
;; -*- Mode: Emacs-Lisp -*-
;;
;; elscreen-howm.el
;;
(defconst elscreen-howm-version "0.1.3 (September 14, 2008)")
;;
;; Author: Naoto Morishima <naoto@morishima.net>
;; Created: November 06, 2005
;; Revised: September 14, 2008
(require 'multiple-cursors)
(require 'expand-region)
(defun mc/mark-all-dwim-or-expand-region (arg)
(interactive "p")
(cl-case arg
(16 (mc/mark-all-dwim t))
(4 (mc/mark-all-dwim nil))
(1 (call-interactively 'er/expand-region))))
@tam17aki
tam17aki / popwin-fix.el
Created January 13, 2015 12:12
fix of ido-vertical-mode and popwin
(defun popwin:start-close-popup-window-timer ()
(or popwin:close-popup-window-timer
(setq popwin:close-popup-window-timer
(run-with-timer popwin:close-popup-window-timer-interval
popwin:close-popup-window-timer-interval
'popwin:close-popup-window-timer))))