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

https://github.com/mrpineapples/wrap-log-simple

Wrap your variables in VSCode using any language
https://github.com/mrpineapples/wrap-log-simple

golang javascript keyboard-shortcuts logging python ruby typescript vscode-extension

Last synced: 4 months ago
JSON representation

Wrap your variables in VSCode using any language

Awesome Lists containing this project

README

          

# Wrap Log Simple

A super simple way to log variables in VSCode regardless of your language!

This was originally developed here https://github.com/midnightsyntax/vscode-wrap-console-log

# Features

This extension will read the word under your cursor and insert it into the log function (`console.log` by default)

```
alt (option on mac) + L: console.log("variable");

cmd + L: console.log("variable", variable);
```

Not using Javascript? No problem! Wrap Log Simple can be modified on a per-language basis by updating your `settings.json`.
Example using Go:

```json
"[go]": {
"wrap-log-simple.functionName": "fmt.Println",
"wrap-log-simple.useSemicolon": false,
"wrap-log-simple.useSingleQuotes": false,
},
```

Will output

```go
func main() {
l := "log"
fmt.Println(l) // alt + L
fmt.Println("l", l) // cmd + L
}
```