sponsor Vim development Vim logo Vim Book Ad

soicode.vim : Soicode plugin for vim

 script karma  Rating 4/1, Downloaded by 43  Comments, bugs, improvements  Vim wiki

created by
Kimi Löffel
 
script type
utility
 
description
# soicode.vim

My implementation of the soicode
[vscode plugin](https://marketplace.visualstudio.com/items?itemName=swissolyinfo.soicode)
made for the [Swiss Olympiad in Informatics](https://soi.ch).
inside of vim.

## Features

This plugin only activates if you are in a working directory which contains
the word `soi`.

- You can Create  a `.stoml` file with the `:SOICreateStoml` command.
  It automatically pastes your clipboard to this file,
  so you have to copy the `.stoml` file first.

  The created `.stoml` file has the same name
as the previous file without the file ending.

- You can run one sample from the `.stoml` file
  with the `:SOIRunOneSample <sample>` command.
  The cpp file will be compiled and run with the input
  from the `<sample>.input` value from the `.stoml` file.

  After that the output of the program will be shown in a new tab.

- You can run all samples from the `.stoml` file
  with the `SOI:RunAllSamples` command.
  The cpp file will be compiled and run with the input
  of all the declared samples from the `.stoml` file.

  After that the output of the program for each sample will be shown in a new tab.

- You can add a template into the current file with the `:ISOInsertTemplate` command.
  If you set the `g:soicode_auto_insert_template` option to 1 in your config file
  the template will automatically be inserted if you open a new cpp file in a directory
  that contains the word `soi`

### Todo

- [x] Create a `.stoml` file with the given in- and outputs.
- [x] Run one sample from the `.stoml` file.
- [x] Run all samples from the `.stoml` file.
- [ ] Run with manual input
- [ ] Debug code
- [x] Insert a template
 
install details
Use your package manager or clone it manually from github https://github.com/MrSpoony/soicode.vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
soicode.vim.tar.gz 0.0.1 2022-04-12 7.0 Kimi Löffel Initial upload
ip used for rating: 18.207.133.27

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN