Giter Site home page Giter Site logo

ultisnips-vscode's Introduction

About

I don't always use VSCode. But when I do, I use Ultisnips.

This script allows you to write all of your snippets in vims Ultisnips format, and convert the whole batch to json format for use in vscode.

Installation

  • Clone this repository
  • cd ultisnips-vscode
  • pip install .

Usage

  • Create a config file at ~/.vscode/ultisnips-vscode.json
  • Add the paths to your snippets folders.
  • On a mac this file might contain:
{
    "ultisnips-snippets":  "~/.vim/UltiSnips/",
    "vscode-snippets": "~/Library/Application Support/Code/User/snippets/"
}
  • On linux this file might contain:
{
    "ultisnips-snippets":  "~/.config/nvim/UltiSnips",
    "vscode-snippets": "~/.config/Code/User/snippets/"
}
  • Source your shell, or log out and log back in so the script is in your $PATH
  • Run the command ultisnips_to_vscode to synchronize your snippets. This will output something like:
------------------------------------------------------------------------------------------------------------------------
/Users/ethan/.vim/UltiSnips/zsh.snippets           ----->     /Users/ethan/Library/Application Support/Code/User/snippets/shellscript.json
/Users/ethan/.vim/UltiSnips/texmath.snippets       ----->     /Users/ethan/Library/Application Support/Code/User/snippets/tex.json
/Users/ethan/.vim/UltiSnips/tex.snippets           ----->     /Users/ethan/Library/Application Support/Code/User/snippets/tex.json
/Users/ethan/.vim/UltiSnips/python.snippets        ----->     /Users/ethan/Library/Application Support/Code/User/snippets/python.json
/Users/ethan/.vim/UltiSnips/texmath.snippets       ----->     /Users/ethan/Library/Application Support/Code/User/snippets/markdown.json
/Users/ethan/.vim/UltiSnips/markdown.snippets      ----->     /Users/ethan/Library/Application Support/Code/User/snippets/markdown.json
/Users/ethan/.vim/UltiSnips/all.snippets           ----->     /Users/ethan/Library/Application Support/Code/User/snippets/global.code-snippets
------------------------------------------------------------------------------------------------------------------------

ultisnips-vscode's People

Contributors

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