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).
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.
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...
For Vim and much else, I've found it worth reacquainting with "as is," after years and decades of customization.
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.
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...
This is understandable. Coming from Emacs, I need an equivalent of projectile to stay productive while learning.
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.
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 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).
I second the suggestion of using vimtutor to get started (uninstalling other editors helps too!).
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
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 moveMost 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.
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?
(I really, really want that for Blender. The Blender hotkey document is 9 pages and years out of date.)
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.
Sidenote: The navbar & images break on smaller screens.
My e-mail is sorhed at gmail
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.
:imap kj <Esc>
And then Vim kinda makes sense to me. Pressing <Esc> each time is such an anti-pattern imho.Vim mode all the things.
cool