Coder Social home page Coder Social logo

of_vscode's Introduction

of_vscode.sh

bash script for generating VSCode openFrameworks project with enabled intellisense, tested on:

  • Debian 9
  • openFrameworks 0.10.0 gcc6
  • Microsoft Visual Studio Code IDE 1.27.2

additional requirements are GNU Global and clang, the first for generating the tags, and the second for some static analysis on debugging:

    sudo apt-get install global clang

install visual studio code

For working with oF and VSCode:

  • you have to install the .deb package for VSCode, download it and then run sudo dpkg -i code_*.
  • in the editor you have to install some extensions. You can do it in the extension section of the sidebar, press Ctrl+Shift+X to open it, then search C/C++ by Microsoft and C++ Intellisense by austin, and install them.

In the preference I recommend enabling `Files: Insert Final Newline' (as all the text/code files in linux should be terminated by a newline) and disabling Telemetry options to avoid sending data to Microsoft ( thanks for the software but still i would prefer not to ).

You can use VSCode with the code command. For correctly opening an oF project you have to open the workspace file, so you can do

   code ~/path/to/your/app.code-workspace

to compile and run a project from VSCode, press Ctrl+Shift+B.

of_code.sh installation

(will ask for sudo password)

    git clone https://github.com/npisanti/of_vscode.git
    cd of_vscode
    sh install.sh

If you move the folder of of_vscode.sh after installing it you have to run the installation again.

usage

   of_vscode.sh ~/path/to/your/app

or

   cd ~/path/to/your/app
   of_vscode.sh

will generate a project for your app.

custom addon include paths

The script will try to automatically adds all the paths in the src and libs folders of the addon, if present. If an addon include headers outside its folder probably is a better idea to write a .paths file with a list of paths to include for that specific addon. This file has to be put in the paths folder in the repostitory. The included .paths files will give you some clear examples on how to do it. Also pull request for .paths files are really appreciated!

custom install

Optionally you can install it with:

sh install.sh /absolute/path/to/oF/directory compilername

If you don't give the absolute path to your oF directory, it defaults to a relative path three folder above the app folder. You cannot specify compilername without giving the oF path first, if you don't give anything it uses the default compiler you set in the VSCode preference (search Intellisense). Another choice could be clang-x64 if you use it.

credits

This project was ispired by Roberto Fazio VS Code / oF example, that motivated me to try to switch from Geany to VS Code.

of_vscode's People

Contributors

npisanti avatar

Watchers

Fabian Morón Zirfas avatar

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.