by fdsary · 12y ago · 0 comments
Has anyone succeeded in deliberately changing editors, even when not feeling like it's necessary? I'm especially curious how I could start using emacs, and actually get up to speed with it instead of using it as Notepad/TextEdit (as I would do if I started today)?
This can only be answered through anecdote, so mine is: it's really tough.
I'm competent in both Vim and Emacs, with a mild preference for Vim. But I used Homesite in the very early days of the web and got used to that somewhat CUA/GUI style of editing; when I moved to BeOS (really, I did for a while) I used Pe, the programmers' editor there, and then to the Mac and BBEdit, then TextMate, then Sublime. Despite the fact that I moved across five editors and three platforms, the basics -- opening and saving files, simple navigation by character, line and board, using the clipboard, search/replace, and even basic navigation -- were for practical purposes identical across these editors. I think it's easy for experienced Vim/Emacs jockeys to downplay how important that is. It's the advanced features that make us love our editors, but sitting down in front of a new editor and realizing you're going to need to read a tutorial just to figure out how open a file and oh God what was the key that started the tutorial again is a hurdle which, in a world with a plethora of good editors that all use standard keys we've already known for the basics, often doesn't seem like it's worth jumping through.
I've actually put in the effort to try and customize both Emacs and Vim with all sorts of packages that add the features I miss from Sublime and predecessors. I think my Vim setup is probably pretty awesome, tweaked and re-tweaked through multiple iterations. But I've noticed that when I want to work on a big project, almost without thinking about it I'm still going to open either Sublime or BBEdit and be into it for a few hours before I think, "Man, this would have been yet another opportunity to get better with Vim. Oh well."
I find that TextMate looks the best. I simply enjoy typing code into TextMate more than I do in vim or BBEdit. Thus, when I'm doing a stretch of writing new code, or straightforward modification of existing code, I'll probably do it in TextMate (although some days it just feels like it is a vim day or a BBEdit day).
If I need to make a lot of related changes, I'll switch to vim, and use regular expressions or I'll record a macro to repeatedly apply.
If I'm doing something like making some modification at all places that use a particular database table, I'll probably go to BBEdit. I can do a search for that table and click "find all", and it gives a separate window showing all the matches, with an editing section in the bottom part that shows whichever search result I click. This lets me easily see all the places where the table is referenced, and easily edit them, and go back and forth as needed. It works similarly with the results of a multi-file search, which makes it nice when I'm trying to understand crusty old legacy code.
If I start a work session in TextMate, and switch to vim to do something with macros, I'll probably stay there and continue editing. When I exit the editor to test the code, then I'll probably head back to TextMate. Same if I go to BBEdit for something--I'll stay there until I need something that is better in vim.
I realize I'm not making full use of the capabilities of one or more of these editors. BBEdit can certainly do most of the things vim can do, and all of the things I use vim for, for instance, but I'm fine with simply popping into vim for those things.
I tried using Sublime and I did get along well with it for a few projects, but when I am jumping around on various servers, I prefer Text Wrangler's shorter setup. Why doesn't Sublime manage SSH better?
I used to use Textmate at the University. Then XCode at my first job. Then I learned Vim, since every hacker in the internet seemed to love it, the usual story... (big plus: many IDEs have very good Vim key bindings)
Then I simply wanted to know what Emacs would be like. I took a bit of a productivity hit for about a week or two, but not more. Over the next year or so I read the Emacs manual and dove deeply down the rabbit hole. It has been four years now. Somewhere along the way I picked up enough elisp to be dangerous.
TL;DR: Want to learn a new editor? Just do it. There's no magic to it. Do the tutorial, RTFM, take the short-term productivity hit.
My emacs acts just like vim thanks to that mode. Literally every keybinding and combination I used works. I switched because configuring vim with vimscript is a pain and at the time of my switchover using other languages to configure was even worse. I like elisp as the config language. That's probably not exactly the question you were asking though since It's less like I switched editors and more like I upgraded ViM's configuration language.
There is certainly a tradeoff in the sense that I don't tend to memorize all the features of every editor, so I may not be as effective in any of them as a power user who sticks to one of them. OTOH, the Mac has excellent basic text conventions for word/line/paragraph selection, indent/dedent, etc.
Also, I tend to use the different editors for different purposes. Batch find/replace? BBEdit. Objective-C? Definitely Xcode, it't the only native editor with even semi-reasonable autocomplete. Scripts and single-file text documents? These days Textmate 2 (used to be Sublime).
So you still end up knowing the shortcuts and advanced features that apply to your editing scenario, even though they may not be in the same editor. But you don't get the raw, low-level text editing power that comes with mastering something like vim (which I do use a lot, too, but with such polygamous editing habits, am unlikely to master).
The upside of using multiple editors is that you can pick the one that suits you best for the job at hand; another fringe benefit is that you also get to enjoy countless hours trying out every single new editor that comes out. ;-)
I use a lot of different editors too, rotating among favorites. The one thing I do not consistently use are modal keyboard-centric editors like vim and emacs. I get that some people like them, but they've never done much for me. (And yes, I do know how to use them. I'm old enough that I upgraded to vim early on.)
As a vim-er and not an Emacs-er, asking genuinely and not out of snark, surely Emacs is eminently non-modal (at least, not modal in the same way that vim is)?
emacs has plenty of modes, although actually that's not really my big problem with emacs (or vim) when I think more about it. It's needing to remember stuff rather than recognize and select (which is the fundamental advantage of GUI, if you don't like remembering things).
Most of the stuff I see vim/emacs-ers boast about are easily achievable by me with a mouse or so obscure that I'd never remember them when I needed them. But that's me. Some people are good at and/or like remembering shortcuts.
But it won me over in a few of ways:
1) It's a native Mac app. An honest to goodness, OS X app with native widgets, text Services in the contextual menu, and an all-around attractive UI that works well with just about every OS feature.
2) It's open source now. Even though I haven't yet fixed any of my issues with it... I could.
3) It's got momentum: https://github.com/textmate/textmate/commits/master
All in all it's close though, and I didn't consciously choose to use Textmate 2... I just found myself reaching for it more often.
I don't see the point in changing your editor if you don't feel it's necessary. Surely one should gain something from a change of editor...
I still have the fundamental vi(m) motions in my bones... but I prefer emacs today.
[0] http://agentultra.com/2008/11/12/seeking-enlightenment-in-a-...
[1] http://agentultra.com/2008/11/19/seeking-enlightenment-in-a-...
With LightTable, I do mostly WebGL and I often have a browser tab up with my live WebGL stuff all the time. This is super efficient and extremely nice.
With Atom, I do mostly web development. Quickly jumping between files (faster than I did in Emacs) and knowing which files have been changed (they're highlighted in the tree-view) is very helpful for all work-related things.
If you want that live web stuff, you can try skewer-mode: https://github.com/skeeto/skewer-mode
I now use Ctrl-V or "+p depending in gViom depending on what mood I am in. Nice to have a choice.
I only use Atom for coding and vim for just about everything else.
The most difficult part for me is that i'll open a file in vim and then consciously go "no" <close it> and fire it up in one of the other editors.
Why? because I like to keep my vim more clean. I've seen some of the really complex vim configs out there and they just didn't "do it" for me.
So if i want complex things like syntax highlighting I go with Atom.
It was very rewarding, and I use Emacs everyday now. Today, I can't imagine not using it.
It took me about a month of consciously making myself work in Emacs to get a hang of it. But I don't use any major features, like macros.
Emacs is awesome for Python indenting, for example, but when I switched to a less elaborate indenting convention, I kind of just drifted away from Emacs.
Definitely not less than Sublime.
And I've settled with Sublime not because I think it's absolutely superior to Emacs. But mostly because, I've noticed, that I don't use the advanced features that often, and when I do, I always have to look them up in a cheat sheet or my O'Reilly book on Emacs. And Sublime is a bit jiffier on a Mac, then XEmacs or AquaEmacs.
I'll still use vim for quick tasks since it doesn't make me switch out of terminal context.
- code navigation: jump to anywhere instantly. DEMO: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif.
- code completion: context-sensitve completion. DEMO: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif.
- code compilation: you can click on the error and it gets you to where you want; work with any build system, while other IDE only supports a specific build system, i.e. for Makefile project, you only get plain text error message. DEMO: http://tuhdo.github.io/static/c-ide/compilation-mode.gif.
- code debugging: provides a frontend for GDB; DEMO: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif.
- Powerful automatic indentation: https://github.com/Bruce-Connor/aggressive-indent-mode. It does not only indent the current line, but the whole Semantic context around your cursor. Demos inside the homepage.
- Live grep: http://tuhdo.github.io/static/live_grep.gif.
- Access to a list of project with a few key strokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil...
- Quickly access any file in your project, as large as Linux kernel, instantly, regardless of where you are in the project, and within a few keystrokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil...
- Jump to any file depends on context, even if the file path is in a plain ASCII text file; even if there's only a filename without any path information, as long as it's in your project, Emacs can jump to it fine: http://tuhdo.github.io/static/helm-projectile/helm-projectil...
- Copy files from anywhere to anywhere: http://tuhdo.github.io/static/helm-projectile/helm-projectil...
- Delete files anywhere; files are always at your finger tip to do whatever with them: http://tuhdo.github.io/static/helm-projectile/helm-projectil...
- Switch between other files with same names but different extensions: http://tuhdo.github.io/static/helm-projectile/helm-projectil... Work not only for C/C++ but other languages, and is customizable. You don't have to configure anything, like adding include paths. Everything is automatically done for you.
- Jump to tag definition, from its own parser or external parser like GNU Global: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif
- Do you like outline tree?: http://tuhdo.github.io/static/c-ide/sr-speedbar.gif
- Interactive outline tree: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu.g...
- References retrieved from its Emacs internal parser: http://tuhdo.github.io/static/c-ide/semantic-symref.gif
- Beautiful compile output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif
- Frontend support for GDB: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif
- Open man page for symbol at cursor: http://tuhdo.github.io/static/part3/helm-man-woman.gif
- Emacs open 39MB C file: http://tuhdo.github.io/static/performance.gif
- Emac opens multi-gigabtye file: http://www.emacswiki.org/VLF
I am currently learning Vim and using it with the NERDTree plugin as a fairly nice environment to write Ruby on Rails code in my spare time. It is also nice as I have a low power PC running ubuntu in a virtualbox. So Eclipse is a no-no anyway.
At work I use Visual Studio but have a Vim open all the time for where the Vim advantages outweigh the visual studio advantages. Often this is in editing config and xml files. C# Code files are nicer to edit in Visual studio with autocomplete, debugging etc.
Main things I love about Vim - being able to split and tab quickly from the keyboard. And all those keyboard shortcuts to do practically anything. And it is fast. I really hate Eclipse now! Visual Studio is OK but Vim is so fast and lightweight.
VsVim doesn't cover everything, so as you start to get more advanced in your vim usage you'll start to miss features (for me at the moment, it's only partial support for folding). But it really makes every day VS so much better.
Another concern with this is pairing, as there is no easy way to turn it off. Although staying in insert mode and keeping the default bindings for VS may be OK.
So, it's definitely possible to switch, you just have to be able to deal with that ramp up.
I pretty much use sublime text for everything these days.
inoremap jj <Esc>
The hjkl thing feels weird for a long time but it becomes natural after a while. I used Sublime for a long time with the Vintage plugin (vim like movements and some other vim features) before moving to Vim and that made the transition much easier for me. I still like Sublime, but Vim's full integration with the terminal environment is hard to beat.
On American keyboards, anyway. That isn't how the keys are laid out on modern Dutch keyboards, though I don't know what they were like when Vim was created.
More information at: http://en.wikipedia.org/wiki/Vi