More efficient use of JBuilder editor

xiaoxiao2021-03-06  40

A excellent programmer must be familiar with the editor you use. The previous UNIX programmer is very familiar with VI. Later Linux promoted the development of Emacs, both editors do not need mouse support, and the mouse has a large extent Affected the speed of editing, many of the programmers who write procedures under WINDOW are slower because more dependent on the mouse, the back-or-return switching mouse is a lot of time to the keyboard.

The following is a model I use JBuilder, I hope everyone can give me some other better patterns and convenient shortcuts.

First of all, I choose to set keymapping in Preferences to Emacs because Emacs has more convenient features. We generally use CUA, the most commonly used Ctrl C function, but we have reason to discard it.

First, edit the most common shortcuts of Java, which is the same under several Keymapping.

Ctrl h: Member-Insight, when we lost half of the code, knock this, editor generation tips, or use it after ".", Then select Enter. At this time, if you choose Emacs, we can use more convenient to select, and don't go to the top button. In the Emacs, Ctrl N is down, Ctrl P, N represents next, P represents previos. In the event of Member-Insight, these two shortcuts are also easy to use, greatly facilitated input.

Ctrl J: Expand-Template, we write system.out.println (""); in jbuilder we only need to enter Ctrl J out, then enter, there are many other, including main Write Ctrl J Main, which can be used in two modes, and you can use the shortcut keys to be selected by the shortcuts above when selecting. In Preferences-> Template, we can also customize your own template, such as writing a common copyright statement, and then assign a value.

Ctrl Shift J: Enter-Sync-Edit-Mode, select a piece of code, then press this button, enter Sync-Edit-Mode, then change the variable of this code, all this code corresponds to The part will change, very useful, this will not change a variable name because of the chaos that do it.

Ctrl Enter: Find-Definition, Ctrl Shift Enter: Find-References, for the first, if the cursor is on the variable, so that it will run to the variable life, if it is a method, the active code will run to the method Definition, if the class and the source code runs to the class definition. The second like, he is a place to find the reference. These two benefits are obvious, especially when they are in a unfamiliar system, only do this to view the code.

Ctrl Shift Space. The cursor moves into the parentheses of the method, then input, the prompt of the parameter is displayed.

There is a function is usually very useful, that is, comment, a piece of code, in the CUA, is Ctrl /, because there is other use in Emacs, so the default is not set, so I usually change it to Ctrl SHIFE /.

The above is the most commonly used, then the Emacs unique content.

Move the cursor. There have been several, and it is also useful.

Ctrl B rear refundment mark

Ctrl F to enter the cursor

Ctrl V Next screen

ALT V Previous screen

Ctrl E ends

Ctrl a beginning to the beginning

ALT M is the first non-air character before.

Ctrl X g moves to the specified line.

I believe that after these keys, the hand does not need to move to End, Home, and mouse. There is also a copy of the copy, after all, Ctrl C, Ctrl V, Ctrl X is used, don't always feel trouble, so I define these, just plus Shift. Emacs itself also has a lot of similar features.

Ctrl K: Cut a row, Ctrl Y: Paste it back, and if you use multiple Ctrl K, you can choose Alt Y after point Ctrl Y, which can be pasted back.

Combined with copy of these two modes, you can achieve more flexible editing.

Then the query, press CTRL S, then enter the query, you will find that this is an incremental query, you can see the result immediately. Press CTRL S, you can find the next, Ctrl R can find the previous one, if not entering the content, enter two times Ctrl S, will find the contents of the previous word.

Other more comparison needs, like Ctrl Z, you have to use Ctrl Shift . Save Ctrl X Ctrl S, pay attention, is pressed, press Ctrl X, and then the lower left corner of JBulider will appear, and then press the last one. Ctrl x 1, Ctrl X 2, Ctrl X 3, see what is doing. Another is that Ctrl X Ctrl U can convert all selected code to uppercase.

It is often used, and there are still many can't remember. I will know when I see JBuilder settings. I hope everyone will not be afraid to practice, and will find high efficiency in the future. If you can use Emacs to get faster.

转载请注明原文地址:https://www.9cbs.com/read-69086.html

New Post(0)