Sublimerge: 'Merge: left to right' grayed out, but 'Merge all: left to right' available - diff

I'm using Sublime Text 3 with Sublimerge to compare files. I'm comparing files with the clipboard and I want to copy differences from left to right. I can see in the Sublimerge context menu that Merge:Left to right is unavailable/grayed out. However Merge all:Left to right is available to select.
How do I enable the option to Merge:Left to right?

This option requires at least one change to be selected. Then it will become enabled. To select a change do one of the following:
Use context menu: Sublimerge -> Go to Next Change
Press 'ctrl' + 'alt' + '+'
Hold 'ctrl' + 'alt' and left click on one or more changes

Related

How to select entire column (or row) using keyboard

Using ag-grid (trying on the demonstration page https://www.ag-grid.com/example.php) how can I use the keyboard to select an entire column?
You can press (on the demo) Shift and down arrow and go all the way down, but it's not practical for 1000s of rows. And as soon as you press Control, the selected cell does become the most bottom cell, but you loose the selection (as if Shift wasn't pressed).
If I was in Excel, I would select the top cell in a column, press Control+Shift+Down arrow, the whole column is selected, I can now do Control+C to copy.
I have seen this article, that adds a new menu item to do it How to select column data in ag-grid . I know I could assign a shortcut to that action too, but ideally I need a keyboard way using the Control (Command on a mac) key.
There's a not-so-straightforward way of doing this.
Click on the top most cell of the column you want to select
Do a Control + A (or Command + A for macOS) to select all of the grid
Now press Shift+ALT+(Left Arrow and/or Right Arrow keys or Shift+Option+(Left Arrow and/or Right Arrow keys in Mac OS
This should work

How to change every other blank space to tab in vs code

Let say I have a text like this
> Name
>
> Peak
>
> Surname
>
> Sornpaisarn
But I want the whole document to be written like this
Name Peak
Surname Sornpaisarn
So for the odd blank space, I want to change to tab. For the even blank space I want to delete it. Are there anything in vs code that can do that?
Make sure the final line is just >, so that the final key-space-value-space chunk is the same as the others
Make a backup copy of your page. If the edit ruins it, you can replace it and try something else
Choose "Replace" from the Edit menu
in the find/replace dialog, click the little .* box to turn on regular expressions
in the top (find) box, enter >\s([^\n]+)\n>\n>\s([^\n]+)\n>
in the bottom (replace with) box, enter $1\t$2
click in front of the first character in the file so you'll start the conversion there
click the little "replace" or "replace all" buttons (little b -> c icons to the right of the "replace with" text)

eclipse multiple text selection like sublime text 2

is there an option or plugin for eclipse which would enable multiple simultaneous selections in the same editor.
In sublime text, selecting some text and then pressing Ctrl+d will add next instance of the same text to the selection if possible. After selecting the instances needed the editor has multiple carrets (not necessarily on the same or adjacent columns and rows). In this mode it is possible to move all cursors forward or back simultaneously and to edit all instances of text simuntaneously.
I find this feature very usefull and miss it sorely in eclipse..
This Eclipse plugin attempts to provide this feature: https://github.com/caspark/eclipse-multicursor. From the README:
What is this?
A work-in-progress attempt to provide Sublime-Text-like
multi cursor support for text editors in the Eclipse IDE.
What works?
Multiple identical lines can be edited simultaneously using Eclipse
linked mode editing (similar to existing "rename in file"
functionality)
Next steps
"select next" functionality + associated editing using Eclipse linked
mode
"find next" + associated editing
editing of non-identical text / editing without using linked mode
split selection to lines
regexp support for find next
This feature is available in LiClipse.
See it in action (more towards the end of the video).
It supports linking with Ctrl+K, unlink with Shift+Alt+K, Ctrl+Alt+mouse double click to select words or Ctrl+Alt+Mouse to make a selection of a region (or just end lines).
Preferences>General>keys>Rename - refactoring
I changed the binding to command + shift + R when > Editing Text.
Sorry for bringing up an old question, stumbled upon it after searching google for the problem
Alt + Shift + A, then you can hold shift and use the cursor in multiple lines.
Like Ctrl+D I could not find, but like Alt+F3 in sublime (multiselects all matches), you can do by pressing Alt+Shift+R, or select text > right click > refactor > rename.
Must say that this does not work with any kind of text. It works with names of variables, functions, classes etc.
Tested on Eclipse 3.8.1
ALT + SHIFT + F worked for me.
You can see shortcuts for all here:
Goto -> Window -> Preferences -> General -> Keys and search for replace then you will see binding for Find and replace. In the bottom of that window, you can add your key to Binding text box. There you can add or edit any keys as shortcut.
If you want to replace selected word's matching words or find selected words, use below keys because you do not need to select all words in eclipse:
Ctrl+F gives me Find/Replace dialog box.
Or you can,
First Alt+A
Next Alt+F
Then press on Replace or Search button occurding to your need.

Is there a key binding for Next Difference and Previous Difference in Eclipse Compare Editor?

In compare editor there are buttons
Next Difference
Previous Difference
Next Change
Previous Change
I'd like to assign key bindings for Next Difference and Previous Difference buttons. However in preferences I see only Select Next Change and Select Previous Change commands (both in category Compare). How can I assign key bindings to buttons referring to differences?
My Eclipse:
Version: Indigo Service Release 2
Build id: 20120216-1857
There are default shortcuts for these:
CTRL-. (next) and CTRL-, (previous)
Next Difference, Previous Difference:
No key mapping (still in Eclipse Neon ) :(
Next Change, Previous Change:
Set "When" to "Comparing in an Editor" worked for me.
In Eclipse Mars, it is still the same process as moeTi explained. I am adding some details. To set custom keyboard shortcuts, go to:
Open Window->Preferences
General->Keys
Here's a list of the commands you would want and the associated mapping:
Previous Difference (Select the previous difference in the comparison editor)
Command 'Previous' in category 'Navigate'
Next Difference (Select the next difference in the comparison editor)
The command 'Next' in category 'Navigate'
Copy Current Change from Right to Left (replace your code with theirs)
The command 'Copy from Right to Left' in category 'Compare'
Copy Current Change from Left to Right (generally not an option)
The command 'Copy from Left to Right' in category 'Compare'

Eclipse navigate to next/previous marked occurrence

Eclipse has the Mark Occurrences feature where it highlights all occurrences of a selected variable/method. Is there a way to navigate to next or previous marked occurrence?
To skip between highlighted occurrences only, try the following:
Above the editor Window, select the down arrow next to the next annotation button.
Adjust the selection so that only "Occurrences" is marked.
Now, when you click on an item to highlight it, you can skip forwards and backwards to other occurrences using Ctrl+(comma) and Ctrl+(period).
After selecting a piece of text:
Next occurrence is ctrl+k.
Previous occurrence is ctrl+shift+k.
If you are looking to navigate through variables / methods defined in the same class, a quicker way to do this would be to select ( highlight ) the variable / method name you want to navigate to and use Alt + Shift + R to get into the refactoring mode and then use Tab or Shift + Tab.
Tab - takes you to the next occurrence
Shift + Tab - takes you to the previous occurrence
This way will save you from reaching mere text matches ( including those in comments ), as how Ctrl + K behaves. So you are taken through only "valid" occurrences.
Use Ctrl+> or Ctrl+<
and it's quite easy to remember because > < works as arrow pointing in the direction where you navigate.