persisting the search queries in Eclipse - eclipse

You ctrl + F, put in your rather complex regexp search/replace strings, run the queries, keep working on the code, then the next time eclipse needs a restart all that search/replace dialogue history is gone. Google again the internets for the right regexp syntax, etc. Pretty tedious. Is there a way to make eclipse persist those regexp queries form session to session ?
It seems what I am really after is a wayto have more than 10 entries in the search dialog. As the commenters say,Eclipse does persist the search history, just that it is a very short history.
Here is the duplicate that has yet to be addressed properly: Eclipse: How to increase find/replace history?

Related

VSCODE plugin programming: How to compound several commands in command history to make single undo/redo action?

I'm writing a vscode plugin to simultaneously comment out and duplicate a line. A key sequence of actions within the plugin (modulo several selections etc) is the following:
vscode.commands.executeCommand("editor.action.commentLine");
vscode.commands.executeCommand("editor.action.copyLinesDownAction");
vscode.commands.executeCommand("editor.action.commentLine");
So this is fine and it works. The only problem is: the undo/redo history treats all these commands as separate operations... so I do the whole thing with a single keystroke, but if I want to undo, I have to hit Cmd+Z 3 times, which feels confusing.
How I instruct VSCode to treat a sequence of commands as a single "block" within the undo/redo history?

Stop Eclipse Automatically Closing/Completing Comments

When working on C code in Eclipse (Mars, in case that matters), I type /* to begin a stream comment. If I hit [Enter] any time within this stream comment, Eclipse automatically inserts a column of single-space indented stars _* and a single-space indented close stream comment _*/. This is incredibly annoying as this is never the behavior I want after opening a stream comment. I then have to undo-undo or highlight and delete.
I've gone into C/C++ > Editor > Typing and unchecked every option in the Automatically close group-box, but these options only include "Strings", (Parentheses) and [Square Brackets], <Angle> brackets and {Braces}.
There's no /*Comments*/ option.
I've even tried modifying every code template that contains such a stream comment, to no avail.
How can I get Eclipse to stop auto-completing comments?
I've checked these similar questions and found no answer:
Annoying eclipse automatically closing quotes, Stop Eclipse from mangling my comments, eclipse disable completion of xml comment, How to stop Eclipse from auto-adding parentheses?

Column editor in Oracle Sql Developer

Anyone knows if there is a column editor function in Oracle SQL Developer?
I have to modify the same column in a large number of insert statement and it would be really useful to have a column editor.
To explain better which is my problem i am searching a function similar to Eclipse ones when you type Alt + Shift + A (How do I enable the column selection mode in Eclipse?), and it allow you to edit in one time a lot of columns.
There is something similar or i have to do it manually?
I am using 4.1.5.21 version.
Thanks
If you're using a newer version of Oracle Sql Developer (at least 18.3.x but perhaps before) there is an even easier way.
Simply go to the "Edit" menu and then choose "Block Selection":
Edit/Wrap Selection (enable it):
https://www.thatjeffsmith.com/archive/2012/07/how-to-block-select-text-in-oracle-sql-developer/
Just press Shift and move cursors up and down, etc.
Be careful to press Esc after each edition as it seems to "stick" or something and it keeps adding cursors and modifying where you don't expect it.
Trick: The multi-cursor is useful to edit several parts in the same line.

Eclipse CVS compare: difference not disappearing after copying

In Eclipse, CVS text comparing works poorly against large numbers of difference between the local and the remote version. It's very desirable to update the the status of comparison every once in a while by a simple command. Basically it's reloading the local file, do the comparison again, to see where we have reached, and try not to make mistakes.
Unfortunately, "Team" - "Synchronize" again after editing every several lines is not convenient, neither does it solve our problem. As I have observed, when there are many differences, Eclipse can mark the already identical lines as different to the remote ones, if we use this approach to compare again.
How can we solve it in Eclipse?
At last I found a simple enough solution, but can be ignored easily: use the "Java structure compare" panel.
When doing the CVS comparison, above the two horizontal text area, we can see the "Java structure compare" panel.
The icon "+", "-" and arrows can show structurally how the two files are different.
Double-click on a method to edit. After several lines of work, double-click the method again to update the status of comparison. If the local version is identical to the remote one, all the color squares will dissappear from the vertical scroll bar on the right, clearly marking where we have reached. Also, after doing this, you jump to the next difference in this method, to start working again.
Re-"Synchronize" will mess the whole file up, so don't do it in the middle, unless you are at the final stage and have fewer enough differences.
Just a little piece of humble opinion about how to use Eclipse more efficiently. After all it's our daily tool. Better to learn these tricks as soon as possible.

customizing emacs with "sidebars"

