An open API service indexing awesome lists of open source software.

https://github.com/msgul/sofa-extension

Sofa (Stackoverflow Answers) is a vscode extension that helps you to search a question on stackoverflow.com and brings you the scripts in the answers.
https://github.com/msgul/sofa-extension

vscode-extension

Last synced: 12 months ago
JSON representation

Sofa (Stackoverflow Answers) is a vscode extension that helps you to search a question on stackoverflow.com and brings you the scripts in the answers.

Awesome Lists containing this project

README

          

# Sofa (StackOverflow Answers) Extension

Sofa is an **open-source** MIT-licensed **vscode extension** that is designed to speed up your coding time by bringing you the answers related to your problem on stackoverflow.com.

## Features

- Retrieves all answers and scrapes the code out of them for you to use it.
- Retrieved codes can be selected from vscode QuickPick.
- Language of the current file is added to your question automatically.
- Opens your browser and directs you to the StackOverflow page (optional)

## Usage

- Type your problem and press ctrl + enter to retrieve the codes. You can pick one of the results from vscode.QuickPick. Press ctrl + enter again to get the StackOverflow question page.

![alt text](media/demo.gif)

### Examples

- Python

```py
# read line by line
with open(filename) as file:
lines = file.readlines()
lines = [line.rstrip() for line in lines]
```

- Html

```html



Left

Right



```
- Javascript

```js
// traverse all elements
var all = document.getElementsByTagName("*");
for (var i = 0; i < all.length; i++) {
console.log(all[i].nodeName);
}
```