Skip to content

Instantly share code, notes, and snippets.

View alanoakes's full-sized avatar

Parker alanoakes

  • linkedin.com/in/parker-oakes
  • Memphis, TN
  • 07:30 (UTC -06:00)
View GitHub Profile
@kmanalo
kmanalo / twiddlecase.vim
Last active December 21, 2025 03:56
twiddlecase.vim
" https://github.com/tangledhelix/dotfiles/blob/master/vim/plugin/twiddlecase.vim
" Toggles between uppercase, lowercase, titlecase. Bind to a mapping, then
" select something and keep hitting the map until you get what you want.
function! TwiddleCase(str)
if a:str ==# toupper(a:str)
let result = tolower(a:str)
elseif a:str ==# tolower(a:str)
let result = substitute(a:str,'\(\<\w\+\>\)', '\u\1', 'g')
else