Skip to content

Instantly share code, notes, and snippets.

@jephir
Last active December 17, 2015 04:09
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 jephir/5548165 to your computer and use it in GitHub Desktop.
Save jephir/5548165 to your computer and use it in GitHub Desktop.
Vim replace command (regex) for converting C int preprocessor defines to Rust constants
:%s/\v\#define (\w+)\s*(.+)/pub static \1: c_int = \2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment