I still do not undertand the devotion that people have with these text editors. I prefer Vim however I could see myself using it soley or even half the time. I feel like I know the basic commands and it is fast but with the ease of a sublime text or something similar why do people still use these pieces of software so frequently? (Not a rhetorical question)
Because UNIX shell is the most powerful integrated programming environment for development with any language/technology combination. Instead of your typical menu commands (you are lucky if you have 100 or so commands to do very basic and limited things on a selection that you must build with mouse manually) you literally have tens of thousands of extremely sophisticated commands that can easily be chained together to produce amazing things with very little work.
Vim is just part of that tool chain designed to edit text efficiently. Vim is not so much a text editor as it is a language for manipulating text. Vim has dozens of motion commands to move cursor over chars, words, sentences, paragraphs, code blocks, methods, pages, regex etc. So general form of vim commands is nCm i.e. repeat n times command C to the text cursor moves over with motion command m. So for example w is a command that moves to the next word. d is a delete command. So, dw says delete word. 5dw says delete next 5 words. Let's say you are inside if (.) block and you want to change the if condition. ci( says "change inner bracket text" (i.e. everything inside brackets). This deletes everything inside () and puts you to INSERT mode and let's you type new condition.
This makes Vim extremely predictable and discoverable. You learn a new command say gU (turn to upper case) and you immediately know how to turn to upper case entire word because you know how to move by words with w. gUw turn entire word to upper case. gU) turns entire sentence to upper case, etc.
After a while these things just become part of you, and you become really fast at bending text to your will without even thinking. The fact that you can navigate text/code and get to where you want in matter of milliseconds (faster than it takes you to take the hand off the keyboard and reach for the mouse, shake the mouse to find where the cursor is etc) is amazingly liberating of disruptive context switches.
And then if you add shell integration, it means you can apply advanced filters to your text to do pretty much anything. This gets as esoteric as run filter on regex in lines that match another regex, where regex can be any Perl compatible regular expression. But can also be as simple as reformat code, beautify paragraph, insert current date, listing of directory etc. Then you add code completion, file navigation etc and you have something amazing.
Don't aim to learn everything. Learn to be productive and get to the point where you do things you do fast enough. Vim itself has enormous amount of functionality, so it is useful to read vim reference manual. It comes with one and you can get one in PDF as well here:
Also read entire exhaustive help at least once so you get the idea of what is available (it can be done in one weekend, don't try to memorize too much just familiarize yourself with content, then later when you wonder how would you do that in Vim you will remember you read something about that once).
Vim has really great indexed help that you can access directly:
:h
:h index
:h <topic>
and there is also grep for help to search entire help for matches
:helpgrep <search_term>
No matter what you do understand that you will get slower before you get faster. At first expect your productivity to go down seriously, because everything will be strange and new. But persist with it and force yourself to use it. Once you get to the nicer bits you probably will not want to go back. After 6 months of regular use, you will not be able to back, every other editor will feel dumb and will frustrate you to no end (be careful when typing email: ESC key dismisses the compose dialog in a lot of email programs without asking you anything :D).
As for UNIX shell and tools, again get a good BASH tutorial book and learn the basics of interactive shell, learn how to do loops, globs etc. The rest is then all about learning individual tools, not shell itself, which is rather small command interpreter. Look in your /usr/bin and /usr/local/bin for commands and read their man pages. Experiment a lot with them and look at examples of creative use of these.
Back in the early 90s I had a year long course in vi (not Vim) but started using Vim on Amiga 500 days, and after 20 years I still come across new commands and ways to do things. This is the beauty of Vim, you grow with it and it never stops to amaze you. But it is a skill that you keep for a lifetime. It's like learning to touch type, you do it once and you type efficiently for the rest of your life. You may get faster or slower at times in your life but you are always faster than hunt and peckers. Same with Vim, dumb editors come and go, but none ever approach the completeness of Vim.
Craftsmen and tools. It is an age old story, you grow to trust and understand a tool. Programmers and text editors are an extreme example, because programmers often spend 30+ hours a week using a single too, their editor.
Vim and Emacs have survived because they are "fit for a purpose"... they are really good at editing text! Emacs has a niche in expandability. You can always twist Emacs to do your bidding... and it has a culture of tinkers. Vim has much more of a culture of users, people who want to edit text rather that toy with their editor.
These editors have roots in the 70s and are still kicking -- that isn't some random accident, that is because the fundamental act of editing text hasn't change too much.
>Vim has much more of a culture of users, people who want to edit text rather that toy with their editor.
I don’t know about that. I really got into Vim because it’s so customizable. The number of general purpose and very specific plugins is pretty amazing.
And the Vim Awesome site that tracks plugins is pretty damn awesome: http://vimawesome.com
Vim has great plugins -- but expanding it is often best left to experts. I have a pet theory that part of the reason for the high quality of many vim plugins is the horrors of writing them (and of course, tpope). Most Vim users are simple, "off the shelf" users -- they use plugins, but they don't WRITE plugins and they often don't radically change the environment (it still feels like vim, as expected). Vim is a good editor that works great with other tools.
Emacs is more -- of its own things -- lots of people write little bits of elisp to do their bidding, and the "plugins" can completely reshape the editor into an IRC client... a mail client... a media player ... a connection to spotify ... etc. It is a wild crazy world powered by elisp.
People don't use Vim and Emacs for ease of use, they use them for the power and efficiency they eventually provide once you reach a certain level of proficiency.
Rarely do I need a remote editor, where I don't also need a remote shell. So I'm using GNU screen all the time now.
Years ago, I finally made a little time-investment in learning Screen, and it has definitely paid off. I hear that tmux is better, but I don't have any missing requirements from my current setup, so I haven't tried to learn it.
"They also can run in a remote console which for me is reason alone not to use another editor."
As a developer, that makes no sense to me. Do you really need a powerful remote editor? What do you need a remote editor for, other than checking that a config file was set up correctly, or reading a log file?
Working on code that only makes sense against production data... our current "small" dataset is 20TB, our real one is going to land about 150TB. These datasets are a pain to get locally, and a pain to maintain. Way easier to just have an account on an attached box you can use from anywhere.
Another perk of it is using tmux and having a consistent environment you can tap into from work, home, the road, etc.
Why would I want to use any pc in the world? That makes no sense unless your work doesn't involve security of any kind. Besides you can carry your work environment using a virtual machine too.
Perhaps it (any pc in the world) is an exaggeration, but I can use my phone, personal laptop, work desktop, work tablet, personal tablet to connect to my always running tmux session and pick up where I left of.
And a virtual machine seems portable, but I cannot use it on my phone/tablet, and I also cannot use it on most other machines that don't have that virtualization software installed.
When your pager sounds at three in the morning with a problem that needs fixed Right Now, you start to realize what all the benefits of having your complete bag of tools on the server you're working on are. At the very least, you now have an interactive grep/sed/regex tool that you can use to strip out all the irrelevant info from the log file you're poring over. You can now jump between files with ease because of multiple buffers. You have interactive diffing. Your output of logfiles is now color coded. In short, you have all those tools on the box, with it managing all of the context, etc, for you, so you can more easily fix the problem, and get your butt back to bed.
Hm, I work with Embedded systems and each product has a different virtual machine that's hosted somewhere.
I have nothing in my work machine but a linux shell. I just vi everyplace in the world, edit things there and compile there and then scp to the product. My work is 100% remote.
I use vim because it's bindings correspond with my thought process.
My thought is: "Let's change the next 2 words", my fingers type c2w (change word).
The bindings take quite a while to learn, I started using vi mode in komodo edit, but once I realized that bindings like ci" didn't work I switched over to macvim. I haven't used any other editor since then (4 years ago).
The other reason is that I mainly "develop" (hobby) on my vps, having a vim session open in tmux allows me to use nearly any pc in the world and I'm in business to continue where I left off.
I love this explanation of why you like vim, because it's very honest, and one where I can disagree with your preference while having no problem with your argument.
My brain does not work like vim at all. I do not count words. I do not think about whether I want to change, jump or delete. Therefore, I've never been able to use any vi flavor even semi competently: I can technically work in it, and I have read about all the commands, but I am actually slower in Vim than I'd be in windows Notepad, because it's internals do not 'speak' to me at all.
I had a lot more luck with emacs, because I can ignore anything that even considers those low level operations, and just use it's higher level features, like buffers.
Still, I end up doing better in an IDE, because most of my editing is of code, and an IDE understands the code I am writing far better than emacs or vi could.
I regard my primary task as understanding code so I can write as little code as possible. I still write a lot of code, but I expect my editing environment to surface semantic information for me. Otherwise, I do it all myself. Why would I want to do that?
I've used Vim for a few years. I enjoy editing in it for sure. But it does feel like it optimizes the wrong thing. By the time it's time to write code, I'm more invested in the ideas than the mechanical action of implementing them. I also feel like core Vim is very good, but the experience suffers greatly once you enter Weird Plugin Land, where you need to set SpecialOption if using RandomPlugin version 0.88. I get why it happens; it's also a waste of time.
I don't have the patience for that. I dread maintaining my vimconfig for this reason.
Vim is extremely powerful once you master it. It was released in 1991 and is still around. If you go back to Vi it's history goes back to the 70s. It might not matter to you, but as somebody who has written code for more than a decade, I'm glad I don't have to learn a new interface every time the producer of a proprietary editor goes out of business.
Yes, learning the basics is harder than with other editors. Once you master them you have a superior tool you'll be able to use for the rest of your life.
I couldn't imagine using standalone vim as an IDE either... However, if you want the best of both worlds then Visual Studio has a vim emulation plugin (VsVim) and Sublime has vim emulation mode too!
Yep, it is the vim bindings and mode based editing that I love. XVim for Xcode, IdeaVim for Idea, and all those editors with vim modes. I used to hate vim, but once I got used to it, I'm just so much faster.
It depends, but if you do Haskell, with syntastic and ghcmod-vim, you get most of what I care about in an IDE, namely getting warning of errors before trying to run my program.
The Vim plugin for Visual Studio is very good, in my memory. Note that Kate has also a pretty good Vim mode. There is also a decent free Vim plugin for Eclipse [1].
I think mode-based editing will be the answer of almost everyone, plus the imperative that you have to have a shortcut for everything.
That makes vim/emacs not only fast editors in the processing sense, but editors where you can be really fast at what you do. All this comes at a steep learning curve, which is the only downside I can see.