Live data from Hacker News

Vim for Humans

vimebook.com

51–60 of 251 posts

Re: Vim for Humans

#51

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).

Upon seeing the headline I was hoping this was a reworked version of Vim that was more intuitive, that didn't require the user to learn all the secret handshakes and voodoo recitations to get things done.

Re: Vim for Humans

#52

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).

Just curious, what editor(s) do you use? I was using Sublime Text, and for the hardest part of switching to Vim was feeling the huge productivity drop in the beginning as I relearned how to do everything.

Re: Vim for Humans

#53
> 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.

Re: Vim for Humans

#54
post #45

Earlier quoted context omitted.

Copy over one file (.vimrc) and you're done. If you use plugins, then copy them over with git or whatever. And my setup is very conservative so it's mild annoyance at worst. The defaults are just bad, I recommend using vim-sensible or doing your own lean and mean vim config.

As someone who only uses Vim casually, what's an example of a bad default? For someone who is new to Vim, they wouldn't know if the controls are bad, or tough to learn e.g. using jkl; instead of arrow keys.

> As someone who only uses Vim casually, what's an example of a bad default?

By default, vim doesn't enable filetype detection or syntax highlighting, so even though it can easily recognize a source file's language, it doesn't.

Re: Vim for Humans

#55
post #22

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 lea…

In college I used something like 10 systems on 6 networks of which I had control over 2. VIM was already everywhere, that's when it's worth learning. When ubiquity is a compelling feature

Re: Vim for Humans

#56
post #5
post #3

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…

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

That's why Neovim carefully implemented[1] most of the defaults (and a few others) from sensible.vim.

[1] https://github.com/neovim/neovim/issues/2676

Re: Vim for Humans

#57
post #9

The SSL certificate for the site is marked as invalid in Google Chrome on the latest macOS.

Looks like the CA bundle isn't included

That's correct. "The certificate chain is complete", says https://www.ssllabs.com/ssltest/analyze.html?d=vimebook.com

Re: Vim for Humans

#58
post #22

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 lea…

Well, it depends on what you're doing. For example, if I want to duplicate a line in vi, I can type 'yyp' and _bam_: duplicate line. With a keyboard and a mouse, I have to reach over, select the whole line (being careful not to over or under select), hit Ctrl+C, move the cursor down to the beginning of the next line, and hit Ctrl+V. If I want to change the contents of a quoted string, I can type 'f"lct"' and start ty…

> With a keyboard and a mouse, I have to reach over, select the whole line (being careful not to over or under select), hit Ctrl+C, move the cursor down to the beginning of the next line, and hit Ctrl+V.

Sure, but who does that?

In any text editor on the Mac its:

    - Command-Left to move to the beginning of the line
    - Shift-Command-Right to select to the end of the line
    - Command-C to copy
    - Command-V to paste
One annoying thing about that, though, is that it doesn't copy the newline itself, so if you want to paste the line and the line terminator multiple times, you need to do something more like:

    - Command-Left to move to the beginning of the line
    - Shift-Command-Right to select to the end of the line
    - Shift-Right to select the newline
    - Command-C to copy
    - Command-V to paste
But, of course, most full-featured text editors make that easier. In Sublime and Atom, it's:

    - Command-L to select the current line
    - Command-C to copy
    - Command-V to paste

Re: Vim for Humans

#59
The very first thing I do on any default Vim config is

    :imap kj 
And then Vim kinda makes sense to me. Pressing each time is such an anti-pattern imho.

Re: Vim for Humans

#60

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).

I use Sublime (happily staying here as well) but I use vim still for tiny editing very now and then. I'd recommend learning just moving around (I use arrow keys). A for append to end of line, I for insert in beginning, dd for delete line, i for insert mode, wq for save and exit. Maybe 5up/5down etc for faster navigation.

This is pretty much what I only use. I feel quite comfortable with vim and if I ever feel like I want to learn more, knowing how to do these super basic steps feels like a solid ground.

Post reply on HN