(require 'multiple-cursors) (global-unset-key (kbd "M-<down-mouse-1>")) (global-set-key (kbd "M-<mouse-1>") 'mc/add-cursor-on-click)
(require 'multiple-cursors) (global-unset-key (kbd "M-<down-mouse-1>")) (global-set-key (kbd "M-<mouse-1>") 'mc/add-cursor-on-click)
* Tree view
* Split window with synchronized views when showing the same file
* Regex search over file or selection, results can be turned into multicursors (!)
* Regex search over multiple files or directories
* Multicursors at each line for a selection
* Auto-update of views when file underneath changes (editor should ask what to do in case of edits)
I'm sure all of this can be achieved with Emacs - my question is: How long will it take me to set up? Will the result be portable, e.g. can I copy some config file unto any POSIX machine and use it from there in an ssh terminal? That last point would be the main draw for me on why to switch to Emacs, since with Sublime I have to mount the drives (with Expandrive) which works well for the essential things, however there are details like the treeview not updating in that case.
> Tree View
This i fully understand (and exisits in emacs) but I think not necessary either for my workflow. A treeview does already exist in a format called folders and files ;) I prefer to know the structure of the directories I'm working in and rarely require a reference to them visually
> Split window with synchronized views when showing the same file
I do too and this is a very basic emacs feature
> Regex
Emacs has a massive number of regex and non regex search options. Though usually i simply use Ctrl-Z; grep; fg, which is less efficient but fits my mental model better.
But ctrl-h a <regex> has ~ 34 commands on my machine. Including things like dired-do-isearch-regexp
> Multicursors at each line for a selection
No idea what this means sadly!
> Auto-update of views when file underneath changes (editor should ask what to do in case of edits)
I doubt any editor handles this stuff as well as emacs and is invoked in my environments daily.
Apart from multicursor stuff (that i do not see the point of for my workflow) everything you mention is a very very old basic emacs feature.
And sorry, but if you don't know about multicursors, I'm not sure whether you get what I mean with "Regex search over file or selection, results can be turned into multicursors". Just have a look at the animations in above URL. Can emacs do that without turning this into a big modding project?
gif2: I typically do this kind of stuff with CUA-rectangles: http://trey-jackson.blogspot.no/2008/10/emacs-tip-26-cua-mod... Looks about the same.
gif3: looks like M-x, though there are newer alternatives to M-x like smex that do more fancy matching: http://www.emacswiki.org/emacs/Smex I feel like I'm faster with plain M-x, though haven't really given smex much of a chance
gif4: There's a million packages that do this in various different ways (using recent files, VC-tracked files, bookmarks, Meta-dot with TAGS or parsers to go from symbols to definitions, etc.). I suppose people have different preferences for how to navigate quickly to other files.
gif5: M-x occur is built-in. There's also multi-occur to show over several files, or occur-edit to edit directly from the list of hits without going into the file itself, etc.
gif6: regex-replace also has been built-in forever, mc/mark-all-in-region-regexp seems to match this UI more closely though.
But I'm sure lots of the newer Emacs packages have been inspired by Sublime or TextMate (or vim!) :-)
My .emacs is portable and I use it across Linux, OS X and Windows. Of course it's based on my personal preferences (vim emulation anyone?) and I seldom see people sharing the same config except maybe Bozhidar's Emacs prelude https://github.com/bbatsov/prelude
Regex search over file or selection, results can be turned into multicursors (!)
? GP described 'require multicursors', which I presume is an emacs package. Does it come with regex search integration?
M-x mc/mark-all-in-region-regexp
though I just installed multiple-cursors now, have never tried Sublime so no idea what the deal is with these multiple cursors