开发者

How can I get Dreamweaver to search Perl files?

I use Dreamweaver as my editor of choice for web development, and often find old projects have a few Perl files.

For some reson the Dreamweaver find and replace dialog does not seem to recognise these Perl files e开发者_运维知识库.g. .pl or .cgi as searchable files, so when I use the "find in folder" on a folder I know contains only Perl files it returns "Not found in 0 documents" and doesn't appear to search them.

How can I get dreamweaver to search these files?


Dreamweaver does not by default search SCALA, CGI, PERL, CLS, or other rare file type files. For example, if you need to do a global find-and-replace inside a bunch of files with several CGI and PERL extensions, such as .cgi or .pl, Dreamweaver will skip the files with the rare extensions.

To make Dreamweaver recognize these extensions in Windows, you need to edit two different extensions.txt files. Here are the basic steps to follow.

  1. Save any files that you are editing. Close Dreamweaver.
  2. Run Notepad.exe in “Administrator” mode. You will be editing restricted files, and if you're not in Administrator mode you will not be able to save your edits.
  3. Find Extensions.txt in the following two locations. (These locations work for Windows 7 and Windows 8. Later versions might differ slightly):

Location 1:

C:> Users > User_Name > AppData > Roaming > Adobe > Dreamweaver > en_US > Configuration > Extensions.txt

Add SCALA or CLS or PL or CGI or your needed file type in the first line. You can enter the file extension type anywhere, separated by a comma. Save this file.

Location 2:

C:> Program Files (Or Program Files (x86) > Adobe > Adobe Dreamweaver CC > Configuration > Extensions.txt

Likewise, add SCALA or CLS or PL or CGI or your needed file type in the first line of this file. You can enter the file extension type anywhere, separated by a comma. Save this file.

Now restart Dreamweaver. If you do a search and replace now, you will find that Dreamweaver will index, search, and open the files of the extension you've added.

Sample of the previously mentioned “first line” is below: First Line: HTM,HTML,SHTM,SHTML,XHTML,STM,SSI,JS,CGI,PL,JSON,…

This answer contains info from this page.


There's a Dreamweaver Extension which adds perl "support" -- syntax colouring for example. I don't know if searchability is included in that support, but it's what I'd try first. Dreamweaver would at least recognise PL and CGI files as files it can edit from then on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