back
240 comments
I've only skimmed this but there seems to be a focus on customizing and plugins from the get go. I think it's worth getting to know Vim "as is" before doing such things. Indeed there certainly some things that aren't the most useful or obvious but it's good to understand their original intent.

Not to crap on the author of this but I'd recommend Drew Neil's Practical Vim over this (and pretty much every other Vim book).

https://pragprog.com/book/dnvim/practical-vim

I kind of agree but vim's defaults are awful. Tim Pope has put together a good set of non-opinionated defaults which don't change key bindings or customize it otherwise [0]. I have a very similar vanilla setup with no plugins apart from syntax highlighting for some languages not included by default.

[0] https://github.com/tpope/vim-sensible

To perhaps go against the grain a little here, I appreciate a focus on customisation from the start.

I am beginning to use Vim more, mostly because I was introduced to the keybindings with Vim emulation from other apps, and I appreciate how it works. I had previously attempted to learn Vim through the normal ways, but it just was impossible; by default, Vim for me is barely readable and none of the included colour schemes ever made it any better. Plus, of course, some of the other things like size of tabs, line numbers, often even syntax highlighting. But finding out how to deal with plugins, themes, settings, etc. is difficult when you aren't already introduced to Vim, precisely because most people make the assumption that you've learned Vim "as is" already.

I think some concession has to be made to modernity. Vim is very old and "as is" it often just doesn't function very well for everyday use. Grinding through that until you know it well enough to be given the knowledge of how to make it nicer to use isn't worth it to most people. It certainly wasn't to me.

I can't recommend this book enough. As a long-time Vim user, I still learned a few things after reading this book. Drew Neil is a pretty awesome person too.
Yip, practical vim is absolutely excellent, I'd highly recommend it.

One other link I haven't seen mentioned here is the user-manual[0] or typing (:h user-manual), and of course typing `vimtutor` at the shell...

[0] http://vimdoc.sourceforge.net/htmldoc/usr_toc.html

> I think it's worth getting to know Vim "as is" before [customizing].

For Vim and much else, I've found it worth reacquainting with "as is," after years and decades of customization.

I disagree. Vim is bare, cold, and strange when coming from a traditional editor, and I probably wouldn't have gotten involved if it were not for a friend who already have a useful .vim and .vimrc for me to use as a starting point. He got me up and running with a Vundle, syntax highlighting for all my languages, autocomplete, and various settings that should have been default with stock vim. Though vimtutor was also very useful for getting used to the standard controls.

Edit: Forgot the most important thing, the setting that lets you use the mouse: set mouse=a. After I discovered this I knew I was never going back to Sublime.

I started out trying to go plugin free since I wanted to avoid bloat, but eventually gave in once I found plugins that eased bottlenecks in my workflow with a barebones vim.

Though I love the plugins I use now, I do agree that it makes sense to be fairly comfortable in a plugin-free vim before installing a ton of them.

I wrote a blog about this topic a month or so back:

http://blog.bugreplay.com/post/149712686514/how-i-learned-to...

The benefit of learning the 'default' vim becomes obvious when u have to log in to a foreign system.
I agree and then I got a little mad. My version 1 is outdated and the updated ebook is a full price cost for me. Why are some ebook companies charging full price for revisions of books purchased?
> there seems to be a focus on customizing and plugins from the get go

This is understandable. Coming from Emacs, I need an equivalent of projectile to stay productive while learning.

Nice, "practical VIM" is how I learned VIM. Very easy to understand given the examples.
I always thought that if I were ever to write a book on vim, I'd start with a thorough introduction to ed, followed by a thorough introduction to ex, finally followed by a thorough tutorial on all the features of plain-old vanilla vi, only then to introduce the vim parts and macros and graphics and things.
It took me a while to realize what really vim is for. What led me to realization was switching to Emacs. I read this post, and second checkbox says "modern customizable IDE". And I stopped there. Why you may ask? Well, I used Vim for 3 years before trying Emacs this spring. And I loaded it with all the heavy plugins(YCM), but Emacs led me to realization that Vim is more of an editor than IDE. Even with plugins I think it just doesn't even come close to Emacs, which has really nice ecosystem and plugins that are spot-on IDE feeling (ENSIME, CIDER, Alchemist etc). When I configured Vim again few days ago I realized how I misused Vim. My init.vim had about 150 lines of code, with few plugins, and now it felt right. Just like it felt right to customize the living hell out of Emacs. Again, this might be just my perception of things, some other people like it the other way, different flavors for different people, but it is how it felt right for me personally, after trying to understand philosophies and surroundings in which these wonderful pieces of software were made.
I will add some of my own opinions:

