zoukankan      html  css  js  c++  java
  • VS代码自动补全功能

    VS代码自动补全功能

    新建工程后,依次打开 工具>>代码段管理器>>选择C++>>点击 添加(A)...按钮 ,设置你的代码块的目录
    复制以下代码并存为note.snippet

    <?xml version="1.0" encoding="utf-8"?>
    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    	<CodeSnippet Format="1.0.0">
    		<Header>
    			<Title>note</Title>
    			<Shortcut>note</Shortcut>
    			<Description>note的代码片段</Description>
    			<Author>陈创录</Author>
    			<SnippetTypes>
    				<SnippetType>Expansion</SnippetType>
    				<SnippetType>SurroundsWith</SnippetType>
    			</SnippetTypes>
    		</Header>
                    <Snippet>
                        <Declarations>
    					    <Literal>
                                <ID>FunctionName</ID>
                                <ToolTip>函数名</ToolTip>
                                <Default>函数名</Default>
                            </Literal>
                            <Literal>
                                <ID>Description</ID>
                                <ToolTip>方法描述</ToolTip>
                                <Default>描述</Default>
                            </Literal>
                            <Literal>
                                <ID>Parameters</ID>
                                <ToolTip>参数列表</ToolTip>
                                <Default>1</Default>
                            </Literal>
                            <Literal>
                                <ID>Return</ID>
                                <ToolTip>返回值</ToolTip>
                                <Default>2</Default>
                            </Literal>
                            <Literal>
                                <ID>Author</ID>
                                <ToolTip>作者</ToolTip>
                                <Default>Yourname</Default>
                            </Literal>
                            <Literal>
                                <ID>Date</ID>
                                <ToolTip>日期</ToolTip>
                                <Default>2018-01-01</Default>
                            </Literal>
                        </Declarations>
                        <Code Language="cpp">
                        <![CDATA[
    /**********************************************
    * FunctionName: $FunctionName$
    * Description: $Description$
    * In Parameters: 
    * 	$Parameters$
    * Out Parameters: 
    * 	$Return$
    * @Author:$Author$
    * @CreateDate:$Date$
    **********************************************/
    void $FunctionName$()	//$Description$
    {
    	$selected$ $end$
    }
                        ]]>
                        </Code>
                    </Snippet>
    	</CodeSnippet>
    </CodeSnippets>
    
    

    在VS的代码编辑器里输入note后按tab即可。

  • 相关阅读:
    牛客算法周周练2
    牛客算法周周练2
    2020年7月7日Java学习日记
    2020年7月6日Java学习日记
    练习29--if语句
    练习28--布尔练习
    练习27--记忆逻辑
    第18~19讲课后作业
    第20讲:内嵌函数和闭包
    练习25--更多更多练习
  • 原文地址:https://www.cnblogs.com/charleechan/p/11434912.html
Copyright © 2011-2022 走看看