Skip to content

Instantly share code, notes, and snippets.

@avrahamappel
Created July 26, 2022 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avrahamappel/1599de0949c9db930bbe7f08f7b4afb0 to your computer and use it in GitHub Desktop.
Save avrahamappel/1599de0949c9db930bbe7f08f7b4afb0 to your computer and use it in GitHub Desktop.
Some vim macros for PHP
# Boilerplate for PHP class
let @p='i%dawO<?"
onamespaceJ:s~Äku
/wdf\....~AÄkb {}F\s;
class '
# Turn a test name comment into a snake-cased class method (PHPUnit)
let @t=':s#[^/ ]\zs #_#g
^ciwpublic functionA()o{
} /'
@avrahamappel
Copy link
Author

The CTRL sequences are still there, but the ENTERs turned into newlines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment