eclipse + pdt + rse 환경에서 emacs로 넘어가려고 하고 있다.
이유는 다수의 프로젝트를 생성 관리하는 상황에서 GUI만 사용하는 이클립스 환경에서는 이를 간단하게 자동화 할 방법이 없기 때문이다.
(물론 이클 플러그인을 짜서 '복잡하게 자동화'할 방법은 많이 있을 것이다... 그러나 scripting eclipse 는 여전히 정체중. 참고 :
eclipse shell(http://eclipse-shell.sourceforge.net/),
Would You Script Eclipse?(http://eclipse-projects.blogspot.com/2005/11/would-you-script-eclipse.html) )
또 gui 기반의 os와 eclipse를 넘나들면서 하는 작업에 진력이 난 이유도 있다.
결국 근본적인 해결을 위해 linux로 완전히 이행할 생각이다.
emacs 에서 php 작업을 하는 것은 어렵지 않다.
ecb(http://ecb.sourceforge.net/screenshots/1.png)를 이용하면 프로젝트 트리도 볼 수 있다.
문제는 rse 환경에서처럼 ftp에 연결한 상황에서 프로젝트 트리를 보는 것인데, 어떻게든 될 것 같긴 하지만 확신이 서지 않는다.
일단 리눅스와의 연계 작전을 생각하고 있다.
ftpfs(http://sourceforge.net/projects/ftpfs/)처럼 ftp 자체를 마운트해 사용하는 것이다.
(윈도우xp에서는
기본 네트워크 연결 기능을 이용해 ftp 드라이브를 마운트(http://fanpotai.wordpress.com/2006/08/03/how-to-mount-an-ftp-drive-in-windows/)할 수 있다.)
그러나 ftpfs및 새 구현인 lufs 프로젝트는 침체된 듯 하고,
gentoo 위키(http://gentoo-wiki.com/HOWTO_FTP_Mount)의 게시물을 따라서
fuse(http://fuse.sourceforge.net/)를 사용해 보기로 했다.
자동 emacs 셋팅. ¶
- 여기(http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl)에서 latest EmacsW32+Emacs patched Emacs patched를 받는다.
- 여기(http://emacs.kldp.org/wiki/doku.php?id=%EC%B4%88%EB%B3%B4%EC%9E%90%EB%A5%BC_%EC%9C%84%ED%95%9C_emacs_%EA%B0%80%EC%9D%B4%EB%93%9C)에서 초보자를 위한 win32 셋팅을 참고.
나의 emacs 셋팅 ¶
(add-to-list 'load-path "~/.emacs.d/")
(setq x-select-enable-clipboard t)
(setq-default truncate-lines t)
(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("NANumGothicCoding" . "unicode-bmp"))
(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("NanumGothicCoding" . "unicode-bmp"))
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)
(setq initial-scratch-message nil)
(setq auto-save-default nil)
(setq make-backup-files nil)
(setq-default tab-width 4)
(setq-default indent-tabs-mode t)
(global-set-key (kbd "<C-tab>") 'bury-buffer)
(global-font-lock-mode t)
(autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t)
(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))
(add-hook 'groovy-mode-hook
'(lambda ()
(require 'groovy-electric)
(groovy-electric-mode)))
(tabbar-mode)
php mode 설치 ¶
관리자로 로그인 : su
(하단 소스의 #은 get이 들어간 소스를 막고 있는 이 서버의 보안 설정 때문이다.
#다운로드 : http://sourceforge.net/projects/php-mode/
wg#et http://internap.dl.sourceforge.net/sourceforge/php-mode/php-mode-1.1.0.tgz
#압축 풀면 튀어나오는 php-mode.el을 옮긴다
mv php-mode.el /usr/share/emacs/21.3/lisp/
chmod 644 /usr/share/emacs/21.3/lisp/php-mode.el
Emacs 실행 : M-x byte-compile-file RET /usr/share/emacs/21.3/lisp/php-mode.el
.emacs 편집
(autoload 'php-mode "php-mode" "PHP editing mode" t)
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
한글 설정 ¶
/etc/emacs/site-start.el 이라는 파일에 아래 사항을 넣어 주세요
(require 'cl)
(when enable-multibyte-characters
(set-language-environment "Korean")
(setq-default file-name-coding-system 'euc-kr)
(setq default-korean-keyboard "")
(setq input-method-verbose-flag nil
input-method-highlight-flag nil)
(prefer-coding-system 'euc-kr)
(set-default-coding-systems 'euc-kr)
(when window-system
(global-set-key "\C-\\" 'undefined))
(add-hook 'quail-inactivate-hook 'delete-quail-completions)
(defun delete-quail-completions ()
(when (get-buffer "*Quail Completions*")
(kill-buffer "*Quail Completions*")))
(unless window-system
(menu-bar-mode -1)
(set-keyboard-coding-system 'euc-kr)
(set-terminal-coding-system 'euc-kr)
(define-key encoded-kbd-mode-map [27] nil))
(set-selection-coding-system 'ctext)
(setq-default sendmail-coding-system 'euc-kr)
(eval-after-load "quail"
'(progn
(define-key quail-translation-keymap "\C-h" 'quail-delete-last-char)
(define-key quail-translation-keymap (kbd "C-SPC") 'set-mark-command)
(define-key quail-translation-keymap "\C-?" 'quail-translation-help)))
(define-key global-map (kbd "C-x RET s") 'decode-coding-region))
기타 도움이 될 만한 명령어 ¶
현재 파일의 인코딩 변경 : C-x C-m f 인코딩명
에디터의 기본 인코딩 변경 : C-h C 인코딩명
EOF 형식 변경 : 접미사 이용 (예 : utf-8-dos, utf-8-doc, utf-8-mac)
모듈 참고 ¶
ecb(http://ecb.sourceforge.net/) 솔루션 탐색기나 파일 익스플로러 스타일의 디렉터리 트리 탐색기