Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d1e420e456
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (41 sloc) 1.689 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
;; marker at 80 chars
;;(require 'column-marker)
;;(column-marker-1 80)
(require 'fill-column-indicator)
(add-hook 'after-change-major-mode-hook 'fci-mode)
(setq-default fill-column 80)
(setq fci-rule-column 80)

(require 'visible-mark)
(add-hook 'after-change-major-mode-hook 'visible-mark-mode)

;; ido makes competing buffers and finding files easier
;; http://www.emacswiki.org/cgi-bin/wiki/InteractivelyDoThings
(require 'ido)
;; more flexible matching
(setq ido-enable-flex-matching t)
(setq ido-file-extensions-order '(".c" ".cpp" ".py" ".java"))
(setq
  ido-ignore-buffers ;; ignore these guys
  '("\\` " "^\*Mess" "^\*Back" ".*Completion" "^\*Ido" "^\*trace"
    "^\*compilation" "^\*GTAGS" "^session\.*" "^\*"))
(setq ido-case-fold t) ; be case-insensitive
(setq ido-max-work-file-list 50) ; remember many
(setq ido-enable-last-directory-history t) ; remember last used dirs
(setq ido-max-work-directory-list 50) ; should be enough
(setq ido-work-directory-list '("~/" "~/src"))
(ido-mode 'both) ;; for buffers and files

;; ido-use-filename-at-point nil ; don't use filename at point (annoying)
;; ido-use-url-at-point nil ; don't use url at point (annoying)


(require 'recentf)
 
;; bind recent file open to F7
(global-set-key (kbd "<f7>") 'ido-recentf-open)
 
;; enable recent files mode.
(recentf-mode t)
 
; 50 files ought to be enough.
(setq recentf-max-saved-items 50)
 
(defun ido-recentf-open ()
  "Use `ido-completing-read' to \\[find-file] a recent file"
  (interactive)
  (if (find-file (ido-completing-read "Find recent file: " recentf-list))
      (message "Opening file...")
    (message "Aborting")))

(provide 'other)
Something went wrong with that request. Please try again.