Learn

The forum of documents and methods for studying - Lượm lặt kiến thức


    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio

    QaniTri
    QaniTri
    Admin

    Nam Libra Monkey
    Tổng số bài gửi : 1568
    Tiền xu Ⓑ : 3891
    Được cảm ơn № : 6
    Ngày khởi sự Ngày khởi sự : 07/01/2013
    Đến từ Đến từ : HCMC
    Côngviệc / Sởthix Côngviệc / Sởthix : Languages, Softwares, Sciences, Martial arts

    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio Empty Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio

    Bài gửi by QaniTri 6th November 2016, 19:15

    Menu:  Tools -> Options -> Keyboard
    Command:  Tools.CustomizeKeyboard
    Versions:  2008,2010
    Published:  8/7/2010
    Code:  vstipTool0066

     
    We covered creating shortcuts in vstipTool0063.  Assuming you have a macro you would like to attach a shortcut key to, you can easily make your macros accessible.  Let’s do an example to show you how.  First, go to Tools -> Options -> Keyboard :
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 4353.image_thumb
     
    To access your macros type “macro.” in the “Show commands containing” area:
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 05543.image_thumb_1
     
    In this case let’s bind the “Macros.Samples.Utilities.TurnOffLineNumbers” and “Macros.Samples.Utilities.TurnOnLineNumbers” macros:
    WARNING:  You will want to make sure the keyboard shortcuts I use here aren’t already assigned to something else.  They most likely aren’t but you should double-check.
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 1856.image_thumb_2
     
    For “Macros.Samples.Utilities.TurnOnLineNumbers” we will bind it to CTRL + M, CTRL + 1:
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 0312.image_thumb_8
     


    For “Macros.Samples.Utilities.TurnOffLineNumbers” we will bind it to CTRL + M, CTRL + 0:
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 1854.image_thumb_7
     
    Click the OK button and let’s test out our shortcuts.  Go to any source code:
    Phím tắt ẩn/hiện số zòng (line number) trong Visual Studio 4024.image_thumb_6
     
    As you can see, I have line numbers on already so I’ll press CTRL + M, CTRL + 0 to turn them off and CTRL + M, CTRL + 1 to turn them back on again.
    msdn


      Hôm nay: 29th March 2024, 13:27