UltraEdit使用

 

///////////////////////////////////////////////////////////////////////////////

https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/

UltraEdit Power Tips

This is the index page for UltraEdit power tips.

  • Keyboard shortcutsMaximize your speed and efficiency by utilizing UltraEdit's keyboard shortcuts. We list the default shortcuts in this guide, but you are able to customize them to your liking.
  • Keymapping and custom hotkeysHow to customize key mappings and menu hotkeys
  • Smart TemplatesUltraEdit includes Smart Templates, a way to automatically complete your code. Type the template text and UltraEdit will automatically suggest the template!
  • Vertical & Horizontal Split WindowThis is a convenient feature when you're manually comparing files, when you want to copy/paste between multiple files, or when you simply want to divide up your edit space.
  • Tabbed Child WindowsDeclutter your edit space by using the tabbed child windows feature
  • Auto-Hide Child WindowsWhen you're deep in your code, the most important thing is editing space. The all new auto-hide child windows give you The all new auto-hide child windows allow you to maximize your editing space by hiding the child windows against the edge of the editor.
  • Quick OpenUltraEdit and UEStudio provide multiple methods to quickly open files without using the standard Open File dialog. A favorite method among power users is the Quick Open in the File menu. The benefit of the quick open dialog is that it loads up very...
  • Column MarkersThe benefit of a column marker is that it can help you to format your text/code, or in some cases to make it easier to read in complex nested logic.
  • Customizing toolbarsDid you know that you can not only change what is on UltraEdit's toolbars, you can also change the icon used, as well as create your own custom toolbars and tools?
  • File tabsUnderstand how file tabs can be displayed, controlled and configured through the window docking system in UltraEdit/UEStudio.
  • Create user/project toolsExecute DOS or Windows commands in UltraEdit or UEStudio
  • Temporary FilesUltraEdit and UEStudio use temporary files... but what are temporary files? This power tip provides an explanation as well as some tips to get the most out of temp files.
  • Backup and Restore SettingsOne of the staples of UltraEdit (and UEStudio) is its highly configurable interface and features. However, what happens when you're moving to a new system and you want to port your settings and customizations over along with UltraEdit?
  • Add a webpage to your toolbarUse UltraEdit's powerful user tools to launch your favorite website from the click of a button on your toolbar
  • Integrate Yahoo!, Google, Wikipedia and more with UltraEditThis tutorial will show you how to access the information you need in your browser by simply highlighting your text in the edit window and clicking your toolbar button
  • Scripting tutorialAn introduction to UltraEdit's integrated scripting feature
  • Scripting Access to the ClipboardHow to access the Clipboard using the integrated scripting engine
  • The List Lines Containing String option in FindThe lists lines option can be a handy tool when searching because it presents all occurrences of the find string in a floating dialog box. You can use the dialog to navigate to each instance by double-clicking on one of the result lines...
  • Scripting access to output windowHow to access the output window using the integrated scripting engine
  • Writing a macroSteps to record and edit powerful macros to quickly and efficiently edit files
  • Using "copied" and "selected" variables for dynamic macrosUse copied and selected text in macros to dramatically increase the power and flexibility of UltraEdit macros
  • Run a macro or script from the command lineWe are often asked if it is possible to run an UltraEdit macro or script on a file from the command line. The answer is yes - and it's not only possible, it's extremely simple!
  • Using find/replaceUltraEdit and UEStudio have powerful find and replace functionality for searching and replacing text in one or more text files. Learn how to use this functionality in this power tip.
  • Multiline find and replaceSearch and replace text spanning several lines
  • Incremental searchIncremental search is an inline, progressive search that allows you to find matched text as you type, much like Firefox's search feature
  • Regular expressionsThis power tip covers UltraEdit's legacy and Unix style regular expressions with several examples. Learn about simple string matching, character sets, 'OR' expressions, dealing with blank lines, and reformatting existing data, all with regular expressions
  • Tagged expressions"Tagging" the find data allows UltraEdit/UEStudio to re-use the data similar to variable during a replace. For example, If ^(h*o^) ^(f*s^) matches "hello folks", ^2 ^1 would replace it with "folks hello".
  • Perl regular expressions: Getting startedAn introduction to using Perl-style regular expressions for find and replace in UltraEdit and UEStudio
  • Perl regular expressions: Non-greedy regexIf you've ever found yourself trying to build the perfect regular epression to match the least amount of data possible, then non-greedy Perl regex are what you need. Perl regular espressions are naturally 'greedy'. Learn more, here.
  • Perl regular expressions: Digging deeperA deeper look at some of the advanced features of Perl regular expressions in UltraEdit and UEStudio
  • Perl regular expressions: BackreferencesHow to use Perl regex backreferences in Find and Replace in UltraEdit
  • Remove blank linesA question we often see is 'I have a lot of blank lines in my file and I don't want to go through and manually delete them. Is there an easier way to do this?' YES. We cover how to do this with regular expressions for Perl and non-perl styles.
  • Configure FTPSet up and configure FTP accounts to edit files from an FTP server
  • Configure FTP backupSave a local copy of your files when you transfer them to FTP directories
  • Encrypt and Decrypt Text FilesUse UltraEdit to encrypt and decrypt your text files
  • Link to remote directoriesSync local directories with remote (FTP/SFTP) directories
  • Using the SSH/Telnet consoleA tutorial for UltraEdit/UEStudio's SSH/Telnet feature
  • Compare Modified File Against Source FileHow to compare the modified file against the source file on disk.
  • Column Based Find and ReplaceNeed to restrict your search/replace to a specific column range? The column based search does just that...
  • Compare Highlighted TextUltraCompare is included with UltraEdit and UEStudio. This is a guide on how to compare portions of a file with highlighted text compare.
  • Adding a wordfileAdding a wordfile for syntax highlighting in UltraEdit v15.00 and greater
  • Adding a wordfile (in v14.20 and earlier)Add a language definition to your wordfile for use with UltraEdit and UEStudio's powerful syntax highlighting
  • Syntax highlighting and code foldingExplanation of highlighting and folding definitions in the UltraEdit/UEStudio wordfile
  • Filtering the Explorer ViewHow to filter the Explorer view in UltraEdit and UEStudio
  • Group Files and Folders with ProjectsHow to group your files and folders using Projects
  • Adding or removing file extensions for syntax highlightingHow to configure syntax highlighting to highlight different file types automatically
  • Project SettingsAdvanced Project Features - Using the UltraEdit/UEStudio project settings dialog
  • Scripting TechniquesScripting techniques for UltraEdit/UEStudio.
  • Perl-style regular expressions for function stringsUsing Perl-Style regexes to identify functions in your syntax-highlighted files and populate the function list
  • Autocorrect keywords in UltraEdit/UEStudioHow to enable and disable autocorrect keywords with syntax highlighting
  • Insert Menu CommandsUltraEdit includes several special insert functions under the Insert menu. You can use these functions to insert a file into the active file, insert a string into the file at every specified increment, sample colors from anywhere on your screen, and more.
  • Creating Search FavoritesUltraEdit includes a Search and Replace Favorites feature that allows you to manage frequently used Find and Replace strings. Create, name, and edit your Search and Replace Favorites...
  • Customizing HTML toolbar commandsThe purpose of this power tip is to teach you how to customize the existing HTML tags and create your own HTML tags.
  • Combine multiple text files into a single fileHave you ever needed to combine multiple files into a single destination (output) file? You can use a combination of a script and tool to create a single file from multiple files.
  • Sum Column/Selection in Column ModeThis power tip demonstrates how to calculate the sum from a column of numeric data.
  • Column modeHere we walk through one of UltraEdit's most powerful, yet easy to use features, Column Mode (sometimes referred to as block mode. Learn all about how you can edit columns of data in seconds, and explore everything column mode, here.
  • SortThis power tip shows you how to use UltraEdit text editor to sort entire files, selections, or CSV files by field.
  • Working with CSV filesUse UltraEdit's built-in handling for character-separated value files
  • Word wrap and tab settings for different file typesUltraEdit and UEStudio allow you to customize the word wrap and tab settings for any type of file. This power tip walks you through the steps to configure these customizations
  • Version backupsSet UltraEdit/UEStudio to automatically save version backups of your text and source files
  • Configure spell checkerHow to set the highly-configurable options for UltraEdit's integrated spell checker
  • Special functionsUltraEdit includes several special functions under the File menu. You can use these functions to insert a file into the current file, delete the active file, send the file through email, or insert a string into the file at every specified increment
  • HTML previewEdit and preview your rendered HTML code in the edit window
  • Compare files/foldersUEStudio/UltraEdit natively support integration with UltraCompare Pro. Comparing files/folders from within UltraEdit has never been easier. Learn how to use the feature, here.
  • File change pollingMonitor log files and more using UltraEdit's file change polling feature
  • Vertically split the edit windowSplitting the edit window in UltraEdit/UEStudio
  • Large file text editorUltraEdit can be used to open, edit, compare, and save large text files (even over 4+ GB!) We explain and break down configuration settings, here.
  • Multiple configuration environments of Ultraedit/UEstudioHow to set up your separate environments for UltraEdit/UEStudio
  • Java compilerCreate a custom user tool to compile Java code, using the command line, from within UltraEdit
  • Configure UltraEdit with javascript lintHow to check your JavaScript source code for common mistakes without actually running the script or opening the web page
  • Character properties at your fingertipsAccess the properties of a character with the click of a button
  • CtagsSet up and configure Ctags for use in UltraEdit
  • Visual SourceSafe integrationCreate a customized user tool to check out files from Visual SourceSafe
  • Working with Unicode in UltraEdit/UEStudioA brief overview of Unicode, the differences of UTF-8 and UTF-16, and how to view, edit, and convert UTF-16 and UTF-8 text files in UltraEdit and UEStudio.
  • Search and delete lines foundUEStudio and UltraEdit provide a way for you to search and delete found lines from your files. This short tutorial provides the steps for searching for and deleting lines by writing a simple script.
  • Using BookmarksUltraEdit and UEStudio provide a way for you to mark, access, and preview your favorite lines via bookmarks. We'll look at how to create, edit, and configure bookmarks in the bookmark viewer.
  • Using the CSS style builderUltraEdit and UEStudio both include a CSS style builder for you to easily configure and insert CSS styles into the active document. This power tip will show you how to use the style builder.
  • Parsing XML files and editing XML filesParsing XML can be a time-consuming task. UltraEdit's XML manager allows you to navigate through the XML tree, search, move nodes up and down, copy or cut nodes, and even duplicate with ease. Explore all of the XML manager's features here.
  • SSH/Telnet Session LoggingLog the input and output to/from the server in your SSH/Telnet sessions
  • Edit, develop, debug, and run SAS programsThis user-submitted power tip describes how to use UltraEdit as a SAS editor, as well as how to run and debug SAS programs from the editor itself
  • Tabs to Spaces - Ignore tabs and spaces in string and commentsEver had to convert the tab characters to spaces, but wanted to leave the tabs in strings and comments untouched? In previous versions, the convert tabs to spaces feature didn't distinguish between tabs as whitespace/formatting vs. tabs in...
  • Setting File Associations in UltraEdit/UEStudioA file association is used by Windows Explorer to determine which application will open the file when it is double-clicked (or opened) in Explorer. In the interest of speed, many UltraEdit/UEStudio users want to associate specific file types with...
  • Windows Explorer IntegrationWe know that many UltraEdit/UEStudio users don't operate solely from within the editor; rather, they are frequently working in Windows Explorer before going to the editor. As such, they want (and need) a quick and easy way to open files from within...
  • Line Change IndicatorEver wanted to see what changes you've made since your last save, or have you ever wanted to know what lines you've changed during an edit session? As of UltraEdit v16.00, you can do just that with the line change indicator...
  • Comment and Uncomment Selected TextHow many times per day do you comment out a block of code? Do you ever get tired of manually typing your open and close comments? As of v16.00, simply highlight your code, click a button, and move on. It's that easy...
  • Hide, Show, and Delete Found Lines in UltraEdit/UEStudioIn this power tip, we'll take a look at how to filter lines containing a specific string in UltraEdit and UEStudio using the Find dialog.
  • Read Only Status IndicatorHave you ever opened a file, tried incessantly to modify it, then realized it was read only? As of v16.00, UltraEdit includes an enhanced read only status indicator. For read only files, the file tab will display a lock icon. Additionally, you can...
  • Regular Expression BuilderRegular Expressions are essentially patterns, rather than literal strings, that are used to compare/match text in Find/Replace operations. As an example, the * character in a Perl regular expression matches the preceding character or expression zero or..
  • XML Manager: In-line editing of XML filesThe XML Manager allows you to navigate through complex XML data. But, what happens when you want to make a quick edit to your XML tags/data.... UltraEdit v16.00 extends the XML Manager with inline editing, giving you a faster and more elegant method...
  • UltraEdit v16.00 Scripting EnhancementsOne of UltraEdit's trademark features is the ability to automate tasks through scripting. V16.00 extends the power of scripting further with includes, active document index, and more!
  • Parse Source Code with the Function ListThe function list displays all the functions in the active file/project. Double clicking on a function name in the list repositions the file to the desired function. Also, as you navigate through a file, the function selected in the list changes to indica
  • Brace MatchingBrace matching is an often-used feature; it is indispensable for navigating through your code. Brace matching simply allows you to position your cursor next to an open (or close) brace and highlight the corresponding brace.
  • Code FoldingCode folding is indispensable for managing complex/nested code structures. Code folding allows you to collapse (hide) a section of code. The collapsible sections are based on the structure of the file/language
  • Shared FTP accountsDo you use multiple IDM products - UltraEdit, UEStudio, or UltraCompare? Ever get sick of managing your FTP account information in each application? Now you can stop worrying about porting your FTP account settings! Simply configure it once and share you
  • Auto-load macro with projectMany UltraEdit/UEStudio users rely heavily on projects - and why not, projects are extremely helpful in managing related files and folder. Projects not only allow you to group/manage your files and folders, but projects also contain other items that...
  • Copy and paste syntax highlighting as RTF or HTMLHow to copy source code as HTML or RTF and preserve the code highlighting
  • The status bar in UltraEdit and UEStudioDid you know that the status bar in UltraEdit and UEStudio provides a wealth of information in a convenient, unobtrusive way? The status bar displays properties of the active file and also provides a way to access and modify some of these properties.
  • Multi-caret editingMulti-caret editing in UltraEdit
  • Split large filesIf you need to split a very large file into smaller chunks, you can do this via scripting. One of our power users, Mofi, has written a script that does the job perfectly. We walk through each step, here.

 

////////////////////////////////////////////////////

Adding a wordfile to UltraEdit or UEStudio

UltraEdit natively supports syntax highlighting for most commonly-used programming and markup languages out of the box. We do also have hundreds of wordfiles for other languages as well, however, and it is very easy to find and add the language you need!

Important Note: This power tip is for users running UltraEdit v15.00 or UEStudio v09.10 and later. If you are running v14.20 or previous go to our pre-v15 power tip on syntax highlighting.

Adding a wordfile in UltraEdit v24.00 / UEStudio v17.00 and later

Adding a wordfile in UltraEdit v24.00 or later is even easier than ever! Simply click the "Add another language..." button to open the "Add and remove languages" dialog where you can search, filter, add, and remove languages for syntax highlighting.

 

If you're using a version of UltraEdit prior to v24.00, read on for how to add a wordfile for syntax highlighting. Don't worry, it's still easy!

Adding a wordfile in UltraEdit v23.20 / UEStudio v16.20 and previous

As of UltraEdit v15.00, UltraEdit derives syntax highlighting from wordfiles in a specific directory. You can see the location of this directory under Advanced » Settings (or Configuration) » Editor display » Syntax highlighting. (By default, this location is set to %APPDATA%\IDMComp\UltraEdit\wordfiles, and all of the default wordfiles are copied to this location on first run, but you can of course change it if you'd like.)

 

Adding support for a new language is as easy as copying a file into this directory and restarting the application. Locate the wordfile you want on our wordfiles page, then click on it to download it. Make sure you save it to the wordfiles directory location!

 

After you've saved the file into your "wordfiles" directory, restart UltraEdit/UEStudio. The new highlighting language will not be available until you have restarted the application. Once you've restarted, you should then see that the new highlighting language is available in the "View As" submenu.

 

Having problems with adding a new wordfile?

Have you followed all of the steps above, but it's still not working? There are a couple of items to check:

1. Has the wordfile been saved to the correct folder? 
The most common issue in regards to adding a wordfile is that the user is saving the wordfile into the wrong directory. There should be two "wordfiles" directories on your system:

  1. The UltraEdit installation directory (C:\Program Files\IDM Computer Solutions\UltraEdit\wordfiles) – Incorrect
  2. The UltraEdit configuration directory (%AppData%\IDMComp\UltraEdit\wordfiles) – Correct

Unless you have specified otherwise, the config directory is used for your working copy of the wordfiles, therefore your new wordfile mustbe saved in this directory, and not in the Program Files directory. (You can access your %AppData% directory by pressing Windows Key + R, typing %AppData% and pressing Enter.)

To see exactly which directory UltraEdit is looking at for your wordfiles, go to Advanced » Configuration » Editor Display » Syntax Highlighting, and look at the "Full directory path for wordfiles" setting.

2. Does the wordfile have DOS line terminators? 
Another issue that may occur when adding a wordfile is that it contains Unix line terminators, which are not valid for wordfiles. To check this, open the wordfile you have added in UltraEdit/UEStudio and look in the status bar. Do you see "DOS" or "UNIX"? If you see "UNIX", the file's line terminators are incorrect. To fix this, press F12 and change the "Line Terminator" dropdown to "DOS Terminators - CR/LF", then save the file. Restart the editor to initialize the converted wordfile.

3. Is the wordfile in ASCII format (not UTF-8)? 
Sometimes when downloading a plain text file through a browser, the browser will save the file with UTF-8 encoding. This can cause the wordfile to not work at all. To check this, open the wordfile you have added in UltraEdit/UEStudio and look in the status bar. Do you see "U-" or "U8-" preceding the line terminator indicator? If yes, then press F12 and change the "Encoding" dropdown to "ANSI/ASCII", then save the file. Restart the editor to initialize the converted wordfile. (Note: This restriction was removed as of UltraEdit v25.10 / UEStudio v18.10, which support wordfiles in Unicode formats.)

 

////////////////////////////////////////////////////////

 

IDM PowerTips

Adding or removing file extensions for syntax highlighting

We often receive requests from users asking how to add or remove certain file types for syntax highlighting. UltraEdit's simple and powerful syntax highlighting feature allows you to do this very quickly easily.

Syntax highlighting is defined by the wordfile in the syntax highlighting options of the advanced configuration. You can open the wordfile and add or remove the FILE EXTENSION from the Extension list for the language which you do or do not want highlighted.

Please note: The following Power Tip will demonstrate how to add highlighting for a specific file type for a language which already exists in your wordfile. If you'd like to add a new language altogether, please see our Adding a wordfile power tip.

Adding or removing file extensions for syntax highlighting

For this example, we are going to add SHTML files to the default wordfile, so they will highlight based on the HTML language definition.

 

Step 1: Locate and Open the Wordfile

You can very easily see where your default wordfile is located by navigating to Advanced> Configuration> Editor Display> Syntax Highlighting. Click the "Open" button to open the wordfile UltraEdit is using.

 

 

Once you've opened your wordfile, you will need to locate the language for which you'd like to add or remove a file extension. For our example, we are going to add SHTML files to the HTML language definition. With the wordfile open, you can press CTRL + F to do a search for the language definition within the wordfile.

 

Step 2: Edit the Wordfile to Add the File Extension to the Language

Now that you've located the correct language in the wordfile, you only need to find where the "File Extensions" are listed. This will be near the top of the language on the first line.

 

Type in the file extension (for this example "SHTML") that you'd like to add to your syntax highlighting, save the wordfile, and then close. If you'd like to remove a certain file type from the language's highlighting, simply delete the file extension from the wordfile.

Step 3: Open the new file type

You will now be able to view the file extension you've added as the language you've specified. You can open a file in the editor after you've completed the above steps to view the highlighting for the language you've specified.

//////////////////////////////////////////////////////////////////////////////////

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章