Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the commonly used techniques for using UltraEdit

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What are the common UltraEdit use skills, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this to learn, I hope you can gain something.

If you ask me what software I open every day, it's UltraEdit!

As a DBA, writing scripts on a daily basis, especially when it comes to editing large files with super-many lines, is impossible without a good text editor.

I have been using UltraEdit editor for 5 years, and I am excited when I find that one of the functions of "She" coincides with the goal I want to operate.

To begin, the following tips are described in the order in which they appear to me.

Tip 1: Alt+C column mode

It can be said that this text editing software was originally chosen for the simple reason that "she" has column editing mode.

If you don't know what column editing mode is, I think you should look into it. This is a super "like" feature.

She's perfect for bulk column editing of large text (unless you're a user of gVim, another powerful text editor on Windows).

Try this function quickly.

Tip 2: Ctrl+W toggles wrapping

Have you ever used this shortcut key?

You must have seen a line of text so long that you had to drag the scroll bar below to read it. This is very inconsistent with our reading habits.

The Ctrl+W shortcut key is useful.

To switch back to the original mode: press Ctrl+W again

Tip 3: Ctrl+F2 Toggle bookmarks

Personally, I think this feature is very human and useful when you want to mark a line to quickly locate it. For example, if you want to repeatedly locate the creation statement of a table written previously, and so on.

Here's another tip I highly recommend:

When you use Ctrl+F to search, select "List rows containing strings" in the search interface, enter keywords in the "Find content" box, such as "create table", click "Find next", then you see the "Rows contain search strings" dialog box, click "All bookmarks" to see the effect, is it very exciting (especially when operating in text containing a large number of table creation statements)? All rows containing "create table" are bookmarked.

Here you have to ask, so I look up and down bookmark mark?

Don't worry, you try F2 and Alt+F2, F2 is to see the next bookmark, Alt+F2 is to see the previous bookmark.

To unbookmark: press Ctrl+F2 again

Tip 4: F3 Find

After selecting a keyword with the mouse, use F3 to quickly search for the selected keyword after the current position. How to operate forward search? Ctrl+F3, of course.

The above is available by default, sometimes you will find that F3 is not easy to use, after each operation is to find the information searched last time, after careful, patient and careful study of the secooler finally found the crux of the problem. The root cause is that you turned on the Regular Expressions feature in Ctrl+F. This problem can be solved by removing this option. In order to solve this problem I have been depressed for a long time, write here, I hope you do not take detours.

Tip 5: Ctrl+R replacement

It can be said that this function will be available in any editing software, but the regular expression function supported by UE replacement is extremely powerful. The difference between a master and an ordinary player may be here.

Here are a few common tips for throwing bricks:

1. Remove lines from text that contain a particular string (please note that this is very common, similar to the ":g/pattern/d" function in Vim)

CTRL+R --> Click Regular Expressions--> Find Content Enter %* Enter the string *^p contained in the line you want to delete--> Replace with Empty, Enter Nothing--> Click Replace All-->OK Done!

To explain: "%" means the beginning of a line in UE regular expressions,"*" means 0 or any number of characters, and "^p" is a newline character for DOS file types (the newline character for Unix type files is ^n, and the newline character for MAC(Apple) type files is ^r, so pay attention to the use of newlines here). So the implications are self-explanatory.

2. Delete trailing spaces

CTRL+R --> Click Regular Expressions--> Find Content Enter ++$--> Replace with Empty, Enter Nothing--> Click Replace All--> OK Done!

or

Use UE's own function (UE) already thought you might always use this function: right click--> click "format" --> click "delete space at the end of line"

3. Delete blank lines

CTRL+R --> Click Regular Expressions--> Find Content Enter ^p$--> Replace with Empty, Enter Nothing--> Click Replace All--> OK Done!

or

CTRL+R --> Click Regular Expressions--> Find Content Enter ^p^p--> Replace with Enter ^p--> Click Replace All-->OK Done!

4. Add semicolons ";" at the end of each line

CTRL+R --> Click Regular Expressions--> Find Content Enter dollar sign "$" --> "Replace with" Enter semicolon ";"--> Click Replace All--> OK Done!

or

CTRL+R --> Click Regular Expressions--> Find Content Enter ^p--> Replace with Enter;^p--> Click Replace All--> OK Done!

The above are very commonly used daily replacement tips, at this point, know UE's regular expression is powerful, slowly experience it.

Tip 6: Ctrl+B parenthesis matches

Ctrl+B parenthesis matching comes in handy when editing a bracketed script, and this shortcut can be reused. From then on, my mind and eyes are no longer vexed. You see, I am really worthy of my high-level human identity.

Tip 7: Ctrl+E delete the whole line, downward up

This shortcut key can reflect your operation skills and personal charm, efficient editing starts from this shortcut key (advertising time, you can float ~~)

This shortcut is equivalent to the "dd" function in vim to delete the whole row. Once mastered, the skill is multiplied.

Tip 8: F7 inserts current system time

No more worrying about typing the wrong time.

often insert a timestamp at the beginning of a troubleshooting document for memo purposes

First of all, the current time is 2009-4-8 13:53

Tip 9: Ctrl+G Go to line/page

Used to locate very large log files to specific lines, you'll see.

Tip 10: Ctrl+0 ~ 9 UE's 10 clipboards

"Edit" --> "clipboard"

Here you will see UE's 10 clipboards. This feature is recommended to be used with caution. It is possible that the contents of Copy and Paste do not match because the default clipboard of Windows is not restored. Try this feature slowly.

All students who have experienced the mismatch between Copy and Paste will be scared by this function. But don't be afraid, when the function is used, as long as it is used well according to the rules, this function is similar to "multiple temporary registers," which will improve the efficiency of our text editing.

First list the above 10 tips I often use, more advanced skills can only rely on your own hands slowly experience.

I strongly recommend that you read my little article while doing it, so that your harvest will be greater.

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report