Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodeCraft C/C++ SnippetsNew to Visual Studio Code? Get it now.
CodeCraft C/C++ Snippets

CodeCraft C/C++ Snippets

Preview

Estevam Souza

|
925 installs
| (0) | Free
| Sponsor
C Language Snippets for advanced in VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DevSite

Description

This extension contains a set of snippets for C and will support the C++ language in the future. I had the idea of ​​creating this extension when I was studying C and I realized that there wasn't an extension that would help me write code faster, so I decided to create this extension to help other C students. The snippets are based on the book "Complete C and Total" by Herbert Schildt and aims to help students write code faster and with fewer errors.

Objective

The purpose of this extension is to help C students write code faster and with fewer errors. Using snippets you can write code faster and with fewer errors, as snippets already come with the most used commands in the C language.

Important

The extension is still under development, so it may have some bugs, but I'm working on fixing them as soon as possible. If you find any bugs, please open an issue in the project's repository. If you have any snippet suggestions, you can also open an issue in the project repository. If you want to contribute to the project, feel free to open a pull request.

Usage Instructions

  1. Open the command palette (Ctrl+Shift+P on Windows and Linux, Cmd+Shift+P on OS X) and search for CsnippetsforVSCode.
  2. Select the snippet you want to use.
  3. Press enter to insert the snippet.
  4. Press tab to move to the next placeholder.

How to use

Snippet Description
#inc Snippet for All Header files #include

Snippet (Basic) Description
#def #define
#ifdef #if
#ifndef #ifndef
printf printf syntax
scanf scanf synatax
do do...while loop syntax
else else syntax
else if else-if syntax
if else2 if else (else 2 times)
enum An enum declaration
for for loop syntax
if if statement syntax
main main function syntax
array Declare an array
struct A struct declaration
case case (...) syntax
switch switch statement syntax
union union declaration syntax
while while loop syntax



Snippets (Programs) Description
!h Hello World Program
!ascii Check ASCII Value Program
!ln Check Largest Number Program
!fact Find Factorial of a Number
!cal Simple Calculation Program
!palin Palindrome Program


Snippets (Help) Description
?keywords help for C Keywords
?fopen help for fopen keyword
?comment help for How to Use Comments


Configuration

Configuration Description
csnippetsforvscode.useTabs Use tabs instead of spaces for indentation.
csnippetsforvscode.tabSize Specify the number of spaces a tab is equal to.
csnippetsforvscode.insertSpaces Insert spaces when pressing Tab.

Developement

Clone this package and open it in VS Code. Press F5 to open a new window with your extension loaded.

You can then change code in your editor and instantly test it by reloading the window with Ctrl+R (Windows, Linux) or Cmd+R (macOS).

Features covered

  • 📱 VSCODE — Visual Studio Code
  • 🎉 C — C Language
  • 🏪 C++ — C++ Language
  • 🚀 Snippets — Snippets for C and C++
  • 👓 Help — Help for C and C++ Keywords
  • 📃 Programs — Programs for C and C++
  • 📦 Comments — How to Use Comments in C and C++
  • 💖 azure — Azure DevOps
  • 📏 github — GitHub

Usage

Use ! for Basic Programs.

Use ? for help.

C Snippets use Tab to change one position to another

C++ Snippets use Tab to change one position to another


BuyMeACoffee

Buy Me A Coffee


👨‍🚀 Author

👋 Meus contatos!

Linkedin Badge Gmail Badge

Made with ❤️ by Estevam Souza

Contributors


Estevam Souza

💻
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft