Skip to content

Instantly share code, notes, and snippets.

@wojukasz
wojukasz / keybindings.json
Last active March 11, 2026 09:24
⚡VSCode + WhichKey + Vim keybindings | Works with VScode forks like AntiGravity, Cursor, etc | Copy-paste ready config | 5-min setup | Full version: https://github.com/wojukasz/VimCode
[
// ╔══════════════════════════════════════════════════════════════════════════════════╗
// ║ VSCODE VIM LAZYVIM KEYBINDINGS ║
// ║ Modifier Key Bindings (Ctrl, Alt, Shift) ║
// ╚══════════════════════════════════════════════════════════════════════════════════╝
//
// This file contains keybindings that use modifier keys (Ctrl, Alt, Shift) and special
// characters that need VSCode's key binding system (not Vim's).
//
// IMPORTANT: DO NOT put space-leader bindings here (<leader>...)
@GiulioCentorame
GiulioCentorame / doom_wsl2.md
Last active December 21, 2025 13:55
Doom Emacs on WSL2
@ninnypants
ninnypants / remove-empty-p.php
Last active October 5, 2025 18:20
Remove empty p tags from WordPress posts
<?php
add_filter( 'the_content', 'remove_empty_p', 20, 1 );
function remove_empty_p( $content ){
// clean up p tags around block elements
$content = preg_replace( array(
'#<p>\s*<(div|aside|section|article|header|footer)#',
'#</(div|aside|section|article|header|footer)>\s*</p>#',
'#</(div|aside|section|article|header|footer)>\s*<br ?/?>#',
'#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#',
'#<p>\s*</(div|aside|section|article|header|footer)#',