My feeling is that real value of Vim is its novel approach to modal text manipulation, and you shouldn't let the fact that it has a standalone lightweight reference implementation usefully installed on almost every machine that you use confuse you.

Vim script is not a great plugin language, and the vim runtime itself is not fantastic at doing things beyond the text editing. I think the activity around NeoVim is good evidence for this. The community recognizes the constraints of Vim, and seeks better plugin and runtime tooling to meet their needs.

My issue is: there are loads of great text editors that support the Vim interface. Emacs, Atom, Sublime, whatever, all have very good Vim interfaces and far superior languages and platforms for doing complex plugin work that you need to support IDE-ish environments. NeoVim seems like a bit of a waste to me, because I think it misses the point. Vim is not a platform. It's a unique modal editing paradigm. Why make yet another Vim-binding-having platform?

I guess what I mean is that vim should be left as vim. There are superior platforms that implement the same interface, should you feel the need to expand your tools. Vim does best as a portable minimal editor that you can use everywhere. If you need something with more power, pick a better platform, and run the Vim editing paradigm as an interface.

I don't think it's true that vim "just doesn't even come close to Emacs". They each have their strengths and weaknesses.

As bad as the defaults for vim are, they're even worse in emacs (IMO) -- especially for former vim users (though I haven't tried spacemacs, which is supposed to make things automagically a lot more comfortable for people coming from vim). Evil mode helps a lot, but even with evil, most commands in emacs and its modes remain bound to traditional emacs chorded keystrokes, not to vim-style moded keystrokes (the latter of which feel much easier on the hands for me).

I've used vim (vi and some other vi colones before that) for over 25 years, and switched mostly to emacs (with evil) about 6 years ago or so (while continuing to use vim on servers that didn't have emacs installed).

I spent several months, spending 10 hours a day to customize emacs the way I liked it, and to bring it mostly up to parity with my vim config (which was thousands and thousands of lines long), along with customizing some emacs extensions that had no vim equivalent (like emacs-w3m, which is an embedded web browser, which is still super handy despite not working with javascript). It took that long despite me knowing Common Lisp and scheme before switching to emacs, which made learning Elisp a breeze compared to the extra effort it would take someone coming from vim who didn't know any Lisp.

And still, even after all that work, I haven't gotten around to learning and customizing many of the things I really want to use emacs for, like email, IRC, RSS, Slime, and the various other extensions made for editing Lisp and Scheme.

So I found the switch to be a ton of work, which was worth it for me, since I'm still using emacs instead of vim, and don't intend to switch back. But others who are considering a switch from vim to emacs should also be prepared to do a lot of work customizing emacs to your liking. It's a never-ending process, really, just as it is with vim.

Now some words on some of what I see as strengths and weaknesses between the two editors:

Vim has much better tab support out of the box. Emacs has any tab support without extensions, to my knowledge.

Though vim's methods for writing syntax-highlighting for new, not already recognized filetypes is a bit of a nightmare, I found it to be a lot easier to understand than how to write new modes in emacs -- which I still really haven't bitten the bullet and fully learned. So for some filetypes that emacs doesn't have modes for, I still use vim to this day. This is particularly the case for strace output, which I view pretty regularly in vim, which handles them just fine, but emacs still has no modes for.

One of the main reasons I switched to emacs was for its allegedly superior shell/terminal integration. But I found it really lacking for anything that involves curses terminal graphics, and also not really practical for me since I don't use GUI emacs, but rather use emacs inside tmux and inside a terminal. This makes for way too many levels of indirection for commands, and a lot of keystrokes are taken up by the various levels. Some say I should just use GUI emacs and not use tmux, but I don't want to do that, and am not going to go in to all the reasons why, in the interest of not making this post much longer than it already is.

