Sublime Forum

Создание плагина для ST3 на C++

#1

Good afternoon.
Can I create plugins for Sublime Text 3/4 in a language other than python, for example C++?
If so, how?
Thanks.

0 Likes

#2

You can write a python plugin that uses code written in C++ but you can’t directly write plugins in C++.

0 Likes

#3

Yes, but I don’t know python very well. Is it possible to write C++ code that will call python code and make ST see this plugin (. cpp)?

0 Likes

#4

Kind of. Sublime Text will not load a plugin written in C++, but you can make a python plugin load a compiled C++ library. See https://docs.python.org/3/extending/extending.html

0 Likes

#5

I’ve tried this, but this method requires writing a lot of python code.
How else can I minimize the size of python code?

0 Likes

#6

There are a number of ways getting cpp to python.

  1. You can build your cpp app with python bindings
  2. You can use tools like https://wiki.python.org/moin/cppyy to compile cpp on the fly

But afaik there’s no way you can make a plugin with zero python code

Удачи!

0 Likes