½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
css
mysql
html
jquery
������
image
mobile
API
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 70 | Á¶È¸¼ö 1,046 | µî·ÏÀÏ 2001-05-25 15:36:33

´Ð³×ÀÓ

zerotak

À̸ÞÀÏ

zerotak@happycgi.com

Á¦¸ñ

vi ¿¡µðÅÍ ÆÁ
³»¿ë

ÀÌ ³»¿ëÀº »ç½Ç, "man vi" Çغ¸½Ã¸é ÀüºÎ ´Ù ³ª¿À´Â ³»¿ëÀ̶ó ¾Æ½Ã´Â ºÐÀº ´Ù ¾Æ½Ã´Â °ÍÀÌ°ÚÁö¸¸, ¾îÁ¦³ª, ¿À´ÃÀ̳ª vi¸¦ °íÁýÇÏ´Â ÇÑ »ç¿ëÀڷμ­ ¾ò°ÔµÈ À¯¿ëÇÑ ±â´ÉµéÀ» Çѹø ¸ð¾Æº¸¾Ò½À´Ï´Ù.

1. Marking
ÀÌ°Å ¸ð¸£¸é ¾È µÈ´Ù°í »ý°¢ÇÕ´Ï´Ù. command mode¿¡¼­ "mx"¶ó°í ÇϽøé ÇöÀç À§Ä¡¿¡ xÇ¥°¡ »ý±é´Ï´Ù. ´«¿¡´Â ¾È º¸ÀÌÁö¿ä. ´Ù¸¥ ¾î¶² page¿¡¼­µµ ÀÌÁ¦ "'x"ÇϽøé xÇ¥Çß´ø ÀÚ¸®·Î µ¹¾Æ°©´Ï´Ù. "d'x"½ÄÀ¸·Î ¹üÀ§¸¦ ÁöÁ¤ÇÒ ¶§µµ À¯¿ëÇÕ´Ï´Ù.

2. Buffering
vi´Â ÀÏȸ¿ë buffer¹Û¿¡ ¾ø¾î¼­ ºÒÆíÇØ. ¾Æ´Õ´Ï´Ù. "add Çϸé ÇÑ lineÀÌ Áö¿öÁö¸é¼­ buffer a·Î °©´Ï´Ù. ²¨³¾¶©, "ap ÇÏ¸é ³ª¿À±¸¿ä.
Âü°í·Î, Å« P ´Â ¾ÕÀ¸·Î, ÀÛÀº p ´Â µÚ·Î pasteÇÕ´Ï´Ù. ¾î¶² paragraph¸¦ ¹Ýº¹ÇÒ °æ¿ì¿£ Å« P °¡ ÁÁÁö¿ä. ÇØ º¸¼¼¿ä.

3. Cursor À̵¿°ú ÆíÁý
# lineÀÇ ¸Ç µÚ¿¡¼­ ºÎÅÍ ¾²°í ½Í´Ù
A

# ÇÑ ´Ü¾î¸¦ ¹Ù²Ù°í ½Í´Ù.
cw

# Ư¼ö±âÈ£ »ó°ü¾øÀÌ ´ÙÀ½ ¶ç¾î¾²±â±îÁö ¹Ù²Ù°í ½Í´Ù.
cW

# ÇöÀç ´Ü¾îÀÇ ¹Ù·Î µÚºÎÅÍ ¾²°í ½Í´Ù.
ea

# µü ÇѱÛÀÚ¸¸ ¹Ù²Ù°í ½Í´Ù.
r

# insert¸»°í replace mode·Î ¾²°í ½Í´Ù.
R

4. Scroll°ú Cursor À̵¿
±ä file ÀÛÀº È­¸é. j¿Í k¸¸À¸·Î´Â ¿Ô´Ù°¬´Ù ÇϱⰡ ¹«Ã´ ºÒÆíÇÏÁö¿ä.

# page ´ÜÀ§·Î scrollÇÏ°í ½Í´Ù.
^F, ^B

# cursor¸¦ ¸Ç À§·Î º¸³»°í ½Í´Ù.
H

# °¡¿îµ¥¿Í ¸Ç ¾Æ·¡´Â?
M, L

# ³»°¡ Áö±Ý º¸°í ÀÖ´Â lineÀÌ ¸Ç À§¿¡ ÀÖ¾úÀ¸¸é ÁÁ°Ú´Ù.
z Enter

# °¡¿îµ¥·Î º¸³»·Á¸é?
z.

# line 543À¸·Î °¡°í ½Í´Ù.
543G

