Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about snippet
#1
I'm accustomed to the following workflow: using the Tab key to navigate between multiple parameters and using the Enter key to move to the end position. Below is a snippet of code from LINQPad and its usage effect

1.In the LA code snippet definition window, it supports dragging and dropping LINQPad code snippet files and converts them into LA code snippets

https://i.ibb.co/F0CbyNP/lp7.gif
https://i.ibb.co/74rYJ1Z/sps.gif

2. Enable editing of built-in default code snippets. Currently, they cannot be edited, but sometimes I need to make modifications to the code.

3. In the pop-up list of code snippets, right-clicking should display a menu item: Edit, similar to the functionality in QM. Clicking on it should directly open the editing window for that item.
 
Code:
Copy      Help
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Function</Title>
            <Shortcut>fu</Shortcut>
            <Description>Creates a function</Description>
            <Author></Author>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
                <SnippetType>SurroundsWith</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Declarations>
                <Literal Editable="True">
                    <ID>functionname</ID>
                    <ToolTip>Enter the function's name</ToolTip>
                    <Function></Function>
                    <Default>functionname</Default>
                </Literal>
                <Literal Editable="True">
                    <ID>parameter1</ID>
                    <ToolTip>Enter parameter1's name 3</ToolTip>
                    <Function></Function>
                    <Default>parameter1</Default>
                </Literal>
                <Literal Editable="True">
                    <ID>parameter2</ID>
                    <ToolTip>Enter parameter2's name</ToolTip>
                    <Function></Function>
                    <Default>parameter2</Default>
                </Literal>
            </Declarations>
            <Code Language="CSharp">
                <![CDATA[void $functionname$ (string $parameter1$, int $parameter2$) {
    $selected$$end$
}]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>



Attached Files
.zip   fu_Function.zip (Size: 608 bytes / Downloads: 24)


Messages In This Thread
about snippet - by Davider - 02-26-2024, 10:15 PM
RE: about snippet - by Gintaras - 02-27-2024, 07:18 AM
RE: about snippet - by Davider - 02-27-2024, 08:18 AM
RE: about snippet - by Gintaras - 02-27-2024, 09:41 AM
RE: about snippet - by Davider - 02-29-2024, 01:45 AM
RE: about snippet - by Gintaras - 04-22-2024, 06:37 AM
RE: about snippet - by Davider - 04-22-2024, 12:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)