Skip to content

Instantly share code, notes, and snippets.

@yoshimov
Last active October 10, 2015 21:38
Show Gist options
  • Select an option

  • Save yoshimov/3754200 to your computer and use it in GitHub Desktop.

Select an option

Save yoshimov/3754200 to your computer and use it in GitHub Desktop.
siteinit.l for xyzzy
;; Save this file as siteinit.l in site-lisp folder.
;; Re-dump it with Ctrl+Shift+Click xyzzy.
; キーバインドの変更
(global-set-key '(#\C-x #\u) 'undo)
;; [ツール]-[共通設定]-[さまざま]のクリップボード同期
;(global-set-key '(#\M-w) 'copy-region-to-clipboard)
;(global-set-key '(#\C-w) 'kill-region-to-clipboard)
;(global-set-key '(#\C-y) 'paste-from-clipboard)
(global-set-key '(#\C-x #\j) 'goto-line)
(global-set-key '(#\C-x #\l) 'fill-region)
;(global-set-key '#\C-o 'toggle-ime)
; Alt+Space でマーク
;(global-set-key '#\M-SPC 'set-mark-command)
; インクリメンタルサーチ (C-s, C-r)
(require "isearch")
; バックアップを特定ディレクトリに保存する
(require "backup")
(setq *backup-directory* "/tmp/")
(setq *hierarchic-backup-directory* nil)
;;インデントレベルの設定
(setq java-indent-level 4)
;;インデントをタブで指定
(setq ed::*java-indent-tabs-mode* t)
;;.groovyをJavaモードで開く
(push '("\\.groovy$" . java-mode) *auto-mode-alist*)
;;指定位置で折り返す
(set-buffer-fold-type-column)
;;デフォルトの文字コードをutf-8にする
(setq *default-fileio-encoding* *encoding-utf8n*)
;;デフォルトの改行コードをLFのみにする
;(setq *default-eol-code* *eol-lf*)
;;C-x C-m でMakeを実行
(defun exec-make ()
(interactive)
(execute-subprocess "make"))
(global-set-key '(#\C-x #\C-m) 'exec-make)
;; Markdown mode <https://gist.github.com/youz/1339252/>
(require "markdown-mode")
(push '("\\.md$" . markdown-mode) *auto-mode-alist*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment