Ultraedit (UE) shortcut

Source: Internet
Author: User
Tags ultraedit
Reprinted from: http://blog.pfan.cn/wangwei/44098.html

To put it bluntly, I recently used ultraedit (hereinafter referred to as "ue"), which is definitely a pot of cool water on my head for those who have been programming under ue all the year round. However, when I saw that people were enjoying the powerful functions of UE, I couldn't help but abandon the commonly used IDE and started the course of UE ......

What is the function of UE that makes my stubborn child determined to try her out? Answer: "column editing ". When I first read this name, many people may not know the specific meaning of this function. Let me explain it. When editing ASCII files in notepad, You need to edit and modify the same text in each line (of course, you can also use the CTRL + H replacement function provided by notepad to replace strings one by one), such as the following lines of text:

Loanrepayplaninstance. loancode = loancardinstance. loancode;
Loanrepayplaninstance. warrantcode = loancardinstance. warrantcod;
Loanrepayplaninstance. custid = loancardinstance. custid;
Loanrepayplaninstance. custname = loancardinstance. custname;
Loanrepayplaninstance. custtype = loancardinstance. custtype;
Loanrepayplaninstance. contrcode = loancardinstance. contrcode;
Loanrepayplaninstance. repaytimes = plan. getnumber ();
Loanrepayplaninstance. repaydate = plan. getenddate ();
Loanrepayplaninstance. curtype = loancardinstance. curtype;

Now I want to change the loanrepayplaninstance in each row to loanrepayinstance. Here, using Ctrl + H to replace the instance may achieve the target, but if this section is only a small part of the entire file, when the loanrepayplaninstance string is widely used in other parts of the file, the built-in replacement function of Ctrl + H notepad is insufficient. Operating these codes in eclipse is also a very earthy method, because it does not have the column editing function (but eclipse can install a plug-in to solve the column editing problem ). I will not talk much about nonsense. Let's take a look at UE (now many other editors also have this function, such as the free
Ps3, compatible with many editor advantages, very handsome! It is definitely worth a try !) The following describes how to edit columns. OK. Let's take a look at the figure below.


Have you seen it? I have used column editing to delete "an" in the Plan synchronously. To achieve this function, you only need to click "Alt + C" on the keyboard. Is it extremely convenient? Want to try it? So hurry up and use ue ~

Perhaps this is not attractive to many people. They believe that such tasks can be completed step by using the mouse and keyboard Ctrl + C and CTRL + V, or by using the replacement text function, yes, you can. Both methods can achieve the same effect. However, from the time spent on these three operations, ue has won. We applaud ue!

This is the reason why I am forced to use UE. How is this reason? I immediately installed ue, and spent an afternoon getting familiar with the shortcut keys of UE. They all said that using UE is to use her shortcut keys. In fact, it is not false. I wrote a program well in eclipse, but I can't do it now. I always think of some strange ways to edit text, but eclipse cannot meet the requirements at all, there is always an impulse to edit the UE, and I will use the UE as the first editor.

This article describes the shortcut key of UE. It only describes one of them-"Alt + C" column mode. There are more than N shortcut keys that can be used. You can solve the editing problem more quickly without using the mouse like a "programming Madman". Let me give you one by one.

First, compare the current mainstream editors by referencing a netizen. "Speaking of editor shortcuts, VIM is unparalleled. If you want to oppose it, you must also use Emacs with pedals. There is a gap between UE and UE! Note: Vim is open-source and free, while ue requires registration and payment. UE is the best editor in Windows-without vim and Emacs. Vim and Emacs are the best editors in any operating system ." As the older programmers say, "There are two types of programmers in the world: Emacs and Vim." UE is not mentioned here, the development history of UE is still relatively late, and the history of Emacs can be traced back to the 1960s S. If you are familiar with the shortcut keys of any of the following editors, I can assure that your work efficiency will double.


Key1 automatic newline _ Ctrl + W

This is no longer a novel feature. Even your favorite notepad has this feature. It is strange to say that the editor has this function. Why? Who would like to bring their own editor with a horizontal scroll bar? As a matter of fact, in my own understanding, the default non-line feed function of UE editor is to enable the compiler in a certain language (note that this is the compiler, rather than the editor) to point out the exact number of wrong lines, for example, if the compiler tells you that the error is in row 187, it is very easy to handle it in ue, but in other editing environments, it may be difficult to think about row 187, even if he has a line number mark, but if you force a line break, his line number may be totally different from what the compiler prompts, because the row numbers prompted by the compiler are determined based on the number of carriage returns, while the general editor's row numbers are determined based on the rows displayed on the screen, the two certainly cannot be equal. If you have said so much, you must have understood whether I am so arrogant or not. I am such a person. I will not teach all the people who read my logs, I won't stop. Forgive me!


Key2 insert current date/time -- F7

You can insert the current date by pressing F7. The format is as follows: "10:57:57". Can you understand it? This works well in the comments of the program. You don't have to think about the number of today. You can just insert F7 directly! Let's go on...


Key3 locate matching brackets (, [, {or},],) -- Ctrl + B

I have to mention this function. This function is also available in eclipse, that is, to find the starting position of the pair of parentheses that I want from the vast nest, in eclipse, you only need to double-click it next to the brackets. This can be done in parentheses, brackets, and braces. However, in ue, the shortcut keys Ctrl + B are used to achieve the goal. Press it to select all the text in the brackets. At this time, you should know where this is? Speaking of this, someone may ask, what is the difference between this and the highlighted matching brackets? The answer is that when the screen that the parentheses span reaches several screens, this function is more useful than the highlighted matching brackets, isn't it? Let's get started with it ~


Key4 converts the selected text to lowercase -- Ctrl + F5

Well, as the name suggests! It corresponds to ATL + F5 and converts the string to uppercase. Of course, this is an operation for English words.


Key5 set bookmarks -- Ctrl + F2

This function is very handsome. It can add bookmarks to your text without modifying the text. The so-called bookmarks indicate which page I see in this book. For example, I am editing 198 lines of text. I suddenly found that the above 45th has an error, so I returned to 45 rows (you can use Ctrl + G to quickly locate the specified row number). After modifying the error, I can use Ctrl + G to jump to row 198, but what if I forget the 198 row number at this time? The answer is to set a bookmark for it when it leaves the 198 line. Press Ctrl + F2. The effect is as follows:

We can see that the row number 198 has been highlighted? Now you can go anywhere, and now you want to go back to line 1. Just press F2. That's awesome! Of course, you can add more than N bookmarks to the file, and then press f2 to switch one by one. To cancel the bookmarks, just press Ctrl + F2 again on the row.

Key6 to the specified row -- Ctrl + G

In eclipse, There is a shortcut key with the same functions -- Ctrl + L. The shortcut key of eclipse is a good note. Here, l Represents line, thanks to eclipse developers! I guess the G in the CTRL + G of UE should be the meaning of go. There is also some truth. When I used UE for the first time, I intelligently pressed Ctrl + L, and the result didn't respond, haha ~ This function is especially useful when the compiler reports an error. When the compiler prompts that the error is in line 198, you can press Ctrl + O to open the file and then press Ctrl + G to 198. How fluent are the operations! How can we not be admired! Follow
Me...

Key7 10 clipboard -- Ctrl + 0-9

