This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
File system abstraction with support for additional kinds of file systems, including: | |
- regular file system | |
- s3 via s3fs | |
""" | |
from datetime import datetime | |
import io | |
import os | |
from functools import wraps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- maximize.lua: maximize the current buffer in a fullscreen floating window | |
-- Author: Maddison Hellstrom - github.com/b0o | |
-- Place in your lua directory (preferably use a subdirectory as a namespace) | |
-- Usage: vim.keymap.set('n', '<leader>z', require'maximize'.toggle) | |
local M = {} | |
local state = { winid = nil } | |
local is_open = function() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Use (neo)vim as your MANPAGER | |
# Set MANPAGER=/path/to/viman in your shellrc | |
# | |
# Copyright 2020-2022 Maddison Hellstrom <https://github.com/b0o> | |
# MIT License | |
set -Eeuo pipefail | |
shopt -s inherit_errexit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
shopt -s inherit_errexit | |
declare vim="nvim" | |
command -v nvim &>/dev/null || vim="vim" | |
if [[ ! -t /dev/stdin ]]; then | |
MANPAGER='less' man "$@" -l - | |
elif [[ $# -gt 0 ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let stringOfChannel ch = | |
let ok = ref false in | |
let result = ref "" in | |
let _ = | |
try | |
while true do | |
result := !result ^ "\n" ^ input_line ch | |
done | |
with End_of_file -> ( | |
match Unix.close_process_in ch with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local shebang_regex = vim.regex([[^#!]]) | |
local blank_or_comment_line_regex = vim.regex([[^\s*\(#.*\)\?$]]) | |
local shellcheck_disable_regex = vim.regex([[^\s*#\s*shellcheck\s\+disable=\(\(SC\)\?\d\+\)\(,\(SC\)\?\d\+\)*\s*$]]) | |
local shellcheck_disable_pattern = "^%s*#%s*shellcheck%s+disable=([^%s]*)%s*$" | |
-- Searches a region of the buffer `bufnr` for a ShellCheck disable directive. | |
-- The search proceeds from `row_start` to `row_end`. | |
-- If `row_start` is greater than `row_end`, the region is effectively searched in reverse. | |
-- A table representing first directive that's found is returned, otherwise nil. | |
local find_disable_directive = function(bufnr, row_start, row_end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright (c) 2018-2021 Maddison Hellstrom (github.com/b0o) | |
# | |
# 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 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Default Applications] | |
text/plain=kitty-nvim.desktop; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Name=Kitty (Neovim) | |
GenericName=Text Editor | |
Comment=Neovim in Kitty | |
Keywords=kitty;nvim;neovim | |
Icon=kitty | |
Terminal=false | |
X-MultipleArgs=false | |
Type=Application |