Plugin https://github.com/fatih/vim-go
Tutorial https://github.com/fatih/vim-go-tutorial
Vimrc https://github.com/fatih/dotfiles/blob/master/vimrc
- File
:GoRun %
- Package
:GoRun
- Debug
:GoDebugStart
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"time" | |
"github.com/vultr/govultr/v2" | |
"golang.org/x/oauth2" |
michael ~/repos/qutebrowser (:951a14a66|✚1) | |
Φ ./scripts/mkvenv.py 16:35 | |
==================== Creating virtual environment ==================== | |
$ rm -r .venv | |
$ python3 -m venv .venv | |
==================== Upgrading initial packages ==================== | |
venv$ pip install -U pip | |
Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (22.0.2) |
import osproc, streams, strutils, os | |
let l = "" | |
let ps = startProcess("/sbin/iwlist", "", ["wlp2s0", "scan"]) | |
let s = outputStream(ps) | |
while s.readLine(l): | |
echo(l) |
# Code adapted from the captures tests | |
# nim/tests/stdlib/nre/captures.nim | |
import nre | |
echo("abc".match(re"(?<letter>\w)").captures["letter"]) |
proc getWikiDbId*(title: string): int = | |
let db = open(db_srv, db_usr, db_pas, db_nam) | |
let sql = sql(""" | |
SELECT id | |
FROM page | |
WHERE title = ? | |
""") | |
let id = getValue(db, sql, title) |
config/nim.cfg(42, 3) Hint: added path: '/home/michael/.nimble/pkgs/' [Path] | |
config/nim.cfg(44, 5) Hint: added path: '/opt/nimble/pkgs/' [Path] | |
Hint: used config file '/usr/lib/nim/config/nim.cfg' [Conf] | |
Hint: system [Processing] | |
lib/system.nim(10, 1) Hint: 103 [Processing] | |
lib/system.nim(25, 3) Hint: 103 [Processing] | |
lib/system.nim(43, 3) Hint: 129 [Processing] | |
lib/system.nim(47, 3) Hint: 135 [Processing] | |
lib/system.nim(52, 1) Hint: 143 [Processing] | |
lib/system.nim(56, 1) Hint: 145 [Processing] |