Блог пользователя sprkgoyal

Автор sprkgoyal, 4 года назад, По-английски

(This tutorial is only for Windows Users)

Many of you must have searched, "How to run Kotlin in Sublime Text 3?", but never found anything relevant.

So, here is the solution.

https://github.com/sprkgoyal/Sublime-Builds/blob/master/Kotlin.sublime-build

Go to this link and save that build as a new build system in your sublime text.

(Open Sublime Text -> Tools -> Build System -> New Build System, Name the file as Kotlin.sublime-build)

Now, if you don't have Kotlin compiler. First Download Java from here.

Then download PBox and then in the command prompt type the command "pbox install kotlin" (without quotes)

Right click on My Computer Icon -> Properties -> Change Settings -> Advanced -> Environment Variables.

Now Copy "C:\Programs\kotlin\bin" (without quotes) (or you can find kotlin compiler downloaded before, and copy the path of bin folder)

Under System Variables, find Path. Then double click on Path -> New -> paste the path of bin folder.

Your Sublime is ready to compile and run Kotlin code.

PS1: Since there is no official support for Kotlin in Sublime Text, you may not be able to see coloured text in the editor. Other than that, everything will work fine.

PS2: To use this build, first create two files "inputf.in" and "outputf.in" in the same folder where you are going to save your codes. "inputf.in" file is used to read inputs in your code and your code prints the output in "outputf.in" file. Note: Put your input in "inputf.in" before compiling the file.

  • Проголосовать: нравится
  • +45
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Many of you must have searched, "How to run Kotlin in Sublime Text 3?"

I'd say this is rather brave assumption

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    If you think this is just an assumption then you are wrong. IDEs which support Kotlin like IntelliJ, Android Studio, etc. and heavy for PC. And these IDEs lacks speed which we need during the contest. So, I suppose, a fast IDE/Text Editor like Sublime is fit for it and it works really good for me. If you have any good suggestion beside this then share with us.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I am sure there is some target audience for your tool, my target is not to discourage you, but

      • Kotlin is not really popular with competitive programmers, both due to lack of support on some platforms and tight tls
      • You overestimate both slowness of JetBrains IDEs and need for typing speed versus thinking speed