6 ms·
Vim and I and what my ideal Editor would look like
- parbo 16y agoSo, his ideal editor is Emacs with CUA-mode?
- bitboxer 16y agoI tried Emacs last year. And yes, with CUA mode. And I didn't like it. MacVim feels a lot better and more natural to me. Even with the copy and paste problem.
- RiderOfGiraffes 16y agoI'm a bit confused about some of the things he says are missing. * Command line mode to open/edit files without touching the mouse Is this from inside the editor? What's wrong with ":e <filename>" ?? If it's from outside the editor it's an OS issue. What am I missing? * Good default shortcuts for copy and paste and other standard operations I can't talk to the defaults, there there are half a dozen ways of picking up one piece of text and putting it somewhere else. If it's a single line you're interesting in, for example, then just "yy" will copy it, search or move to your new location, then either "P" or "p" depending on whether you want it before or after. * Easy way to record and replay macros What's wrong with the "q" command? It sounds like he hasn't yet really found half the things vim does. I fully agree that it takes a long time to become a vim master, and the commands require study - they aren't "discoverable," but it sounds like he just needs to pick one of his gripes and figure out how to solve it. Then move on to another.
- bitboxer 16y agoSorry, that sentence was wrong. I corrected it. The list is not a list of missing things. It is a list of things I want in my ideal editor. And to copy and paste: yy and P are not what someone would expect when starting a text editor. Shift+Cursor to select text, Cmd+c/Cmd+p to copy/paste, Cmd/z to undo. Those are the system defaults on my Mac and my editor should use the same keyboard shortcuts.
- RiderOfGiraffes 16y ago* Sorry, that sentence was wrong. I corrected it. The list is not a list of missing things. It is a list of things I want in my ideal editor. Oh. OK. * And to copy and paste: yy and P are not what someone would expect when starting a text editor. Shift+Cursor to select text, Cmd+c/Cmd+p to copy/paste, Cmd/z to undo. Those are the system defaults on my Mac and my editor should use the same keyboard shortcuts. Hmm. Well, I'm not really trying to defend vim - I have no stake in it - but the key sequences you describe are not what I would expect as defaults. Not least, I don't think anyone who comes to vim for the first time would expect h, j, k, and l for movement, or their upper-case friends, or key sequences like e, b, etc. The key on vim are different. If you want to set up defaults to match what you've used in the past, and what you think people will expect, then you can. I personally find the key sequences you describe for cutting and pasting enormously slower in bulk that the ones I use in vim. They are what people have become accustomed to in other editors, but that doesn't mean they're faster or more efficient. There is a trade-off. We actively prevent people from overly customising their editors because we have less time hacking out code than we have collaborating. We lose in straight efficiency of writing code, but we gain in being able to sit at any console and work immediately. Recognising that there's a trade-off is most of the battle. Deciding where to draw the line isn't easy, but is the minor part once you know there's a line to draw. And vim isn't really a "text editor". "Word" is a text editor. "vim" is a tool for producing code. Its interface is occasionally user-hostile and is completely undiscoverable. If you want something "more standard" and "more discoverable" then it's not vim. On that we no doubt agree.
- crazydiamond 16y agoWhat you expect as defaults can be quite subjective. Having worked on Vi/vim for over 20 years on a variety of systems, I actually expect other apps to behave like vim. I too have used a Mac for over 10 years but use vimperator on my FF browser, use file managers and other apps that allow for hjkl and other vi-ish strokes. I am not sure the defaults you mention for C&P and Undo were around when Vi was written. So expecting Vi to behave as a Mac app may not be very fair. I've tried MacVim, but i prefer using Vim inside a Terminal in Screen.