Certain company blocking a certain hosting provider? No problem, just tunnel the process through a small VPS with wireguard.
Consider server A your blocked server and server B your VPS.
Server A:
| "=== VIM SETTINGS =====================================================================" | |
| unlet! skip_defaults_vim | |
| source $VIMRUNTIME/defaults.vim | |
| syntax enable | |
| filetype plugin indent on | |
| set hlsearch incsearch ignorecase | |
| set number relativenumber | |
| set wrap linebreak |
The following shows how to replicate some of Surround's features if you don't happen to have it installed.
NOTE: We only dealt with the simplest cases, here, and the convoluted nature of some of these commands shows how well designed and useful that plugin is. And let's not talk about all the corner cases it handles.
Install it, it's worth it.
| --[[ | |
| Copyright (C) 2023 kevincs | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 | |
| of the License, or (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. |
| { | |
| 'AsyncGenerator': ['asend', 'athrow'], | |
| 'AsyncIterable': ['__aiter__'], | |
| 'AsyncIterator': ['__anext__'], | |
| 'Awaitable': ['__await__'], | |
| 'ByteString': ['__getitem__', '__len__'], | |
| 'Callable': ['__call__'], | |
| 'Collection': ['__contains__', '__iter__', '__len__'], | |
| 'Container': ['__contains__'], | |
| 'Coroutine': ['__await__', 'send', 'throw'], |
| import { | |
| extract, | |
| test as containsFrontmatter, | |
| } from "https://deno.land/[email protected]/encoding/front_matter/any.ts"; | |
| import { walk } from "https://deno.land/[email protected]/fs/mod.ts"; | |
| import { stringify } from "npm:[email protected]" | |
| async function writeFile(path: string, attrs: { [key: string]: any }, body: string) { | |
| await Deno.writeTextFile(path, `---\n${stringify(attrs)}\n---\n\n${body}`) | |
| } |
| " Disable compatibility with vi which can cause unexpected issues. | |
| set nocompatible | |
| " Enable type file detection. Vim will be able to try to detect the type of | |
| " file in use. | |
| filetype on | |
| " Enable plugins and load plugin for the detected file type. | |
| filetype plugin on |
| -- vim9script | |
| -- # cfilter.vim: Plugin to filter entries from a quickfix/location list | |
| -- # Last Change: Jun 30, 2022 | |
| -- # Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com) | |
| -- # Version: 2.0 | |
| -- # | |
| -- # Commands to filter the quickfix list: | |
| -- # :Cfilter[!] /{pat}/ | |
| -- # Create a new quickfix list from entries matching {pat} in the current | |
| -- # quickfix list. Both the file name and the text of the entries are |
| " vim9script that uses jobs to find a word's defintions | |
| " and post them to the quickfix list | |
| " Last Change: 2022 Mar 31 | |
| " Maintainer: Christopher Pane <[email protected]> | |
| vim9script | |
| const api = "https://api.dictionaryapi.dev/api/v2/entries/en/" | |
| def OnResponse(ch: channel, msg: string) | |
| const json = json_decode(msg) |