Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Created February 29, 2012 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayato-p/bd3ad9652190830460c6 to your computer and use it in GitHub Desktop.
Save ayato-p/bd3ad9652190830460c6 to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Emacs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;load-path
(setq load-path (cons "~/.emacs.d/elisp" load-path))
;
(setq scroll-step 1)
(cd "c:/programing/scheme/")
; 対応する括弧を表示する
(show-paren-mode t)
;起動するときに起動画面を表示しない
(setq inhibit-startup-message t)
; *.~ とかのバックアップファイルを作らない
(setq make-backup-files nil)
; .#* とかのバックアップファイルを作らない
(setq auto-save-default nil)
; ^H を バックスペースへ
(global-set-key "\C-h" 'delete-backward-char)
;fullscreen
(defun toggle-fullscreen ()
(interactive)
(set-frame-parameter nil 'fullscreen
(if (frame-parameter nil 'fullscreen)
nil 'fullboth)))
(global-set-key
[f11] 'toggle-fullscreen)
; toolbar del
(tool-bar-mode nil)
;T-code
;(setq load-path (cons "~/emacs/lisp" load-path))
;(require 'tc-setup)
;skk
(setq skk-jisyo "c:/Installed/Cygwin/usr/share/skk/SKK-JISYO.office.zipcode")
(setq skk-jisyo "c:/Installed/Cygwin/usr/share/skk/SKK-JISYO.zipcode")
(setq skk-large-jisyo "c:/Installed/Cygwin/usr/share/skk/SKK-JISYO.L")
;re-load
(global-set-key
[f12] 'eval-buffer)
;install-elisp
;(require 'install-elisp)
;(setq install-elisp-repository-directory "~/.emacs.d/")
;auto-install
;(require 'auto-install)
;(setq auto-install-directory "~/.emacs.d/elisp/auto-install.el")
;(setq auto-install-directory "c:\\Installed\\Cygwin\\home\1079\\.emacs.d\\elisp\\auto-install.el")
;(auto-install-update-emacswiki-package-name t)
;;anything:http://www24.atwiki.jp/anything/pages/1.html
;;http://www.emacswiki.org/cgi-bin/wiki/download/anything.el
;;http://www.emacswiki.org/cgi-bin/wiki/download/anything-config.el
;(require 'anything)
;(require 'anything-config)
;(add-to-list 'anything-sources 'anything-c-source-emacs-commands)
;(define-key global-map
; "\C-l" 'anything)
;;wb-line-number-toggle
;;http://homepage1.nifty.com/blankspace/emacs/wb-line-number.html
(require 'wb-line-number)
(wb-line-number-toggle)
;;goby
(add-to-list 'load-path "~/.emacs.d/elisp/Goby")
(load "goby")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;org-mode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
;(add-to-list 'load-path "c:\\Installed\\Cygwin\\usr\\local\\share\\emacs\\site-lisp")
;(require 'org-install)
;(define-key global-map "\C-cl" 'org-store-link)
;(define-key global-map "\C-ca" 'org-agenda)
;(define-key global-map "\C-cr" 'org-remember)
;(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;(add-hook 'org-mode-hook 'turn-on-font-lock)
;(setq org-log-done t)
;(setq org-hide-leading-stars t)
;(setq org-directory "~/home/1079/org/")
;(setq org-directory "c:\\Installed\\Cygwin\\home\1079\\org\\")
;(setq org-default-notes-file "notes.org")
;(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
; '(org-agenda-files nil))
;(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
; )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;scheme
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;emacsでGauche
(setq process-coding-system-alist
(cons '("gosh" utf-8 . utf-8) process-coding-system-alist))
;(setq scheme-program-name "/usr/local/bin/gosh -i")
(setq scheme-program-name "c:\\Installed\\Cygwin\\usr\\local\\bin\\gosh.exe -i")
(autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t)
(autoload 'run-scheme "cmuscheme" "Run an inferior Scheme process." t)
; split window
(defun scheme-other-window ()
"Run Gauche on other window"
(interactive)
(split-window-horizontally (/ (frame-width) 2))
(let ((buf-name (buffer-name (current-buffer))))
(scheme-mode)
(run-scheme scheme-program-name))
;;ここを消さないとCygwin上のEmacsでわろす。
; (switch-to-buffer-other-window
; (get-buffer-create "*scheme*"))
(switch-to-buffer-other-window
(get-buffer-create buf-name))
)
(define-key global-map
"\C-cG" 'scheme-other-window)
;;swap screen
(defun swap-screen()
"Swap two screen,leaving cursor at current window."
(interactive)
(let ((thiswin (selected-window))
(nextbuf (window-buffer (next-window))))
(set-window-buffer (next-window) (window-buffer))
(set-window-buffer thiswin nextbuf)))
(defun swap-screen-with-cursor()
"Swap two screen,with cursor in same buffer."
(interactive)
(let ((thiswin (selected-window))
(thisbuf (window-buffer)))
(other-window 1)
(set-window-buffer thiswin (window-buffer))
(set-window-buffer (selected-window) thisbuf)))
(global-set-key [f2] 'swap-screen)
(global-set-key [S-f2] 'swap-screen-with-cursor)
;;emacs-inertial-scroll
(require 'inertial-scroll)
(setq inertias-global-minor-mode-map
(inertias-define-keymap
'(
("<next>" . inertias-up)
("<prior>" . inertias-down)
("C-v" . inertias-up)
("M-v" . inertias-down)
) inertias-prefix-key))
(inertias-global-minor-mode 1)
(setq inertias-initial-velocity 50) ; 初速(大きいほど一気にスクロールする)
(setq inertias-friction 120) ; 摩擦抵抗(大きいほどすぐ止まる)
(setq inertias-rest-coef 1.0) ; 画面端でのバウンド量(0はバウンドしない。1.0で弾性反発)
(setq inertias-update-time 60) ; 画面描画のwait時間(msec)
(put 'downcase-region 'disabled nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Emacs Window Edit
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;カーソル行ハイライト
(defface hlline-face
'((((class color)
(background dark))
(:background "dark slate gray"))
(((class color)
(background light))
(:background "OliveDrab1"))
(t
()))
"*Face used by hl-line.")
(setq hl-line-face 'hlline-face)
;; (setq hl-line-face 'underline) ; 下線
(global-hl-line-mode)
;;alpha
(add-to-list 'default-frame-alist '(alpha . 50))
;;Window
(if window-system
(progn
;; 文字の色を設定します。
(add-to-list 'default-frame-alist '(foreground-color . "VioletRed1"))
;; 背景色を設定します。
(add-to-list 'default-frame-alist '(background-color . "black"))
;; カーソルの色を設定します。
(add-to-list 'default-frame-alist '(cursor-color . "snow"))
;; マウスポインタの色を設定します。
; (add-to-list 'default-frame-alist '(mouse-color . "SlateBlue2"))
;; モードラインの文字の色を設定します。
; (set-face-foreground 'modeline "white")
;; モードラインの背景色を設定します。
; (set-face-background 'modeline "MediumPurple2")
;; 選択中のリージョンの色を設定します。
; (set-face-background 'region "LightSteelBlue1")
;; モードライン(アクティブでないバッファ)の文字色を設定します。
; (set-face-foreground 'mode-line-inactive "gray30")
;; モードライン(アクティブでないバッファ)の背景色を設定します。
; (set-face-background 'mode-line-inactive "gray85")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment