Skip to content

Commit

Permalink
README.md を更新
Browse files Browse the repository at this point in the history
  • Loading branch information
uga-rosa authored Jun 24, 2024
1 parent fdfd65c commit d0dd477
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,4 @@ export const snippets: Record<string, TSSnippet> = {
},
};
```
![autoload-function](https://github.com/uga-rosa/denippet.vim/assets/82267684/463df60e-f1d3-4e7d-acb3-1f4d8e9566d4)

```typescript
import { TSSnippet } from "https://deno.land/x/[email protected]/loader.ts";

export const snippets: Record<string, TSSnippet> = {
"for (postfix)": {
prefix: ".for",
prefix_regexp: "([a-zA-Z$_][a-zA-Z0-9$_]*).for",
body: (_denops, matched) => {
const variable = matched?.[1];
if (variable == null) {
return [];
}
return [
`for (const \${1:s} of ${variable}) {`,
`\t$0`,
`}`,
];
},
},
};
```
![prefix_regexp](https://github.com/uga-rosa/denippet.vim/assets/82267684/532de77e-2084-44a6-aaea-8b9665e6d251)
![autoload-function](https://github.com/uga-rosa/denippet.vim/assets/82267684/463df60e-f1d3-4e7d-acb3-1f4d8e9566d4)

0 comments on commit d0dd477

Please sign in to comment.