Live data from Hacker News

Vim for Humans

vimebook.com

101–110 of 251 posts

Re: Vim for Humans

#101

Earlier quoted context omitted.

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.

hjkl (not jkl;) are a) ergonomically bad because they are one key off of home row position and b) completely useless for anyone who types with a different keyboard such as Dvorak, and presumably some foreign language ones. also, HJKL actually IS the arrow keys... but it's the arrow keys from an ancient computer that no longer exists. People get all uppity about it being the "right" way but there's no logical argument…

Completely agree. Personally, I'm trying to spread the One True Way of ijkl navigation, but it's slow going...

Re: Vim for Humans

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

Re: Vim for Humans

#103
post #70

Earlier quoted context omitted.

> it just doesn't make sense to me. Here's how to think of Vim that will make sense. Suppose you have two identical codebases that each need to have the same 200 lines changed. Functions need to be added, comments to be removed, templates need modifying, and so forth. In one of the two codebases, you use Nano to apply those changes. In the second codebase, you use Vim. Assuming the Vim user was proficient at Vim, you…

I hear you for nano, but what about compared to [graphical mouse-clicky editor of choice] (in non-vim mode)? I know enough of the basic vim commands that I could edit a file if I ever needed to but how much hand effort could it save me vs. kate or VS Code? (though i really prefer notepad++ to both of those) I feel relatively efficient in a good graphical editor but maybe I just don't know any better? Really just give…

There's a plugin (can't remember the name of it right now) that lets you use mouse controls as well. Click where you want the cursor, scroll, click on which tab you want, etc. That was game over with Sublime for me.

Re: Vim for Humans

#104

the only thing you need to know about vim, "kill -9 `pidof vim`" Seriously, why bother with this esoteric and cryptic software when something like Atom,SublimeText and VSCode exist...

"esoteric" and "cryptic"? Have you ever learned vim keybindings? They improve my productivity by a nontrivial percentage. Tens of thousands of other developers have the same opinion.

Unlike Atom and Sublime, vim is far more performant and is available on every machine I SSH into. I'd drop into an IDE (with vim keybindings) for a large Java or C++ project, but vim wins every other time.

You should give learning vim a try at some point if you haven't already. It's a steep learning curve, but it all pays off. Typing vim movements feels like playing a piano.

Re: Vim for Humans

#105
post #5

Earlier quoted context omitted.

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 may be, but it's tough to use a customized vim on your local machine, and then switch to a stock install on a server somewhere, no?

I agree. Personally, I prefer getting used to the defaults than going through the pain of customization. I tried it, but it meant additional syncing between my machines, fighting with plugins, and it's not always possible to customize vi mode in some environments (like Eclipse or Sublime).

Overall, I think vim is great for simple and fast editing, but as soon as I need to work on a multiple files projects, I switch to something else, possibly using vi mode if there's one (and even there, I wonder if I shouldn't embrace mac os shortcuts once for all).

Re: Vim for Humans

#107
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…

This is exactly what I feel too.

After watching Bret Victor's talk https://vimeo.com/67076984, I feel like Vim way of using computers is backward. I am probably wrong because I never got proficient with Vim. Using it only when I SSH to remote server.

Re: Vim for Humans

#108
post #100

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 started out like this. In effect in the beginning you can do everything in edit mode, you don't actually need the key bindings. Pretty much the only thing I learnt was 'dd' to delete a line (which actually just cuts the line). The other very simple thing is just typing '/' and then searching. It's much simpler and more natural once you're used to it than Ctrl+F. Then further searching is just hitting '/' again inst…

> beginning you can do everything in edit mode

Can I make an alias for vim or emacs to keep me in edit mode at all times? That's one of the worst things about the editor.

The other "Worst" thing in the editor for me is that it doesn't show the common shortcuts at the bottom like nano does.

Is there a way to do this? Is there a plugin that observes all of the shortcuts you use and lists the most common ones at the bottom?

Re: Vim for Humans

#110
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…

"I have to reach over, select the whole line (being careful not to over or under select)"

Try triple click ;)

Post reply on HN