Last active
December 17, 2015 04:09
-
-
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
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
:%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