Emacs has a huge win over vim (for a Lisp/Scheme lover like me) in being natively scriptable in Elisp (and perhaps soon in Guile Scheme). vim could be scripted in scheme, but 99.9% (or more) of vim scripts aren't done in scheme -- the ecosystem is really mostly vimscript, which I don't hate like some people do, but which still pales in comparison to "real" programming languages like Python or Ruby, and even more so compared to a Lisp or Scheme (IMO). While virtually the whole emacs ecosystem is written in Elisp. That's super important to me, and makes writing and reading my emacs configs and emacs scripts a lot more of a pleasure for me than scripting vim will ever be. When mainline emacs switches to Guile Scheme, scripting it will be even more fun for me, and this Lisp ecosystem is one of the primary reasons I will continue to use emacs instead of vim in the long run.

vim has neovim, which is super exciting, and has even made me (on occasion) wonder if maybe I should switch back. The ability to completely and cleanly split vim between the controlling and presentation levels and to properly and fully embed it in other programs is going to be huge. Emacs still has a lot of catching up to do in this area, despite it having a server mode, which does help.

emacs can be really super slow on some large files that demand a lot of syntax highlighting. vim has the same problem, but to a much lesser extent. There are times that I'll switch back to vim just to edit some huge files every now and then. In such times, I must say that it's nice to be comfortable in both editors, so I have a choice as to which to use as the situation warrants.. the right tool for the job, and all that.

As I mentioned before emacs-w3m (a web browser embedded in to emacs) is really great, and I use it all the time, despite it not being able to handle javascript. It's awesome to be able to split a web page in to panes in the same and independently scroll each pane, and to copy and paste things in to the panes without leaving the editor. It's super handy for browsing several sections of online documentation at the same time, without having to split out the page in to seperate windows in a traditional browser. I also use pentadactyl in firefox, and while that's pretty cool as far as it goes, it still does not come close to the power of having the browser embedded in an editor as powerful as emacs, and vim doesn't have anything close to that, to my knowledge.

Similarly, there are emacs extensions for full email, IRC, and RSS clients, which sound awesome and don't have vim equivalents, to my knowledge. But I haven't tried those, so can't comment.

There are many more things that one editor or the other is better at. But I'll just end this here, so I don't make this post much more ginormous than it already is. This subject really deserves a blog post or even a series of them, and maybe I'll write one.

I wish I could use vim or emacs. I don't know if I'm stupid or something but all of the key bindings, everything you have to remember, it just doesn't make sense to me.

I wish there was something like nano + plugins. If I had that I could implement most of what I need (other then auto-completion for a crap load of languages).

Learning Vim is probably a bit like learning to bicycle/swim. It requires a lot of conscious effort at first but eventually becomes a second nature. Also, I doubt many vim users would use "nano + plugins" if vim suddenly disappeared. The fact that vim has many plugins and runs in the terminal is nice but isn't the main reason people use it IMO.

I second the suggestion of using vimtutor to get started (uninstalling other editors helps too!).

Vim is very easy, I think it's just simple to get overwhelmed with it.

There are a couple of tools which gamify Vim. I personally haven't used them. But some say they're pretty good.

For me, what worked was just jumping in and going whole hog. I tried disabling the arrow keys in Normal Mode, so I would have to use hjkl for navigation. But my keyboard puts the arrow keys in easy reach (Kinesis Advantage), so it turned out not to be much of a need.

What you may like is turning on relative line numbers. That way you can visually see what line you're at, and how many lines away your target is that want to jump to. Then you can practice going 5k to go up five lines, or d2j, to from where you are to two lines down.

This article was actually eye-opening for me: https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-m...

Maybe it'll help you too.

:wq

Vim takes a while to grok. You have to move away from the mindset of "memorize a lot of strange commands" to the mindset of a language for text manipulation. Then, learn the absolute minimum set of commands ([a]ppend, [i]nsert, [d]elete, [p]aste), start using, and add vocabulary gradually. Just like learning a new language.
> 3.5 Our first plugin: the file explorer

  it would be cool to be able to open
  files without having to do File -> Open
  using the menu bar
How about using the :edit command?

> 3.5.1 Plugin manager: Pathogen

> 3.5.2 The NERD Tree: a file explorer

  The NERD Tree is a plugin that will
  allow you to display your directory
  and file tree directly in Vim
> 4.1 Learning how to move

