I'm pretty effective with vim, so much that other 'normal' editors like sublime & other modern gui editors make me feel a little crippled. That is a problem, because you need to be flexible about things in life.
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)?
Has anyone succeeded in deliberately changing editors, even when not feeling like it's necessary?
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 didn't so much change editors as start using multiple editors. On OS X, I regularly use vim, TextMate, and BBEdit.
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 use Text Wrangler for quick access by SFTP to my code (open server / edit / save). I don't like the SFTP window much, but it does the job. TW is also very good for processing text: sorting, removing duplicates, applying regex-es, filtering and vertical columns.
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?
Ah I'm the same. I used Komodo IDE for big projects, Vim for stuff when I'm in a terminal or for Hack work (until I finish my Hack plugin for Sublime, anyway) and TextAdept for super quick text editing on big files.
> 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)?
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.
I'm in the intermediate to advanced level of Vim user and I switched to emacs. It's easier than you might think thanks to evil-mode.
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.
Just like with web browsers, I use multiple editors all day long on OS X. Currently open, I have: Sublime 3, Textmate 2, BBEdit 11, Xcode 6, Rubymine 6, and (only because I visited this post and just downloaded it) CotEditor 2.
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. ;-)
BBEdit's multi-file search and replace (and it's compare) alone are worth it. I keep coming back to BBEdit for search and replace, even if I prefer other editors for other things.
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.)
> The one thing I do not consistently use are modal keyboard-centric editors like vim and emacs.
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.
This is not the sense in which vim is called a modal editor—at least, I think of it as meaningfully different. In different Emacs major modes, for example, the tab key might create different indentations; but, in different vim modes, the 'x' key might remove a character (in normal mode) or insert an 'x' character (in insert mode).
I think of the statement "vim is a modal editor" as "vim replaced key chords with mode toggles"—a different editor would replace "press 'x' in normal mode" by something like "press 'M-x'."
Again, I am certainly aware that Emacs modes can do much more than just offer context-sensitive indentation, but my impression (as a non-Emacs-er) is that they are usually meant to offer subtle customisation rather than full-scale re-engineering of the editor.
You never need to remember keyboard shortcuts for major modes. When you forget, you can always bring a "cheatsheet" using "C-h m" which lists all key bindings of current major modes and minor modes. Every time I'm new to a major mode, I always use this table. If you forget any key binding but remember prefix key, I press <prefix key> + C-h to bring all the key bindings that start with that <prefix key>. If you ever forget key binding but remember the command, use helm-M-x that list key bindings along side with the commands. DEMO: http://tuhdo.github.io/static/part3/helm-m-x.gif . In Emacs, I NEVER remember things consciously; I keep using something until it is recalled effortlessly. On the other hand, it's not like you don't have to remember things with those fancy GUIs. Take Eclipse as an example. You would have to steps through meaningless GUIs to configure something to work, and you have to remember those steps mechanically the next time you setup something. I would rather learn a consistent programming language with actual easy to remember rules to first configure simple things, and later extend my editor, rather than stepping through those meaningless GUIs.
And what you said that most of the stuff that are easily achievable with a mouse, try to do equivalent things like this in SECONDS: http://emacsrocks.com/. Well, that's why my co-workers work so hard why I have time to enjoy other things during my daily work.
What you said, like many other people who didn't learn Emacs properly or left it for so long that don't know what Emacs is currently capable of, is seriously outdated.
You should have a look at my post in this thread: https://news.ycombinator.com/item?id=8639804 to see what Emacs is capable of that I could never find in any other editors, and even IDEs.
> Well technically Emacs is just a Lisp interpreter with some text editing facilities by default. With evil-mode it is just as modal as vim throughout.
I don't mean to suggest that Emacs can't be made into a modal editor—saying "Emacs can't do that" is good only as a reverse-psychology tactic to convince someone to make Emacs do that—but rather that it is not "by its nature" such; that is, that someone is unlikely to choose Emacs, over vim say, because it can be made modal.
Emacs can make Vim a subset of it. You should check spacemacs: https://github.com/syl20bnr/spacemacs. It was made by Vimmers and is ambitious: it wants to replace not only the "editor" inside Emacs, but also rebind everything else to Vim's convention. Evil-mode can do everything in Practical Vim, I was told by a Vim user switched to Emacs.
Well, the EVIL-mode is used by a lot of people who want the features of GNU Emacs and a modal interface. If you search around there are several people with detailed reports why and how they switched to a modal GNU Emacs.
Yeah, that surprised a lot of my friends, too (especially considering my 2010 blog post[1] entitled "Mother fuck TextMate to hell").
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.
This just came up recently and my previous comment was upvoted, so please forgive me for repasting a link to an old post of mine where I described switching from vim (~10 years experience) to emacs (now at ~5 years):
I succeeded. And haven't gone back. It took me about two weeks to transition. I had 10 years of vi(m) behind me when I gave emacs a go. I wrote about it back in 2008[0][1].
I still have the fundamental vi(m) motions in my bones... but I prefer emacs today.
I switched from Emacs to both LightTable and Atom full-time. While I'm much more efficient in Emacs, integration are the killer features in the other two, in a way that I didn't have my .emacs setup.
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.
It's pretty easy actually. Just get drunk one night and bash your head against a wall few times. This will make you forget all the keyboard shortcuts and you're free to learn a new text editor.
Since learning VIM I have got (with no addition effort) better at learning keyboard shortcuts for all kinds of different apps I use. Vim (or Emacs etc.) literally makes you smarter.
I now use Ctrl-V or "+p depending in gViom depending on what mood I am in. Nice to have a choice.
Sublime Text has an excellent plugin called Vintageous that gives you a lot of Vim's functionality with some of the niceties of Sublime, worth a shot if you felt crippled by it.
I have never had success with these plugins. I apparently begin typing too fast after hitting Escape and invariably the plugin can't handle that and it enters things like ":w" as text instead of processing it as a command. Obviously this isn't a problem in Vi/Vim proper but all of the Vi*-style plugins for any of the IDE's or editors I've tried--from Eclipse to Sublime--always break.
I was mainly Java dev for 10+ years or so; I was a whiz at Eclipse. Then, one day, I forced myself to learn a Clojure. It just so happened the ecosystem mainly leveraged Emacs. And so, I forced myself to learn Emacs. It took a while - the key bindings, reading up on how to do various things, discovering great packages, learning enough Emacs Lisp to be dangerous.
It was very rewarding, and I use Emacs everyday now. Today, I can't imagine not using it.
My progression was Vim -> Emacs -> Sublime. Funnily enough, on systems with no Sublime I still tend to use Vim.
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.
Just noticed your comment there. And seriously impressive material there.
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'm in the process of switching from vim to atom as my primary editor. Loving atom so far. The command palette makes it easy to be productive when you don't know the shortcuts yet, and it's also a very hackable editor.
I'll still use vim for quick tasks since it doesn't make me switch out of terminal context.
- 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.
- 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...
- 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.
RE: Has anyone succeeded in deliberately changing editors?
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.
Installing VsVim was thing that really helped me get comfortable with vim. I'd use it at home, but I write way more code in the ~40hrs/week I'm at work.
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.
I tried that, but with no easy way to turn it off (without uninstalling it) it feels a bit 'in the deep end'. Once I am happy with using Vim productively I may try it.
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.
it does allow you to easily default back to visual studio handling all of the commands. In fact, it's quite nice for a tweener vim user because you can have visual studio handle all the more complex keybindings that you don't recognize and just use it for the subset of commands you're comfortable with, and move from there
When I first broke into web development, my editors of choice were Coda, Dreamweaver and Visual Studio (I wonder if I am dating myself here). I made a mid-career move to (non-gui) Vim, mostly out of general interest. The ramp up to Vim coming from GUI-heavy editors was a long one, but I stuck with it and it was worth it for me.
So, it's definitely possible to switch, you just have to be able to deal with that ramp up.
I've been trying out vim for a while, hoping to get more productive, but the fact that "hjkl" is not "jkl;" -home keys- and that I have to reach all the way across the keyboard to hit [esc] every three seconds is not helping...
I pretty much use sublime text for everything these days.
You can also remap Esc to jj by adding the following to your vimrc
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.
Out of the box, ctrl-[ is mapped to escape. It took me about a week to un-learn Esc, but it is one of the better vim decisions I've made (along with mapping j to gj and k to gk, and mapping tab to :bnext).
> but the fact that "hjkl" is not "jkl;" -home keys-
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.
Vim inherited the keyboard mapping from vi. vi was designed on a QWERTY (American) keyboard, but the particular terminal that the author used had arrows printed on the hjkl keycaps.
My original reason for learning vim was so that I could be effective when shelled into a box. I quickly became much more productive with it than any other text editor I tried to use after. Atom caught my attention, but I would up installing the vim bindings and eventually switching back.
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)?