This is a feature that I really want. Thanks to ue, she has met my needs. As we all know, the OS in the Windows family has only one clipboard. Sometimes, after we cut or copy a long and long text, we accidentally copied a small file, at this time, the long and long text we copied earlier will disappear! If we copy it from a webpage and close the webpage at this time, isn't it worse than when it rains and doesn't bring an umbrella? This is determined by the clipboard feature of windows. It can only store one piece of content at a time. Later, it will relentlessly overwrite the previous content, which is not what everyone wants. You don't have to worry about this problem in ue, as long as you are in ue text (if you misunderstand what I mean, I am not responsible for running the 10 Shortcut Keys Ctrl + 0-9 on IE browser ~) Copy and cut. Should the 10 clipboard be large enough? Next I will illustrate how to use it. Now we need to find another text in five paragraphs. In the traditional method, we can use ctrl
+ C and CTRL + V, and the interval between the two is to paste the text into another text. Now we discard this backward pasting method, use the multi-clipboard function of UE to implement it. First, press Ctrl + 1 to activate the first clipboard of UE, and then press Ctrl + C to copy the first text. At this time, we do not need to paste it, instead, press Ctrl + 2 to activate the second clipboard of UE, then use Ctrl + C to copy the second paragraph of text, and so on. Each time we do not need to paste it, but finally paste it at once. Now we can find the place to paste, use Ctrl + 1 to activate the first clipboard, and then press Ctrl + V to paste the first text to the specified position. Similarly, use ctrl
+ 2 activate the second clipboard, press Ctrl + V to paste it to the second position, and so on! How about it? It should be much faster than windows ~


Key8 Delete the row where the cursor is located -- Ctrl + E

Do you still remember the corresponding shortcut keys under eclipse? That's right. It's Ctrl + D! I have to admit that the row deletion function under UE is not powerful in eclipse, because UE can only delete the row where the cursor is located, and it is invalid for other rows, in eclipse, you can delete any multiple rows. If you select the row to be deleted, press Ctrl + D to delete all selected rows. Someone may ask, what is the difference between this and the selected + Delete? What I want to say is that delete only deletes the selected text, while Ctrl + D deletes the entire line of text, even if this line only has one character to be selected ...... CTRL
+ E is usually used in UE. This shortcut key is much faster than delete or backspace when you want to delete unnecessary spaces in the text. Believe me, this is useful!


Key9 Delete the content from the cursor to the beginning of the line -- Ctrl + F11

This function can be understood from its literal meaning. There is nothing advanced, as long as more is used, it is a matter of course, the common sense. The shortcut key corresponds to Ctrl + F12. For details, see key10.

Key10 Delete content from the cursor to the end of the line -- Ctrl + F12

You don't need to talk about it more. Please try it yourself. Remember, only when you use enough can you create unconscious habits in your brain. If you encounter problems next time, you don't have to search for the brain, but the eyes are on your hand. How is it? This is also a realm.

Key11: Search for the Upper/lower string -- Ctrl + F3/F3

What should I do if I want to find out where a string appears in the text? Of course, you can use Ctrl + F to search. Instead, I will introduce a more advanced method based on CTRL + F, CTRL + F3 and F3, these two are a pair of shortcut keys, which correspond to the previous query in ctrl + F and the next query respectively. Another thing to note is that Ctrl + F searches for files from the beginning or end, while Ctrl + F3 searches for files from the current row, we sometimes need to find the rows near the current row. CTRL + F3 is useful now! Haha, the principle is actually very simple. CTRL
+ F3 and F3 are based on CTRL + F. Try it now ~

Key12 text replacement function -- Ctrl + R

Obviously, Here R refers to replace. It's easy to remember! This shortcut key is usually used in the editor, but notepad uses Ctrl + H to do the same thing. Here, I want to talk about Ctrl + R under UE. It not only includes the text replacement function under the General Editor, but also adds the regular expression replacement, this is a very, very powerful function of UE. If I can use regular expressions skillfully, it is really a master. I haven't gotten to that point yet. I just learned it for a while and I am afraid to show it ugly here, gu left it to readers and friends to try it.

Key13 Delete the previous word -- Ctrl + backspace (Return key)

