https://github.com/nikiforovall/surround-with-csharp
Brings support of surround-with functionality to vscode for C#.
https://github.com/nikiforovall/surround-with-csharp
csharp snippets snippets-collection vscode vscode-extension
Last synced: 4 months ago
JSON representation
Brings support of surround-with functionality to vscode for C#.
- Host: GitHub
- URL: https://github.com/nikiforovall/surround-with-csharp
- Owner: NikiforovAll
- Created: 2020-06-24T10:26:30.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-30T21:01:32.000Z (over 3 years ago)
- Last Synced: 2025-10-28T09:26:02.699Z (8 months ago)
- Topics: csharp, snippets, snippets-collection, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=nikiforovall.surround-with-csharp
- Size: 1.25 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Surround with CSharp
Brings support of surround-with functionality to vscode for C#. Inspiration comes from from *Visual Studio 2019*.
**Blog post:** [nikiforovall.github.io/productivity/csharp/vscode/2020/08/21/surround-with-csharp](https://nikiforovall.github.io/productivity/csharp/vscode/2020/08/21/surround-with-csharp.html)
## Features
* You can surround you code based on two approaches:
* Trigger snippet insertion as a Command
* Trigger snippet insertion as a CompletionItem
## Supported Snippets
| Snippet | Alias | Keybinding |
|----------------|-----------------|---------------------|
| namespace | #namespace | CTRL+SHIFT+S N |
| class | #class | |
| interface | #interface | |
| struct | #struct | |
| enum | #enum | |
| if | #if | CTRL+SHIFT+S I |
| dif | #dif | |
| else | #else | CTRL+SHIFT+S E |
| do | #do | CTRL+SHIFT+S D |
| while | #while | CTRL+SHIFT+S W |
| for | #for | CTRL+SHIFT+S F |
| foreach | #foreach | CTRL+SHIFT+S CTRL+F |
| reverse for | #forr | |
| try-catch | #try | CTRL+SHIFT+S T |
| try-finally | #tryf | CTRL+SHIFT+S CTRL+T |
| lock | #lock | CTRL+SHIFT+S L |
| checked | #checked | |
| unchecked | #unchecked | |
| unsafe | #unsafe | |
| using | #using | |
| region | #region | |
| method | #method | CTRL+SHIFT+S CTRL+M |
| local-function | #local-function | CTRL+SHIFT+S M |
### Demo: Surround via command

### Demo: Surround via CompletionItem

Action | Alias | Shortcut
-------------------|--------------------------------|-------------------------------------
C#: Surround With | `surround.with` | `CTRL + SHIFT + S, CTRL + SHIFT + S`
Trigger completion | `editor.action.triggerSuggest` | `CTRL + SPACE`
## Known Issues
## Release Notes
Please see [CHANGELOG.md](./CHANGELOG.md)