Skip to main content

A tool for converting code snippets from Ultisnips to YASnippet format

Project description

Ultyas - Ultisnips to YASnippet Conversion Tool

Ultyas is a command-line tool designed to simplify the process of converting code snippets from Ultisnips (Vim) to YASnippet format (Emacs).

With Ultyas, you can effortlessly migrate your code snippets to the YASnippet format, saving you valuable time and effort.

Installation

Here is how to install Ultyas locally to ~/.local/bin/ultyas using pip:

pip install --user ultyas

Command usage example

~/.local/bin/ultyas ~/.vim/UltiSnips/python.snippets -o ~/.emacs.d/snippets/python-mode/

Options and flags

usage: ultyas <file.snippets> -o <yasnippet-major-mode-dir>

A command-line tool for converting code snippets from Ultisnips to YASnippet format.

positional arguments:
  ultisnips_file        The Ultisnips .snippets file (e.g. '~/.vim/UltiSnips/python.snippets')

options:
  -h, --help            show this help message and exit
  -o YASNIPPET_DIR, --yasnippet-dir YASNIPPET_DIR
                        The YASnippet snippets major mode directory (e.g. '~/.emacs.d/snippets/python-mode/')
  -i {auto,fixed,nothing}, --yas-indent-line {auto,fixed,nothing}
                        Add one of the following comments to the YASnippet snippets that will be generated: "# expand-env: ((yas-indent-line 'fixed))" or "# expand-env: ((yas-indent-line
                        'auto))". For more information on 'yas-indent-line', visit: https://joaotavora.github.io/yasnippet/snippet-reference.html#yas-indent-line
  -t CONVERT_TABS_TO, --convert-tabs-to CONVERT_TABS_TO
                        Convert the tabs that are in the generated snippets to the string passed to this option (Default: The indentation marker '$>')
  -m, --mkdir           Ensure that the directory passed to the --yasnippet-dir flag exists
  -v, --verbose         Verbose mode
  -q, --quiet           Quiet mode

License

Copyright (c) James Cherti

Distributed under terms of the GNU General Public License version 3.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultyas-1.0.6.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultyas-1.0.6-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file ultyas-1.0.6.tar.gz.

File metadata

  • Download URL: ultyas-1.0.6.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for ultyas-1.0.6.tar.gz
Algorithm Hash digest
SHA256 3011c410e487186a540cdc8f6af6a516c49ce82c4fd99f2bdda19bf2edc4f473
MD5 7397013d8140e6abfc938e90f3707ded
BLAKE2b-256 d31d5a04b589306f7cc4cd9dc8fe3dd81dbc36b1639501462ed3d6f1f2d9f735

See more details on using hashes here.

File details

Details for the file ultyas-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ultyas-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for ultyas-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 172026724d04fefa20d773d103cacdc7f88c07f14eef3b0094d2f6ba8160a321
MD5 a37751179a5b997f5b680b5706eab600
BLAKE2b-256 7996523f60d91574b7f0d9e575c207cfc004f5935eb685a3f121c2e6b57cd5b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page