...">Geek Answers HandbookFind and replace the word instance in vimWhat I'm trying to do is find an instance of a piece of code, for example.<textarea id="question1"> and replace it with a part of yourself: <textarea id="question1" name="question1"> How can I refer to "question1" in:% s vim?+4vimbswinnerton Nov 29 '12 at 16:30source share1 answer :%s;<textarea id="\([^"]*\)">;<textarea id="\1" name="\1">; +4Prince john wesley Nov 29 '12 at 16:34source shareMore articles:DFP: Get Current Click-Through URL - google-dfpConvert string to multidimensional array - javascriptToken Distribution in an Alloy - alloyWordpress $ wpdb-> get_results returns only one row - databaseJQuery animation callbacks don't run sequentially - javascriptWhy can't these variables move around? - c ++Unable to access delegated calendar using cfexchangeConnection - coldfusionJava DAO Deployment Testing - javaCreating Ninject Interceptors works with asynchronous methods - c #section tag inside an unordered list or around? - html5All Articles
What I'm trying to do is find an instance of a piece of code, for example.
<textarea id="question1">
and replace it with a part of yourself:
<textarea id="question1" name="question1">
How can I refer to "question1" in:% s vim?
:%s;<textarea id="\([^"]*\)">;<textarea id="\1" name="\1">;