Skip to content

Instantly share code, notes, and snippets.

@marcw
Created May 5, 2011 14:35
Show Gist options
  • Save marcw/957148 to your computer and use it in GitHub Desktop.
Save marcw/957148 to your computer and use it in GitHub Desktop.
Steal the namespace + class in a file.
noremap <C-F9> gg/^namespace /e<CR>l"nyt;f\"Ny /^class /e<CR>l"Nye<ESC>
@marcw
Copy link
Author

marcw commented May 5, 2011

It will put in the 'n' register the namespace of the file with the name of the class.
It works well with Symfony2 coding standards.

With this class, your 'n' register will contain Foo\Bar\Panda

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