Giter Site home page Giter Site logo

vim-pyopencl's Introduction

SYNOPSIS:

Vim highlighting for PyOpenCL


© Andreas Kloeckner 2011, MIT license

Uses parts of mako.vim by Armin Ronacher.

Installation

I recommend to use Pathogen (www.vim.org/scripts/script.php?script_id=2332) to organize Vim plugins. In this case you should do following:

cd ~/.vim/bundle
git clone git://github.com/petRUShka/vim-pyopencl.git

Then do

:set filetype=pyopencl

and use

"""//CL// ...code..."""

for OpenCL code included in your Python file.

For example

cl.Program(ctx, """
    __kernel void sum(__global const float *a,
    __global const float *b, __global float *c)
    {
      int gid = get_global_id(0);
      c[gid] = a[gid] + b[gid];
    }
    """).build()

will not be highlighted. But

cl.Program(ctx, """//CL//
    __kernel void sum(__global const float *a,
    __global const float *b, __global float *c)
    {
      int gid = get_global_id(0);
      c[gid] = a[gid] + b[gid];
    }
    """).build()

will be highlighted.

You may also include a line

# vim: filetype=pyopencl.python

at the end of your file to set the file type automatically.

Optional: Install opencl.vim from github.com/petRUShka/vim-opencl

Vim-opencl is a vim plugin for support OpenCL (Open Computing Language) syntax files (*.cl).

Authors

Originally, this was a mirror of github.com/inducer/pyopencl/blob/master/contrib/pyopencl.vim

That script provides syntax highlight for PyOpenCL syntax files and included to pyopencl package: github.com/inducer/pyopencl .

vim-pyopencl's People

Contributors

petrushka avatar

Watchers

 avatar  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.