Most distributions of vim include the netrw plugin for remote and local directory browsing. Do we really need to learn how to install plugins before even learning how to navigate within a file?

This book seems to focus on the basics of vim. Unfortunately, it falls into the common trap of piling on many layers of unnecessary extras before explaining the basic details. I would not recommend this resource to a beginner.

A little background. I am familiar with vi and use it only when I ssh into a server.

But I never really felt it was more convenient or an improvement over a GUI based text editor or IDE on my development machine. Eg- gedit for simple text editing, Android Studio for android development, Atom for python coding. Everything works out of the box with minimal tweaking required.

Genuine questions:

-At what point on the learning curve do you feel using vim is an advantage for speed of development, if at all?

-The common argument of only keyboard, no mouse when using vim... I don't get. Is using a mouse such a major factor that slows you down or affects you negatively?

The thing that helped me most with vi(m) was this change of mindset: don't treat Insert as an alternative mode. Instead, threat the append and insert commands as any other command, just ones that happen to (often) take long arguments, and make it a habit to always terminate those arguments with <esc>.
Setting up vim as an IDE is cool, but it certainly not a "first step." Better to learn foundational vim concepts, and then make this decision.

http://learnvimscriptthehardway.stevelosh.com/

I continue to be baffled that software written 40+ years ago, to deal with constraints and realities that are long long gone keep being used by people on the cutting edge of technology change.
What Vim, and a lot of other programs, really need is a single plastic-covered card which tells you how to use the program. You can squeeze a summary of calculus on one such card. Is it too much to ask for software?

(I really, really want that for Blender. The Blender hotkey document is 9 pages and years out of date.)

Oh, "for humans"... It was cool when requests came out and it made sense to the audience (Python people familiar with the standard library). But it gets applied to so many things these days that it's just corny. I suppose most people using it intend to convey a folksy, whimsical, self-conscious style. It's supposed to make the content seem approachable.

The folks behind the "Head First!" series seem to understand the appeal of making content approachable. So did the creators of the "For Dummies" series. Hell, Reagan used jelly beans.

It feels dishonest, somehow. Just call it a vim book, or whatever.

I am old enough to know vim pretty well and I guess I do not need the e-book, but I just wanted to congratulate you for the landing page: clear design and better content. I just love the pitch "How do I quit this @#!?"
Good alternative: A byte of Vim - http://www.swaroopch.com/notes/vim/

Sidenote: The navbar & images break on smaller screens.

Just paid 3.5 euros and haven't got the book, site said page doesn't work :(

My e-mail is sorhed at gmail

2.1 For who?

If the author is reading this, proper English would be "For whom?" The intro says he's not a native speaker, so it's a common mistake. Easily fixed.

Anyone using vim-mode plugins for other IDEs? Most vim critic in the comments seems to be against it as an IDE, while the biggest benefit is obviously the keyboard control. So why not use the combination of both (I installed plugins for Visual Studio and Atom a few days ago and I'm quite happy so far, but it's my first steps in to vim, so maybe I'll find things that won't work later)?
vim for humans is nano -- you shouldn't have to read a book to learn how to use a text editor.
Wow this site doesn't work at all. I clicked on the "download the ebook" and nothing happened. Scrolled down, entered $0 and I get a blank page. Anything above $0, credit card form works fine.
Seems to be down. Here is the source https://github.com/vjousse/vim-for-humans-book
The very first thing I do on any default Vim config is

    :imap kj <Esc>
And then Vim kinda makes sense to me. Pressing <Esc> each time is such an anti-pattern imho.
A wiseman once told me: "If you have to hold a key to reach your goal, there is probably a better (i.e. shorter) way to do it."
I'm assuming this page doesn't resolve because vim is not for humans.
Working link where I can download the book? Link in OP isn't doing it.
I not only use vim but I use vim mode in Atom and within tmux.

Vim mode all the things.

Hmm. Is anyone else getting NET::ERR_CERT_AUTHORITY_INVALID error?
Your SSL is jacked up
I can't download the PDF, and the EPUB neither.
learn incredibly unintuitive fucked up shortcuts to perform basic tasks that a basic bullshit gui text editor can perform

cool

I think this site got slashdotted.
Hmm getting a 404 here :(
The site seems down.
The SSL certificate for the site is marked as invalid in Google Chrome on the latest macOS.