다른 명령
서브라임(sublime) 편집기
사용팁
https://spoqa.github.io/2015/11/23/sublime-basic-tip.html
단축키
편집
단축키 | 설명 |
---|---|
Ctrl+D | 커서가 위치한 단어를 선택하고, 동일한 단어를 순차적으로 연속해서 선택(다중편집 모드) |
Ctrl+K | 선택된 단어를 선택해제(다중편집 모드) |
Alt+F3 | 선택된 단어와 같은 단어를 문서에서 모두 선택(다중편집 모드) |
Ctrl+U | 선택된 단어를 역순으로 선택해제(다중편집 모드) |
Esc | 단어 선택 모드를 해제 |
줄 선택 단축키
단축키 | 설명 |
---|---|
줄 선택, 줄 반복 선택 | |
선택 영역을 다중 편집 가능한 상태로 전환(다중편집 모드) | |
다중 편집 가능한 상태로 줄 선택(다중편집 모드) | |
Brace 범위 안의 내용 선택 | |
들여쓰기 레벨이 동일한 내용 선택 | |
선택된 범위의 부모요소 선택 | |
쌍을 이루는 괄호의 여는 위치와 닫는 위치로 반복 이동 |
줄 편집 단축키
단축키 설명
Ctrl+Shift+D 줄 복사 Ctrl+Shift+K 줄 삭제 Ctrl+KK 커서부터 줄 끝까지 삭제 Ctrl+K+Backspace 커서부터 줄 처음까지 삭제 Ctrl+X 줄 잘라내기 Ctrl+Shift+Up 줄 위로 이동 Ctrl+Shift+Down 줄 아래로 이동 Ctrl+Enter 다음 행에 줄 삽입 Ctrl+Shift+Enter 이전 행에 줄 삽입 Ctrl+J 다음 줄을 현재 라인으로 합침 Ctrl+] 들여쓰기 Ctrl+[ 내어쓰기
- 그 밖의 편집
단축키 설명
Ctrl+Shift+[ 코드블록 접기 Ctrl+Shift+] 코드블록 폅기 Ctrl+/ 주석 처리/취소 Ctrl+Shift+/ 선택 영역 블록 주석 처리/취소 Ctrl+Shift+V 들여쓰기 올바르게 붙여 넣기 Ctrl+Space 자동완성 제안 Alt+Shift+W 선택영역 HTML 태그 감싸기 Alt+. 현재 HTML 태그 닫기 Ctrl+K+U 대문자로 변경 Ctrl+K+L 소문자로 변경
Navigation/Gogo Anywhere 단축키 설명
Ctrl+P 빠른 파일 및 이름 검색 Ctrl+R 심볼 검색 Ctrl+; 단어 검색 Ctrl+G 라인 검색 Ctrl+R 프로젝트에서 심볼 검색 F12 정의 단어 바로가기 Alt+- 정의 단어 돌아가기 Ctrl+Shift+F 디렉토리 검색 Ctrl+H 찾아서 바꾸기 Ctrl+F 찾기
Layout & Group
Layout
단축키 설명
Alt+Shift+1 Single Alt+Shift+2 Columns: 2 Alt+Shift+3 Columns: 3 Alt+Shift+4 Columns: 4 Alt+Shift+8 Rows: 2 Alt+Shift+9 Rows: 3 Alt+Shift+5 Grid: 4
Groups 단축키 설명
Ctrl+K, Ctrl+Right 다음 그룹으로 포커스 이동 Ctrl+K, Ctrl+Left 이전 그룹으로 포커스 이동 Ctrl+Number 생성된 그룹 순서로 포커스 이동
Focus Group 단축키 설명
Ctrl+K, Ctrl+Right 다음 그룹으로 포커스 이동 Ctrl+K, Ctrl+Left 이전 그룹으로 포커스 이동 Ctrl+Number 생성된 그룹 순서로 포커스 이동
Move File to Group 단축키 설명
Ctrl+K, Ctrl+Shift+Right 다음 그룹으로 파일 이동 Ctrl+K, Ctrl+Shift+Left 이전 그룹으로 파일 이동 Ctrl+Alt+Number 생성된 그룹 순서로 파일 이동
Adding a Line
To add the line above or below to the selection, use Ctl+Alt+Up and Ctrl+Alt+down (OS X: Ctrl+Shift+Up and Ctrl+Shift+Down).
If you go too far, use Undo Selection (Ctrl+U, or Command+U on OS X) to step backwards.
Splitting the Selection into Lines Select a block of lines, and then split it into many selections, one per line, using Ctrl+Shift+L, or Command+Shift+L on OS X.
Quick Add Next To add the next occurrence of the current word to the selection, use Quick Add Next, which is bound to Ctrl+D on Windows and Linux, or Command+D on OS X.
Again, if you go too far, use Undo Selection (Ctrl+U, or Command+U on OS X) to step backwards.
Find All To add all occurrences of the current word to the selection, use Find All: Alt+F3 on Windows and Linux, or Ctrl+Command+G on OS X.
Single Selection To go from multiple selections to a single selection, press Escape.
기타 Keypress Command
F11 전체화면 Ctrl+Shift+P 명령어 팔레트(Command Palette) Ctrl+` 콘솔 보기(Show Console) Ctrl+K+B 사이드바 토글(Show/Hide Sidebar) Ctrl+keypad(+) 폰트 크게 Ctrl+Shift+keypad(+) 폰트 작게 Ctrl+W 탭 닫기 Ctrl+Shift+W 프로그램 종료
Emmet 단축키 단축키 설명
Ctrl-+ E Expand Abbreviation - 축약어 확장 Shift+Ctrl+G Wrap With Abbreviation - 축약어로 감싸는 태그 생성 Ctrl + , Match Tag Pair Outward - 쌍을 이루는 태그 안쪽을 선택 Shift+Ctrl+0 Match Tag Pair Inward - 쌍을 이루는 태그 바깥쪽을 선택(윈도우에서 작동안함) Ctrl+Alt+J Go to Matching Pair - 쌍을 이루는 태그로 이동 Ctrl+Alt+→ or Ctrl+Alt+← Go to Edit Point - 이전, 다음 편집점으로 이동 Shift+Ctrl+. or Shift+Ctrl+, Select Item - 이전, 다음 아이템 선택 Shift+Ctrl+/ Toggle Commend - 포인터가 위치한 곳이 포함하는 하위까지 주석처리 Shift+Ctrl+; Remove Tag - 포인터가 위치한 곳의 시작태그와 끝맺음 태그를 삭제 Ctrl + U Update Image Size - 이미지 너비와 높이 속성을 삽입 Shift+Ctrl+Y Evaluate Math Expression - 사칙연산 실행 Shift+Ctrl+R Reflect CSS Value - Vendor Prefix CSS 변경 값을 반영 Shift+Ctrl+' Rename Tag - 태그 이름 변경 Ctrl + ↑ 1씩 증가 Ctrl + ↓ 1씩 감소 Alt + ↑ 0.1씩 증가 Alt + ↓ 0.1씩 감소 Shift+Alt+↑ 10씩 증가 Shift+Alt+↓ 10씩 감소
기능
- 줄 끝 공백 제거하기
User preference파일에 다음의 항목을 추가하면 파일 저장 시 자동으로 줄 끝 공백이 제거된다:
"trim_trailing_white_space_on_save": true
- 빈줄제거
Find and Replace Regular Expression을 클릭하고 ^\n을 찾아서 공백으로 바꾸기 선택
플러그인
플러그인 설치툴 설치
1. 메뉴 실행
메뉴: View > Show Console menu (단축키: Ctrl+`, )
2. 콘솔 창에 입력
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
SFTP
- 패키지 설치
- Windows : Ctrl + Shift + p
- MAC : Command + Shift + p
- 이후 [install]을 입력해주고 Enter를 클릭합니다.
- [SFTP]를 입력 후 SFTP 설치
- SFTP와 연동
- SFTP와 연동할 폴더를 선택 하여 서버와 연결
- Tools 메뉴 [Add Folder to Project]를 클릭
- 연동할 폴더를 선택 후 연동
- 최상위 폴더를 오른쪽 클릭
- [우클릭] -> [SFTP/FTP] -> [Map to Remote...] 클릭
- [우 클릭] -> [SFTP/FTP] -> [Sync Local -> Remote]
- .만약 단일 파일을 업로드하고자 한다면 다음과 같은 단축키 사용
[Ctrl] + [Alt] + [U] + [Y] 순서대로 클릭 [Ctrl + Alt]는 동시에 눌러도 되지만, U와 Y는 반드시 순서대로
SQL TOOLS
https://code.mteixeira.dev/SublimeText-SQLTools/
- 설정 > Package Setting > SQLTOOLS >
- Connections
{ "connections": { "XXX_DEV": { "type" : "oracle", "host" : "11.22.33.44", "port" : 1521, "database": "XXX_DEV", "username": "XXX_DBA", "password": "xxxxx", "service" : "SIDXXX", // nls_lang is optional //"nls_lang": "american_america.al32utf8", "encoding": "utf-8" } }, "default": "XXX_DEV" }
- Setting
SQLTOOL 설정
- Key Bindings
SQLTOOL 단축키
[ { "keys": ["ctrl+alt+e"], "command": "st_select_connection" }, { "keys": ["ctrl+e", "ctrl+e"], "command": "st_execute" }, { "keys": ["ctrl+e", "ctrl+a"], "command": "st_execute_all" }, { "keys": ["ctrl+e", "ctrl+x"], "command": "st_explain_plan" }, { "keys": ["ctrl+e", "ctrl+h"], "command": "st_history" }, { "keys": ["ctrl+e", "ctrl+s"], "command": "st_show_records" }, { "keys": ["ctrl+e", "ctrl+d"], "command": "st_desc_table" }, { "keys": ["ctrl+e", "ctrl+f"], "command": "st_desc_function" }, { "keys": ["ctrl+e", "ctrl+b"], "command": "st_format" }, { "keys": ["ctrl+e", "ctrl+q"], "command": "st_save_query" }, { "keys": ["ctrl+e", "ctrl+r"], "command": "st_remove_saved_query" }, { "keys": ["ctrl+e", "ctrl+l"], "command": "st_list_queries", "args": {"mode" : "run"}}, { "keys": ["ctrl+e", "ctrl+o"], "command": "st_list_queries", "args": {"mode" : "open"}}, { "keys": ["ctrl+e", "ctrl+i"], "command": "st_list_queries", "args": {"mode" : "insert"}} ]
Alignment
단축키 : Ctrl + Alt + a
VAlign
단축키 : Ctrl + \
코드 하일라이트 BracketHighlighter
스니펫 사용법
- 임시템플릿(스니펫) 형태로 문서를 만들어서 단축키로 지정 후 :단축키 형태로 호출이 가능하다.
- - ${1:} <= 첫번째 치환대상 , ${2:} 두전째, ${3:} 세번째.... 탭키로 단계별 완료 처리
- - <tabTrigger>:1</tabTrigger> <= 단축키 지정 :1 입력후 탭키 누르면 해당 스니펫 호출
C:\Users\유저명\AppData\Roaming\Sublime Text 3\Packages\User 폴더에 cykim.sublime-snippet 파일을 생성해야함.
<snippet> <content><![CDATA[ 문서..내용 기술 -- 0.시퀀스 조회 SELECT * FROM DBA_SEQUENCES WHERE SEQUENCE_NAME LIKE '%'||substr('${1:}',4)||'%'; ]]></content> <tabTrigger>:1</tabTrigger> <!-- scope>source.sql</scope --> </snippet>
Terminus 플러그인
- 터미널 사용하기
https://www.geeksforgeeks.org/how-to-use-terminal-in-sublime-text-editor/
단축키 설정화면
중복제거 단축키
Preferences > Key Bindings
[ { "keys": ["ctrl+shift+f9"], "command": "permute_lines", "args": {"operation": "unique"} } ]
숫자 자동 증가 단축키
- Install Package Control. Ctrl+Shift+P (Mac: Command+Shift+P).
- Increment Selection 패키지 설치
- Select all lines with Ctrl+A (Mac: Command+A)
- Change selection to multiple lines with Ctrl+Shift+L (Mac: Command+Shift+L)
- 숫자증가 단축키 Ctrl+Alt+I (Mac: Command+Control+I) 사용.
나의 환경설정
Preferences > Settings 메뉴를 선택 입력 양식은 JSON 입니다.
{ "always_show_minimap_viewport": true, "bold_folder_labels": true, "caret_style": "phase", "color_scheme": "Monokai.sublime-color-scheme", "default_line_ending": "unix", "draw_minimap_border": true, "draw_white_space": "all", "ensure_newline_at_eof_on_save": true, "fade_fold_buttons": false, "font_face": "D2Coding", "font_size": 14, "highlight_line": true, "highlight_modified_tabs": true, "indent_guide_options": [ "draw_normal", "draw_active" ], "line_padding_bottom": 2, "line_padding_top": 2, "overlay_scroll_bars": "enabled", "rulers": [ 80, 120 ], "show_encoding": true, "show_line_endings": true, "tab_size": 4, "theme": "Default.sublime-theme", "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "word_wrap": true }