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
" ~/.vim/after/ftplugin/text.vim | |
let line_count = line('$') | |
let b:word_count = 0 | |
" TTS using vim-piper plugin. Point to your installation | |
let g:piper_bin='/home/woland/tmp/piper/piper-bin/piper/piper' | |
let g:piper_voice='/home/woland/tmp/piper/piper-voices/en/en_US/joe/medium/en_US-joe-medium.onnx' | |
" This condition is for those who read large txt file in vim |
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
#!/bin/bash | |
# MIME type of the file | |
mime=$(file --mime-type -b "$1" 2>/dev/null) | |
# Handle different MIME types | |
case "$mime" in | |
text/*) | |
# Use vim for text files | |
vim "$1" |
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
vim9script | |
def GetWord() | |
var word_under_cursor = expand('<cword>') | |
var result = system('dict -d wn ' .. word_under_cursor) | |
execute 'vnew' | |
setlocal buftype=nofile | |
setlocal bufhidden=hide |
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 | |
# xkcdsh | |
# info: | |
# grabs the latest xkcd comic and displays it with sixel graphics | |
# Written By Wolandark | |
# https://www.github.com/wolandark | |
# Dependency: | |
# libsixel | |
# curl |
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 | |
get_terminal_height() { | |
tput lines | |
} | |
get_terminal_width() { | |
tput cols | |
} |
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 g:alt_keymap = 'persian' " Change to your prefered keymap located at $VIMRUNTIME/keymap/ | |
let g:alt_enabled = 1 | |
function! CallToggleKeymap() | |
if g:alt_enabled | |
call ToggleKeymap() | |
endif | |
endfunction | |
function! ToggleKeymap() |
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
# Get a load of Loremipsum from your shell using curl: | |
curl https://www.lipsum.com/feed/json | jq -r '.feed.lipsum' | |
# Get a load of AI generated occult mystical gibberish from your shell using curl: | |
curl https://woland.tilde.team/mysticipsum.txt | |
# Its possible to add a function to your shellrc that does both. |
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
! _ __ __ __ | |
!| | / /___ / /___ _____ ____/ / | |
!| | /| / / __ \/ / __ `/ __ \/ __ / | |
!| |/ |/ / /_/ / / /_/ / / / / /_/ / | |
!|__/|__/\____/_/\__,_/_/ /_/\__,_/ | |
! | |
! _ __ | |
! | |/ /________ _________ __ _______________ _____ | |
! | // ___/ _ \/ ___/ __ \/ / / / ___/ ___/ _ \/ ___/ | |
! / |/ / / __(__ ) /_/ / /_/ / / / /__/ __(__ ) |