|
|
|
|
|
by blackpill0w
894 days 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. |
|
"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.