차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
다음 판양쪽 다음 판
tech:nano [2015/08/14 00:24] V_Ltech:nano [2018/02/06 06:31] – [구문강조] V_L
줄 1: 줄 1:
 +{{tag>tech nano linux ubuntu}}
 ======나노 문서편집기 (Nano)====== ======나노 문서편집기 (Nano)======
  
 유닉스 계열에서 주로 사용하는 편집기는 vi 편집기이다. 하지만, 리눅스나 유닉스를 처음 접하는 초보자에게는 너무 복잡하다. GNU에서 만든 Nano 라는 편집기는 기능은 적지만 설정 파일의 간단한 편집같은 것은 할 수 있으며, 조작이 쉽다. 유닉스 계열에서 주로 사용하는 편집기는 vi 편집기이다. 하지만, 리눅스나 유닉스를 처음 접하는 초보자에게는 너무 복잡하다. GNU에서 만든 Nano 라는 편집기는 기능은 적지만 설정 파일의 간단한 편집같은 것은 할 수 있으며, 조작이 쉽다.
  
- * [[http://www.nano-editor.org/|프로젝트 홈]] +  * [[http://www.nano-editor.org/|프로젝트 홈]] 
- * [[http://www.nano-editor.org/dist/v2.0/nano.html|온라인설명서 (영어)]]+  * [[http://www.nano-editor.org/dist/v2.0/nano.html|온라인설명서 (영어)]]
  
  
줄 26: 줄 27:
  
  
 +  * 저장 : Ctrl + O 
 +  * 종료 : Ctrl + X 
 +  * 찾기 : Ctrl + W 
 +  * 찾고 바꾸기 : Ctrl + \ 
 +  * 블럭지정 : Ctrl + ^ 
 +  * 잘라내기 : Ctrl + K 
 +  * 붙여넣기 : Ctrl + U 
 +  * 줄바꿈 선택 : ESC -> $
 =====설치===== =====설치=====
  
줄 45: 줄 53:
   bind ^H replace main    # 찾아바꾸기   bind ^H replace main    # 찾아바꾸기
   bind ^Q exit main       # 종료   bind ^Q exit main       # 종료
 +  bind F10 exit main       # 종료
   bind ^Z undo main       # 되돌리기   bind ^Z undo main       # 되돌리기
   bind ^F whereis main      # 찾기   bind ^F whereis main      # 찾기
줄 52: 줄 61:
 =====구문강조===== =====구문강조=====
  
-<code>+<file batch conf.nanorc>
 ### 편의를 위한 각종 설정파일 강조. ### 편의를 위한 각종 설정파일 강조.
 syntax "config" "(\.|/|)config$" "(\.|/|)conf$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$" syntax "config" "(\.|/|)config$" "(\.|/|)conf$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$"
줄 59: 줄 68:
 color blue "setenv|export" "\;" color blue "setenv|export" "\;"
 color green "#.*$" color green "#.*$"
-</code>+</file>
  
 +<file batch ngnix.nanorc>
 +syntax "Nginx" "nginx.*\.conf$" "\.nginx$"
 +header "^(server|upstream)[a-z ]*\{$"
  
-  /usr/share/nano/XXX.nanorc+color brightmagenta  "\<(events|server|http|location|upstream)[[:space:]]*\{" 
 +color cyan  "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_he$ 
 +color brightcyan  "\<(on|off)\>" 
 +color brightyellow "\$[A-Za-z][A-Za-z0-9_]*" 
 +color red "[*]" 
 +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" 
 +color yellow   start="'$" end="';$" 
 +color green "(^|[[:space:]])#([^{].*)?$" 
 +#color ,green "[[:space:]]+$" 
 +#color ,red "    + +| +    +" 
 +</file> 
 + 
 + 
 + 
 +저장 위치  
 +  /usr/share/nano/conf.nanorc
  
 위와 같이 파일을 만들어 넣의면 된다. 위와 같이 파일을 만들어 넣의면 된다.
줄 74: 줄 101:
  
 기본으로 깔린다. 기본으로 깔린다.
 +
 +추가적인 컬러파일은 https://github.com/scopatz/nanorc 참조.
  
  
줄 81: 줄 110:
  
  
-^  로긴 후 수정하실 수 있습니다. 관심있는 분들의 많은 참여 부탁드립니다. 문법은 [[wiki:syntax]]참조하세요. | 
  
-{{tag>tech nano linux ubuntu}}