yeeeet's blog

By yeeeet, history, 4 weeks ago, In English,

How do you provide input with comments at the top and run on c++14 with Sublime Text ?

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

It's a package called SublimeInput.

You can specify your own key bindings for the package, using which it would compile your source code, and run it with the input from the source code itself, and give the output in sublime itself.

You can specify the compile and run shell commands for any language, along with how your input placeholder at the top looks like.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How do you specify the compile and run shell commands

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You can modify the SublimeInput.sublime-settings file.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        So like change it into { "build_schemas" : { "cpp" : { "shell_cmd" : "g++ -std=c++14 "$$${file}" -o "$$${file_path}/$$${file_base_name}" && "$$${file_path}/${file_base_name}"", "input_start" : "/*input", "input_end" : "*/" } } }

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Personally I found this plugin to be great for testing on various inputs (it allows multiple TCs and runs the program against all of them on every compile)

https://codeforces.com/blog/entry/60627