{"__v":3,"_id":"54d032a594f7980d0081b838","category":{"__v":16,"_id":"54cfb9a65ff7e617002bbd7f","pages":["54d031f2f530ca0d00053955","54d03212f530ca0d00053959","54d03229c795960d009f420b","54d03243c795960d009f420d","54d03268c795960d009f420f","54d032a594f7980d0081b838","54d032c0c795960d009f4211","54d032e394f7980d0081b83c","553a7e020074c80d00621bee","55707819910c090d00c43412","557b137eb5052c1700543db2","557eee21eb75d80d00af3f9f","55896d363494de2f00a8d58d","55ae7e618576b92300291dfc","563a83e40ed633230037885b","56538c47f77ca023004e5338"],"project":"54cf411f9d09bb0d00a17a1c","version":"54cf411f9d09bb0d00a17a1f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-02T17:53:42.501Z","from_sync":false,"order":1,"slug":"features","title":"Features"},"parentDoc":null,"project":"54cf411f9d09bb0d00a17a1c","user":"54cfa8c8a8a4fd0d00b7fd1c","version":{"__v":14,"_id":"54cf411f9d09bb0d00a17a1f","project":"54cf411f9d09bb0d00a17a1c","createdAt":"2015-02-02T09:19:27.656Z","releaseDate":"2015-02-02T09:19:27.656Z","categories":["54cf41209d09bb0d00a17a20","54cfb99bbba1a023008741af","54cfb9a65ff7e617002bbd7f","54cfba03bba1a023008741b6","54cfba0ebba1a023008741b8","54cfba19bba1a023008741b9","54cfba29bba1a023008741bb","54cfba345ff7e617002bbd87","54cfba3ebba1a023008741bc","54cfba473995cf0d0006f6f0","54e371b18ef7552300409bf2","54e37aa5e887c50d005ef629","555a4e9b147f91190092d137","56b0e91802f4bc0d006ce254"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-03T02:29:57.259Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"[block:embed]\n{\n  \"html\": \"<iframe class=\\\"embedly-embed\\\" src=\\\"//cdn.embedly.com/widgets/media.html?src=http%3A%2F%2Fwww.youtube.com%2Fembed%2FjQb-wxELkI4%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjQb-wxELkI4&image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FjQb-wxELkI4%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\\\" width=\\\"854\\\" height=\\\"480\\\" scrolling=\\\"no\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\",\n  \"url\": \"https://www.youtube.com/watch?v=jQb-wxELkI4\",\n  \"title\": \"Cloud9 IDE: Quicksearch and Find in Files\",\n  \"favicon\": \"https://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico\",\n  \"image\": \"http://i.ytimg.com/vi/jQb-wxELkI4/hqdefault.jpg\"\n}\n[/block]\nAside from Goto File and Goto Definition, Cloud9 also offers more traditional search functionality. There are three types of search modes available: quicksearch, search and replace, and find in files.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Quicksearch\"\n}\n[/block]\nQuicksearch can be activated by hitting `Cmd-F` on a Mac, or `Ctrl-F` on a Unix/Windows machine. As you type in the quicksearch bar, the IDE instantly shifts to the next available result. This is a great way to quickly search around in your code without hassle.\n\nQuicksearch offers the following options:\n\n  * **Regular Expressions**: when enabled, your search is treated as a regular expression\n  * **Match Case**: when enabled, your search takes capitalizations seriously:\n  * **Whole Words**: when enabled, your search will only be considered for whole words:\n  * **Search Backwards**: when enabled, the search goes backwards, instead of forwards\n  * **Wrap Around**: when enabled, the search loops around the file, from bottom to top\n  * **Search Selection**: when enabled, the search only considers code that you've currently highlighted \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Search and Replace\"\n}\n[/block]\nBuilding on the features of quicksearch, search and replace allows you to replace segments of code in your file. You can again continue to use regular expressions, keeping in mind the groupings are prefixed with a dollar sign, i.e. $1.\n\nReplacing offers two more options:\n\n  * **Preserve Case**: if enabled, case is preserved while replacing content\n  * **Highlight Matches**: if enabled, the new replaced matches are highlighted in the document \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Find in Files\"\n}\n[/block]\nIn order to search across a set of files, you'll want to use the Find in Files feature. Here, you can search of a string or regular expression, within your entire workspace or a single directory. You can also filter based on extensions, like `*.js` or `*.rb`.\n\nFind in files offers some of the same search options as quicksearch:\n\n  * **Regular Expressions**: when enabled, your search is treated as a regular expression\n  * **Match Case**: when enabled, your search takes capitalizations seriously\n  * **Whole Words**: when enabled, your search will only be considered for whole words\nOne more feature of find in files is the ability to render search results either in the console or the IDE. You can fold results to keep them out of the way, or, edited the file if you're working down a list:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/iYEfDa0RdOI8j432IAHj_searchinfiles_ide.png\",\n        \"searchinfiles_ide.png\",\n        \"532\",\n        \"405\",\n        \"#86b0bc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"find-and-replacing-in-files","type":"basic","title":"Search and Replace in Files"}

Search and Replace in Files


[block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=http%3A%2F%2Fwww.youtube.com%2Fembed%2FjQb-wxELkI4%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjQb-wxELkI4&image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FjQb-wxELkI4%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>", "url": "https://www.youtube.com/watch?v=jQb-wxELkI4", "title": "Cloud9 IDE: Quicksearch and Find in Files", "favicon": "https://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico", "image": "http://i.ytimg.com/vi/jQb-wxELkI4/hqdefault.jpg" } [/block] Aside from Goto File and Goto Definition, Cloud9 also offers more traditional search functionality. There are three types of search modes available: quicksearch, search and replace, and find in files. [block:api-header] { "type": "basic", "title": "Quicksearch" } [/block] Quicksearch can be activated by hitting `Cmd-F` on a Mac, or `Ctrl-F` on a Unix/Windows machine. As you type in the quicksearch bar, the IDE instantly shifts to the next available result. This is a great way to quickly search around in your code without hassle. Quicksearch offers the following options: * **Regular Expressions**: when enabled, your search is treated as a regular expression * **Match Case**: when enabled, your search takes capitalizations seriously: * **Whole Words**: when enabled, your search will only be considered for whole words: * **Search Backwards**: when enabled, the search goes backwards, instead of forwards * **Wrap Around**: when enabled, the search loops around the file, from bottom to top * **Search Selection**: when enabled, the search only considers code that you've currently highlighted [block:api-header] { "type": "basic", "title": "Search and Replace" } [/block] Building on the features of quicksearch, search and replace allows you to replace segments of code in your file. You can again continue to use regular expressions, keeping in mind the groupings are prefixed with a dollar sign, i.e. $1. Replacing offers two more options: * **Preserve Case**: if enabled, case is preserved while replacing content * **Highlight Matches**: if enabled, the new replaced matches are highlighted in the document [block:api-header] { "type": "basic", "title": "Find in Files" } [/block] In order to search across a set of files, you'll want to use the Find in Files feature. Here, you can search of a string or regular expression, within your entire workspace or a single directory. You can also filter based on extensions, like `*.js` or `*.rb`. Find in files offers some of the same search options as quicksearch: * **Regular Expressions**: when enabled, your search is treated as a regular expression * **Match Case**: when enabled, your search takes capitalizations seriously * **Whole Words**: when enabled, your search will only be considered for whole words One more feature of find in files is the ability to render search results either in the console or the IDE. You can fold results to keep them out of the way, or, edited the file if you're working down a list: [block:image] { "images": [ { "image": [ "https://files.readme.io/iYEfDa0RdOI8j432IAHj_searchinfiles_ide.png", "searchinfiles_ide.png", "532", "405", "#86b0bc", "" ] } ] } [/block]