# file ¸Ç µÚ·Î °¡°í ½Í´Ù.
G

# À§ÀÇ key¸¸ Àͼ÷Çصµ ÃæºÐÇÏÁö¸¸, ±× ¹Û¿¡,
^U, ^D, ^E, ^Y µî

5. ex command
command mode¿¡¼­ ":"¸¦ Ä¡¸é ¿ÞÂÊ ¹Ø¿¡ ":"°¡ ³ªÅ¸³ª´Âµ¥,
¿©±â¼­ ¸Ô´Â ¸í·É¾î´Â viÀÇ Àü½Å ex editorÀÇ commandÀÔ´Ï´Ù.

# file Àüü¿¡¼­ "kkk"¸¦ "lala"·Î ¹Ù²Ù°í ½Í´Ù.
(¹°·Ð, ÀÌ ¿¹ ÀÌ¿ÜÀÇ ´Ù¾çÇÑ substitutionÀÌ Áö¿øµË´Ï´Ù.)
:%s/kkk/lala/g

# ´Ù¸¥ fileÀ» editÇÏ°í ½Í´Ù.
:e file_name

# ´Ù¸¥ fileÀ» ÀоîµéÀÌ°í ½Í´Ù.
:r file_name

# shellÀ» µé¶ô³¯¶ô ÇÏÁö ¾Ê°í, ÇѲ¨¹ø¿¡ ¿©·¯°³ÀÇ fileÀ».
vi *.C
:n
:n
...

# µü µÎ °³ÀÇ file¸¸ ¹ø°¥¾Æ °¡¸é¼­ editÇÏ°í ½Í´Ù.
vi lala.C lala.h
:n
:e #
:e #
:e #
...

# À¯¿ëÇÑ set variableµé
set all : ¸ðµç variableµéÀÇ status
set tabstop=4 : tab ÇϳªÀÇ °£°Ý
set shiftwidth=4 : shiftÇϳªÀÇ °£°Ý
set showmode : ¿À¸¥ÂÊ ¹ØÀ» º¸¼¼¿ä.
set ignorecase : search, substitution ¿¡¼­ ´ë¹®ÀÚ, ¼Ò¹®ÀÚ ¹«½Ã

6. ±× ¹Û¿¡ ©ÇÑ °Íµé.
# forward and backward pattern search
/ ?

# next and previous search
n N

# terminalÀÌ ¾È ¸Â¾Æ¼­ È­¸éÀÌ µÚÁ×¹ÚÁ×ÀÌ µÇ¾ú³×.
¶Ç´Â, Ä£±¸°¡ talk¸¦ °É¾î¼­ È­¸éÀ» °¡·È´Ù.
^L : refresh

# °ýÈ£µéÀÌ ³Ê¹« ¸¹¾Æ ´©°¡ ´©±¸ ¦ÀÎÁö ¸ð¸£°Ú´Ù.
ÇØ´ç°ýÈ£ À§¿¡ cursor¸¦ ¿Ã·Á³õ°í, "%"

# 30 lineÀ» indent-in ÇؾßÇÑ´Ù. (Program coding µµÁß)
30>>

# out
30<<

# ¹æ±Ý Àü¿¡ ½è´ø edittingÀ» Çѹø ´õ Àû¿ë½ÃÅ°°í ½Í´Ù.
¶È°°Àº ¾î±¸¸¦ ¿©±âÀú±â ºÙÀ̰ųª, ¿©±âÀú±â¿¡¼­ ¶È°°Àº change¸¦ ¿øÇϰųª, ...
.

# ¿À¸¥¼ÕÀº mouse¿¡ Àִµ¥, ":wq"´Â ¾î¶»°Ô...
ZZ

# windows¿¡¼­ ó·³ fileÀÇ a.txt¶ó´Â fileÀÇ ÀϺκÐÀ»
b.txt¶ó´Â file¿¡ º¹»ç°í½Í´Ù.
vi a.txt
"ay'x --- "a buffer¿¡, x¶ó°í markÇÑ ÁöÁ¡±îÁö yank
:e b.txt --- b.txt¸¦ ºÎ¸£°í,
"ap --- "a buffer¸¦ paste

ÀÚ·áÃâó : http://www.phpschool.com
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û kimsboard ¼³Ä¡Çϱâ 2001-05-25 15:34:50
´ÙÀ½°Ô½Ã±Û cgi¿¡¼­ Ŭ¸¯À̺¥Æ® ¹ß»ý½Ã »õ À©µµ¿ì¿¡ Ç¥½Ã 2001-05-25 17:37:52