°£È¤, ÀÚ½ÅÀÌ ¸¸µç ¼Ò½º¿¡ ´ëÇØ¼ ÁÙ ¹øÈ£¸¦ ¸Å°Ü¼ ¼³¸íÀ» ÇØ¾ß ÇÏ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù.
ÀÌ·²¶§, ¿©±â¼ Á¦°øµÇ´Â ¸ÅÅ©·Î¸¦ »ç¿ëÇϸé <±×¸² 1>°ú °°ÀÌ ÁÙ ¹øÈ£°¡ ¸Å°ÜÁø ¼Ò½ºÄڵ带
¾òÀ» ¼ö ÀÖ½À´Ï´Ù.![]() <±×¸² 1 - ÁÙ ¹øÈ£°¡ Ãß°¡µÈ ¼Ò½ºÄÚµå> ½ÇÁ¦ ÄÚµå´Â ´ÙÀ½ÀÇ <¼Ò½º 1>°ú °°À¸¸ç Visual Studio ÀÇ 'Tools|Customize...' ¸Þ´º¿¡¼ Add-in and Macro Files ÅÇ¿¡¼ Ãß°¡ÇÏ¸é µË´Ï´Ù.
'-------------------------------------------------------------
'FILE DESCRIPTION: Manage line numbering
'-------------------------------------------------------------
Private Function GetBlankCount(nCurrentLine, nLastLine)
dim strCurrentLine
dim strLastLine
strCurrentLine = cstr(nCurrentLine)
strLastLine = cstr(nLastLine)
dim nDiff
nDiff = len(strLastLine) - len(strCurrentLine)
GetBlankCount = nDiff
end Function
Sub LineNumberOn()
'DESCRIPTION: Line number on
Dim win
set win = ActiveWindow
if win.type <> "Text" Then
MsgBox "text editor window is in-active."
else
DIM sel
set sel = ActiveDocument.Selection
dim topLine
dim bottomLine
topLine = sel.TopLine
bottomLine = sel.BottomLine
dim i
i = 1
dim line
line = sel.TopLine
dim lineDiff
lineDiff = bottomLine - topLine
do while line <= bottomLine
sel.GoToLine line, dsSelect
sel.text = String(GetBlankCount(i, lineDiff), " ")
+ cstr(i) + ":" + chr(9) + sel.text
i = i + 1
line = line + 1
loop
end if
End Sub
¾Æ·¡ÀÇ ÆÄÀÏÀº Visual Studio °¡ ¼³Ä¡µÇ¾î ÀÖ´Â Æú´õ³»¿¡¼ \Microsoft Visual Studio\Common\MSDev98\Macros ¿¡ º¹»çÇØ ÁÖ½Ã¸é µË´Ï´Ù. - ÄÚµå ´Ù¿î·Îµå : LineNumber.dsm - 2001.07.01 Smile Seo - |