This shortcut key should be used a lot! Pressing the UE will delete a word in front of the cursor rather than a letter, so what does the UE perceive as a word (the word here is not just a word in our English? Yes, it is perceived by space characters. The string between two adjacent space characters is considered as a "word". How about deleting it? It is faster than selecting the word and then deleting it! No mouse operation required ~ A smart friend may ask, is the last word deleted Ctrl + Delete? That's the answer!

Key14 Delete the last word -- Ctrl + Delete

The above is very clear. Skip it here.

Key15 copy and paste the current row -- Alt + Shift + d

When we repeat the same thing multiple times, we all want to have a quick operation-copy and paste the above operation, and then modify a few words, this must have happened to all of you! I can copy and paste it! Yes, you are right. on weekdays, we use Ctrl + C and CTRL + V. We use too much and thought it was very fast. Next, I want to talk about the faster operations under ue to implement the same function, that is, ALT + Shift + D. If you say no, you have to try it yourself. Below is the function

The last four rows are the same. We can press Alt + Shift + D on the second row to get the above result. How is it faster than copying and pasting! Efficiency is what we are pursuing. This is what ue brings to you ~

Key16: This is a custom shortcut key. In response to the annotation shortcut key Ctrl +/Under eclipse, I will annotate the UE (there is no shortcut key originally, in the editing menu) the shortcut key Ctrl +/has been added, which is very convenient to use. You must have used eclipse to note out your code during debugging, some people may use/* comments */for block comments. How slow is it! In eclipse, select the line to be commented out and press Ctrl +/. to cancel the comment, select all lines and press Ctrl +/. This is a convenient operation, just press two keys. Isn't it strong? However, you need to use another shortcut key to cancel the annotation under UE. If you use ctrl again in the same way as in eclipse
+/A comment will be added, which I think the UE needs to be changed. No one wants to add the same comment twice to their code, you can use the same shortcut key to cancel comments. The shortcut key for uncommenting under UE is Ctrl + \, which is the opposite of the slash and CTRL +/. It's easy to remember. Try it!

Key17 switch among multiple tags in ue -- Ctrl + Tab

This is a shortcut that imitates the Alt + TAB combination keys under Windows to switch the taskbar window. You can switch between multiple labels by pressing CTRL + TAB under ue, which saves the trouble of clicking the mouse.

Key18 comparison file-Alt + F11

This is a tool used to compare two or more files. It can express different and identical parts of several files at once. Don't underestimate this function. When you modified a file written by programmer, now, Jia wants to read the modified program again. He is eager to know what you have modified for him. If one line is displayed, it is clear and time-consuming! Now we can use Alt + F11 to achieve our goal. Isn't it fast?

The shortcut keys described above are commonly used in development. For ue, this is just a fur, and there are more than N shortcuts. Here, I cannot list them one by one, sorry! If you want to fully master the simple cut key of UE, you can still practice more and use ue more.

After introducing the preceding shortcut keys, I will teach you a few techniques, mainly from the UE configuration. We can set a color for each file extension, so that we can infer from the UE label bar what file this is. Is this function very intuitive? See


Here, we use three colors to indicate files with different extensions ,. GSP and. groovy, when you use more, you can see the color to know the file, is it very good, but the default ue configuration does not enable this function, now let's turn on this small feature. Open the UE menu and choose advanced> Configuration> application layout> file tag> colors. A bar area is displayed on the right, you can set the color of Different Extensions here. After the settings are complete, do not forget to click the preceding tab colors by File Specification.
Check box, and then return to the editing status to see the effect.

Enable the row number display function. This function does not appear to be enabled by default. You can enable this function through View> display row number.

Enable auto-completion. This is also disabled by default in UE. We will open it now. Choose advanced> Configuration> editor> auto-completion. Select the "auto-show auto-completion dialog box" on the right, and keep the number 2 below to activate the auto-completion function, it is enabled when two characters are entered. It is very practical! Let me show you the following:

See it? I have already entered wangwei on it. Now I want to input again. Enter wa first. At this time, ue will prompt wangwei. You just need to press ENTER wangwei to be input, faster than Ctrl + C and CTRL + V!

Almost now, I have written n shortcuts and added several tips. I think you have been tired of reading them. It's just over two points. I should be asleep, a little tired. Today is the Dragon Boat Festival. My creative activities have come to an end for the time being. We will continue later in the evening! Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.