I'm tinkering about switching my IDE to emacs. (I'm still an emacs newbie.)
The problem is that I customized my IDE quite well and I'd regret to leave my helpers behind.
Let me explain:
Shows the current open files/buffers, allows fast switching with a hotkey (C-1, C-2, ...)
Shows the most recent texts on the "clipboard" or inserted by complete (no. 4), text insertable with a hotkey (C-b 1, C-b 2, ...) Last inserted shown in bold, insertable with C-`
The last inserted complete (no. 4) text, insertable with M-`
Autocomplete-ish list, gathered from all open files, regardless of their type with some magical logic. text insertable with a hotkey (M-1, M-2, ...)
I guess emacs has such features, but I'm a visual type I'd like to see what I have available.
Of course actual hotkeys don't matter much, but as you see having all that info visible makes it easy to hit the spot with the least keypresses.
My pain is that there is a plethora of emacs extensions providing various features, checking all seems to take a lifetime.
My question is:
are there any emacs extensions to achieve similar looks and behavour?
as I'm a programmer, which extensions could I take as a base to assemble something like this?
Thanks!
Elaborating a bit more:
I’m a python dev, so most of the code I’m writing is python. Add some HTML JS CSS XML to the picture.
One important thing is that completion needs to work across filetype boundaries, because python / HTML(template) / XML(config) / doctest identifiers are cross-referenced. It’s a huge pain with some IDEs that completion works only for python filetypes.
I have a lot of same named files but in different folders, like init.py, configure.zcml, etc. It seems to be a pain to switch between those by filename.
Better said that’s a list of recently inserted text. To be reused by the fewest keys as possible. Usually when coding I’m reusing the same identifiers/whatever within the same task. So it’s handy to have them listed instead having to retype the starting x chars to get completion again.
Usually best use of this feature is when changing/refactoring code. Like adding one more extra feature and the identifier is needed several times over the place.
TL;DR
Learn keyboard macros. Learn yasnippet.
Autocomplete mode is probably similar to what you have.
Get acquainted with emacs kill-ring before trying to change it, it wants to be your friend. Then you'll know what to look for when you DO want to change it.
Long Version
Shows the current open files/buffers, allows fast switching with a hotkey (C-1, C-2, ...)
You have three options for this.
My personal preference is to have all source files open at all times. So I don't need a visual list of open buffers. Whenever I want to switch to a file I hit C-= (which I've bound to iswitchb-buffer) and type a couple of unique letters. It's common to constantly switch between the same two buffers so I also bound C-backspace to previous-buffer.
Another option I can recommend is tabbar. It's not exactly like your setup, but it displays a list of open buffers (just like webpages in a browser) and it has functions for cycling through the tabs, so it shouldn't be hard to reproduce your C-number key bindings.
You could use speedbar or ecb. They would be the most similar to your current visual configuration, but I'd argue the other options are more efficient.
Shows the most recent texts on the "clipboard" or inserted by complete (no. 4), text insertable with a hotkey (C-b 1, C-b 2, ...) Last inserted shown in bold, insertable with...
I see you've sort of mixed the clipboard with completion history. When it comes to emacs, yasnippet and autocomplete are just so good you're better off going with them for completion (see below).
Emacs clipboard is called the kill-ring. I'm sure you know of C-y and M-y, so you can always recover anything you've cut in the past. Unfortunately, I don't know of any packages that constantly display the kill ring or allow you to yank a specific part of it (though that shouldn't be too hard to write), but at least you know what to search for (kill-ring).
The last inserted complete (no. 4) text, insertable with M-`
I'll be honest, I don't see that much use in this. If you have to repetitively insert text, you should learn keyboard macros. In fact, you should learn keyboard macros anyway, they're the first reason I got hooked to emacs.
Autocomplete-ish list, gathered from all open files, regardless of their type with some magical logic. text insertable with a hotkey (M-1, M-2, ...)
Emacs had many great completion options. In your case, the best one is probably autocomplete-mode. It pops-up completion options (much like your separate completions window), and I think it allows for quick selection of a specific option (like your M-number shortcuts). Also it has several different ways of deciding which completions to offer you (it calls them "sources") and one of them is to gather from all buffers.
In addition to that you have yasnippet, and I couldn't possibly recommend it enough. Seriously. Learning to use it and writing your own snippets will change the way you write code. You'll become a mage whose fingers produce pages of code flowing through your screen in blazing speeds. Use yasnippet!
Once you have it configured, every 3 or 4 keys you press will generate a line (or more) of code for you.
After all that, if you still miss something from your previous editor you'll write it yourself. :-)
Your setup looks exactly like https://github.com/emacsmirror/ecb.
To me at least, since I don't use side-bars:)
You should take a look at the extension speedbar. I have installed this extension, but I rarely use it even for a very large project.