차이

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

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:nano [2016/01/07 09:19] V_Ltech:nano [2021/01/15 22:56] (현재) – [단축키 변경] 1.238.85.38
줄 1: 줄 1:
 +{{tag>tech nano linux ubuntu}}
 ======나노 문서편집기 (Nano)====== ======나노 문서편집기 (Nano)======
  
줄 26: 줄 27:
  
  
-저장 : Ctrl + O +  * 저장 : Ctrl + O 
- +  종료 : Ctrl + X 
-종료 : Ctrl + X +  찾기 : Ctrl + W 
- +  찾고 바꾸기 : Ctrl + \ 
-찾기 : Ctrl + W +  블럭지정 : Ctrl + ^ 
- +  잘라내기 : Ctrl + K 
-찾고 바꾸기 : Ctrl + \ +  붙여넣기 : Ctrl + U 
- +  줄바꿈 선택 : ESC -> $
-블럭지정 : Ctrl + ^ +
- +
-잘라내기 : Ctrl + K +
- +
-붙여넣기 : Ctrl + U +
- +
-줄바꿈 선택 : ESC -> $+
 =====설치===== =====설치=====
  
줄 53: 줄 47:
  
  
 +  bind ^A mark main # 모두 선택
   bind ^S writeout main  # 저장   bind ^S writeout main  # 저장
-  bind ^X cut main      # 한줄자르기 +  bind ^X cut all      # 한줄자르기 
-  bind ^V uncut main      # 한줄붙이기 +  bind ^V paste all      # 한줄붙이기 
-  bind ^C copytext main   # 한줄복사+  bind ^C copy main   # 한줄복사
   bind ^H replace main    # 찾아바꾸기   bind ^H replace main    # 찾아바꾸기
-  bind ^Q exit main       # 종료+  bind ^Q exit all       # 종료
   bind ^Z undo main       # 되돌리기   bind ^Z undo main       # 되돌리기
-  bind ^F whereis main      # 찾기 +  bind ^F whereis all      # 찾기 
-  bind F3 searchagain main   찾기+  bind ^G findnext all 찾기 
 +  bind F10 exit main      #  종료 
  
  
 =====구문강조===== =====구문강조=====
  
-<code>+<file batch conf.nanorc>
 ### 편의를 위한 각종 설정파일 강조. ### 편의를 위한 각종 설정파일 강조.
 syntax "config" "(\.|/|)config$" "(\.|/|)conf$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$" syntax "config" "(\.|/|)config$" "(\.|/|)conf$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$"
줄 73: 줄 70:
 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_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)" 
 +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 
 + 
 +위와 같이 파일을 만들어 넣면 된다.
  
   asm.nanorc     fortran.nanorc   man.nanorc     ocaml.nanorc   ruby.nanorc   asm.nanorc     fortran.nanorc   man.nanorc     ocaml.nanorc   ruby.nanorc
줄 88: 줄 103:
  
 기본으로 깔린다. 기본으로 깔린다.
 +
 +추가적인 컬러파일은 https://github.com/scopatz/nanorc 참조.
  
  
줄 95: 줄 112:
  
  
-^  로긴 후 수정하실 수 있습니다. 관심있는 분들의 많은 참여 부탁드립니다. 문법은 [[wiki:syntax]]참조하세요. | 
  
-{{tag>tech nano linux ubuntu}}