What the easiest way to move selected lines up or down in emacs? - emacs

I've already selected some lines in emacs. What is the easiest way to move those lines (whole line) up or down?

drag-stuff-mode is probably what you need.

Related

Jump to next/previous non-commented non-whitespace line

I spend a lot of time editing config files that are mostly comments. Is there an easy way to move the cursor to the next/previous line that has non-commented text?
You can use the extension Select By (Move By) to move the cursor based on a regex. If you bind it to a key you move very fast.

Emacs multiple-cursor - Cut and yank in multiple lines

Using the 'multiple-cursor' emacs package,
when I mark a word and cut ('C-w') in different multiple cursors, the only word in the 'active' cursor I control is cut.
I want to select different words in multiple positions and yank it to other relative position.
When I first tried this I remember some yes or no option at the screen bottom, but I couldn't really notice this at first and some keystroke made it to "no". I guess this might have been an option for multiple-cut. But I don't know how to revert this choice.
How do you do multiple cut and yank in emacs?
This works by default, so at some point you have indeed asked the library not do do this.
These settings are stored (by default) in ~/.emacs.d/.mc-lists.el
Just edit that file appropriately, and then M-x eval-buffer RET to make those same changes in the running instance.

How can I tell emacs not to break long lines?

How can I set Emacs to not automatically break long lines?
I find it easier to visualize indentation without its breaking long lines, to instead use horizontal scrolling when needed.
Have you tried
M-x toggle-truncate-lines
Have you tried to remove "fill-mode" ?
M-x auto-fill-mode

find/highlight common substrings between two buffers in Emacs

Can somebody tell me how to highlight common substrings between two buffers in Emacs?
I can write a script to do that but was wondering if there was a built-in macro in Emacs by which I can do this.
Thanks,
Raj
If you're willing to accept the converse—seeing highlighted differences rather than similarities—then the ediff package will handle this for you. Try the function ediff-buffers. You can run it interactively with
M-x ediff-buffers RET
and specify the first buffer to compare, then the second. The first one will wind up on the top and the second one on the bottom, assuming you use the default layout with the two buffers shown split vertically.

Is there a way to select to a character in Emacs?

I've just migrated from vim and one thinkg I miss is the motions like vi( or vf<char>. Is there a way to do something similar in Emacs? Perhaps it is possible to get isearch to select from here to the match?
control-space sets the mark. region from Mark to cursor position is selected.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Setting-Mark.html