Code Monkey home page Code Monkey logo

contra's Introduction

Contra

The Contra utility converts the so called "C Style Markup Language" to HTML/XML and back. The primary aim is to maximize both editability and readability by dynamizing the markup representation.

The Contra utility itself is meant to serve as a backbone for other tools, such as text editor or IDE extensions.

See documentation/* for the exact details or follow this README for a quick-start.

Example

demo

If someone is used to writing *script, this should be more comfortable to type out:

p {
    foo br;
    bar br;
}

And press Alt + Shift + C (in VScode), then to type out this with:

<p>
    foo <br/>
    bar <br/>
</p>

Yet, the two are equivalent using Contra.

Installantion

For any of the below plugins to work, the Contra executable will have to be installed on your system.

Build from source

Contra is written in C++, it must be compiled.

Make sure you have the following compile time dependencies:

  • a C++ compiler (e.g. g++)
  • Make (e.g. GNU Make)
  • Flex

After navigating to the root directory, run:

$ make

This will result in a new executable file called contra, place it in your $PATH. The easiest way to do so is by running:

$ make install

Vim

Place the file "plugin/contra.vim" inside "~/.vim/plugin/". You might have to create the directory yourself. Or, assuming your setup actually matches with the above, you could run:

$ make vim_install

Visual Studio Code

The VS Code extension is written in TypeScript, so it has to be compiled too. This will require a million node modules. You are advised to run:

$ make code_install

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.