Skip to content

Instantly share code, notes, and snippets.

@Velrok
Velrok / kitty.conf
Created August 30, 2023 10:40
symbol_map config for kitty terminal using Symbols Nerd Font Mon as fallback font for icons
# https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points
symbol_map U+E5FA-U+E62B Symbols Nerd Font Mono
# Devicons
symbol_map U+e700-U+e7c5 Symbols Nerd Font Mono
# Font Awesome
symbol_map U+f000-U+f2e0 Symbols Nerd Font Mono
# Font Awesome Extension
symbol_map U+e200-U+e2a9 Symbols Nerd Font Mono
# Material Design Icons
symbol_map U+f0001-U+f1af0 Symbols Nerd Font Mono
@LintaoAmons
LintaoAmons / .tmux.conf
Created October 8, 2022 09:50
Popup terminal with tmux
# ... your other config
bind-key -n M-3 run-shell 'toggle-tmux-popup'
# you can switch `M-3` to any keybindings you like.
@CRAG666
CRAG666 / easyToggleTerm.lua
Last active December 25, 2023 16:03
simple toggleterm writing in pure lua for neovim
local bufname = "SingleTerminal"
-- Define term position and size
local splitconfig = "bot 20 new "
local jobid = -1
local bufid = -1
local terminal_opened_win_id = -1
local function showTerm(wind_id)
terminal_opened_win_id = wind_id
vim.cmd(splitconfig .. "| buffer " .. bufname)
@EgZvor
EgZvor / jumpfile.vim
Created November 8, 2021 18:22
Vim mappings to jump through jumplist by files
if exists('g:loaded_jumpfile')
finish
endif
let g:loaded_jumpfile = 1
function! JumpFileComputePrevious()
let [jump_list, pos] = getjumplist()
let previous_list = jump_list
\ ->map({idx, val -> [idx, val]})[:pos]
@davidteren
davidteren / nerd_fonts.md
Last active June 27, 2024 21:32
Install Nerd Fonts via Homebrew [updated & fixed]
@sindresorhus
sindresorhus / esm-package.md
Last active June 29, 2024 11:18
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@kristijanhusak
kristijanhusak / 1. Toggle-kitty-and-neovim-colors.md
Last active March 6, 2024 18:15
Toggle between light and dark colorschemes for both neovim and kitty

Requirements:

  • Neovim v0.4+
  • Python 3.4+ and pynvim
  • Kitty
  • Zsh, but would probably work with any shell if configured properly
  • Your favorite dark and light colorschemes

Installation

  1. Add below python script to ~/.config/kitty/ folder. Make sure to make it executable (chmod +x ~/.config/kitty/colors)
  2. Set up your dark/light colorscheme, and where to store kitty colors configuration (line 4 to 9)
@ctrlcctrlv
ctrlcctrlv / rust-maintainer-perfectionism.md
Last active January 4, 2024 15:42
Rust maintainer perfectionism

Rust maintainer perfectionism, or, the tragedy of Alacritty

I did not submit this to Hacker News and did not intend that this post would have high circulation but have no real problem with it being there or with it having such. I have more recent comments below. This post is from January 2020 and predates the Modular Font Editor K (MFEK) project.

I have not worked on Rust projects in quite a while, and don't know if I ever will again. I feel many crate maintainers are way too perfectionist, for example, despite all the developer hours that went into this PR, it took the effort within years to be (halfway) merged.

There's always a reason not to merge, isn't there? It would be better done with a new nightly language feature, or the function signature should have a where clause, or the documentation is not perfect. There's always a new nit to pick in the world of Ru