[Ctags] ctags-vim-c/fortran_code
Brought to you by:
dhiebert
From: Michael P. <mic...@un...> - 2008-07-18 11:08:21
|
Hi there, following problem (challenge) needs to be solved. software (Fortran-code and C) ca 200.000 lines of code (without comments) 2 main developers and from time to time 'guest-developers' (it's a science project dealing with materials physics) after years of developping some variables and function-names were written in capital letters, some in small letters, some where the first letter was capitalized and so on ... (it seems that the main developers never thought of writing a file named 'coding-style') Now I got asked by tthe chief-developer (who is at the same time my boss on the institute) to find an algorithm which changes ALL identifiers (variable-names, function-names) in the code into small letters (but NOT the commented parts and NOT the keywords e.g. IF FOR WHILE etc.) and of course it shall be still compileable after the changes ;-) Well, I first thought of lex/yacc ... but then I thought 'hey, what about using ctags and vim?' a vimscript iterating through all files using the tags-files ... well, it turned out that this is not that easy ... and before I start writing my own python-script I wanted to ask you a) is it possible with vim/ctags combination to solve the task? b) how does it work? c) is there anybody among you who already solved a similar problem? I also checked the overview of the ctags-users-archive, but there I couln't see an entry with vim ... common goal is to find a simple but powerful solution using GNU-tools thx for your help Michael |