Git Product home page Git Product logo

cpp-sublime-snippet's Introduction

C++ Snippets for Sublime Text

This package adds some useful snippets for Sublime Text for C++11. It matches the following style:

if(/* condition */) {
    /* code */
}

Installation

Package Control (recommended)

The easiest way to install the C++ Snippets is by using Package Control. Installing it is documented here.

  • Open Package Control (or hit Ctrl+Shift+P or Cmd+Shift+P)
  • Type install and hit enter
  • Type C++ Snippets and hit enter again

Cloning the Repository

You can manually install the package by using Git.

  • Navigate to Sublime’s Packages directory
  • Run git clone https://github.com/Rapptz/cpp-sublime-snippet.git

To find out where the Packages directory is, you can go to Preferences and Browse packages…. This will open the directory in your file explorer.

Downloading the Archive

If you don’t have Package Control or Git, you can also download the package. However you really should be using Package Control, because the process is simpler.

  • Open https://github.com/Rapptz/cpp-sublime-snippet in your browser
  • On the right hand side there is a Download ZIP button – click it
  • Go to Preferences and Browse packages… which opens the Packages directory
  • Extract the archive inside the Packages directory

Documentation

Documentation can be found in the reference.md file.

License

The overall collection of snippets is licensed under the MIT License but the individual snippets themselves are licensed under CC0.

cpp-sublime-snippet's People

Contributors

bigdavedev avatar miquelmassot avatar rapptz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp-sublime-snippet's Issues

cpp-snippets for vscode

Hi, I've ported your cpp-sublime-snippets for vscode editor. I've attributed this repo and stated that the vscode snippets mirrors this repo only. You can see it here - https://marketplace.visualstudio.com/items?itemName=agauniyal.cpp-snippets. I can even open a PR on this repo which links to vscode extension page.

I am not doing any other change to existing snippets so I thought why not keep the same source for multiple editors. If you've any objection to the said vscode plugin, I'll take it down asap otherwise it'll benefit some other users along the way.

Thank you for your work on cpp-sublime-snippet.

It doesn't work with C++11

I use package sublime-cpp11 for C++11 syntax highlighting.

sublime-cpp11 Installation

To use this package as the default, you must disable the built-in C++ package.

Under Preferences->Settings - User, add "C++" to the "ignored_packages" list:
"ignored_packages":
[
"C++"
],

But after that, snippet doesn't work, how to solve it?

Adding a Sublime project file to maintain consistent identation

What do you think about adding a Sublime Text project file that basically sets identation behavior:

{
    "folders":
    [
        {
            "name": "cpp-sublime-snippet",
            "path": "/"
        }
    ],
    "settings":
    {
        "tab_size": 4,
        "translate_tabs_to_spaces": false
    }
}

I can add that in another pr, if you want.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.