= Editplus 사용자를 위한 Emacs 래퍼런스 = == Editplus의 기능 == * 디렉토리창 * 원격파일 수정, 저장 * FTP * 미리보기(HTML) * 사용자 정의 도구 == Emacs 단축키 퀵 레퍼런스 == http://www.uvm.edu/~atb/emacs/cool_keys.html == Editplus의 편집명령 == '''들여쓰기와 내어쓰기''' * 들여쓰기 C-u 8 C-x TAB 또는 C-8 C-x TAB 또는 C-x r t 입력후 스페이스나 탭으로 원하는 만큼 입력 * 내어쓰기 C-- C-u 8 C-x TAB 또는 C-- C-8 C-x TAB 또다른 방법 (사각형 영역을 이용한 세밀한 조정) * 영역지정, C-x r k (지정된 영역 지움) * 영역지정, C-x r o (지정된 영역만큼 공백삽입) '''대소문자 변경''' * 선택영역을 대문자로 C-x C-u * 선택영역을 소문자로 C-x C-l '''주석''' * 영역지정, M-; 또는 M-x comment-region emacs에서 주석 문자와 형태는 각 mode에 따라 다르다. 예, sql mode에서는 알아서 표준 주석인 -- 문자가 입력된다. * FIXME 주석 삭제는 어떻게 하는지.., fill prefix를 사용하면 여러줄의 주석을 달때 편할것 같다. 사용법은? '''탭과 공백''' * 줄 끝 공백제거 M-\ (M-x delete-horizontal-space) * 유용한 줄 끝 공백제거 사용자 정의 함수 {{{#!lisp ;; 버퍼전체 ;; delete horizontal space for the whole buffer (defun delete-horizontal-space-buffer () "Deletes horizontal spaces at the end of every line in buffer." (interactive) (delete-horizontal-space-region (point-min) (point-max))) ;; 지정된 영역만 ;; delete horizontal space in region (defun delete-horizontal-space-region (beg-region end-region) "Deletes horizontal spaces at the end of every line in the region. BEG-REGION and END-REGION are args which specify the region boundaries." (interactive "*r") (let ((end-region-mark (make-marker)) (save-point (point-marker))) (set-marker end-region-mark end-region) (goto-char beg-region) (end-of-line) (delete-horizontal-space) (while (and (= (forward-line 1) 0) (< (point) end-region-mark)) (end-of-line) (delete-horizontal-space)) (goto-char save-point) (set-marker end-region-mark nil) (set-marker save-point nil))) }}} * 탭을 공백으로 치환 * 영역지정(만약 전체 영역을 지정하려면 C-x h(mark-whole-buffer)), M-x untabify * FIXME 공백을 탭으로 치환 M-x tabify (more..) * FIXME 탭크기 수정 M-x edit-tab-stops (more...) {{{#!lisp ; FIXME emacs에서는 설정파일에 아래처럼 해준다고 해결 될만큼 TAB은 단순한것 같지 않다. :( (setq default-tab-width 4) }}} * http://bbs.kldp.org/viewtopic.php?t=68058&highlight=emacs == Editplus에는 없지만 부가적으로 알아야 하는 Emacs 사용법 == '''윈도우''' * 수평으로 나누기 C-x 3 (M-x split-window-horizontally) * 수직으로 나누기 C-x 2 (M-x split-window-vertically) * 윈도우 옮겨다니기 C-x o (시계방향으로 이동한다. 또는 마우스로 클릭한다.) * 윈도우 삭제 C-x 1 * 윈도우 창 늘리기 * 길이 C-x ^ * 폭 C-x } 또는 C-x { * 윈도우 사이즈 통일 C-x + 보통은 mode line을 마우스로 드래그하여 조정한다. 사이즈를 조정하기 위해 단축키를 여러번 누르기 싫다면 C-u를 사용하는 방법도 있다. 예, C-u 20 C-x ^ TIP. M-x compare-windows 버퍼의 내용을 비교하고 처음으로 다른 부분을 보여준다. 만약 두개이상일 경우 현재 커서가 위치해 있는 윈도우와 시계 방향으로 다음 윈도우의 내용이 비교된다. ---- CategoryEmacs