top | item 38866623

(no title)

blackpill0w | 2 years ago

> Someone (probably a sysadmin) showed me vi. I thought the whole concepts of modes was stupid.

I couldn't agree more. I've never understood vim, I just want to edit text, why turn it into a complicated task in which I must remember a thousand shortcut, and the same shortcut does a different thing in each mode.

discuss

order

skydhash|2 years ago

It's not a thousand shortcuts, but more of a language for text edition, it's merely expressing what you thought when doing the tasks itself. Like:

"Search for the function name foobar; swap the parameters by cutting the first one up to the comma; delete the latter, and the space which comes after; type a comma after the other parameter, and paste."

The Vim commands are: / foobar <Enter> f ( l v t , " a d d f <Space> e a , <Space> <Esc> " a p

With VS Code, it would be like: <Cmd>+f foobar <Enter> "Carefully select the first parameter" <Cmd>+x "Place the cursor at beginning of the second parameter" <Delete> <Delete> <Option>+<Left Arrow> , <Space> <Cmd>+v

The nicest thing with vim is that I never have to touch the mouse for a lot of tasks. And I don't really think about how to edit, just what to edit as the language is very intuitive once you got it down.

blackpill0w|2 years ago

>The Vim commands are: ...

You forgot the time you spend learning a counterintuitive way to edit text. The microscopic time you gain while editing text is nothing in comparison to that.

>just what to edit as the language is very intuitive once you got it down.

Everything can become intuitive when you spend hours and hours learning it. The question is whether it's worth it.

aCoreyJ|2 years ago

Just try it. Your favorite editor almost certainly has a vim motions plugin, try it for a week and see if you go back.

blackpill0w|2 years ago

I did try it. It seems to me that I would have to invest too much time for not much benefit, I would rather learn a new programming language, listen to a talk or read a book than spend hours learning a new method to edit text while I can do that just fine, with decent speed.

john-radio|2 years ago

`vimtutor` from the CLI (on a computer with vim installed) is the best way I know of to pick up vim.

xtiansimon|2 years ago

Haha. With a piece titled “…commands I got by with for years”, I have to laugh about this comment on modes. I’ve been using VIM for years for admin and some scripting and I don’t _know_ what a mode is. If I think about it, I guess I know edit is a ‘mode’, but if you start with cat and less, then VIMs edit mode is intuitive.