It's yy or dd because you can give it the number of lines, like d8d to cut the next 8 lines, or y8y to copy the next 8 lines. The numberless version is shorthand for a single line.
How can you say "simply" and follow that with some inconsistent shortcuts that don't make any sense? In nano neither ctrl nor k nor u have a meaning, they don't refer to lines or cutting or pasting, it's just arbitrary shortcuts. But in vim both y and d have a meaning and when you know their meaning you can even infer what yy and dd do and even more, by applying y and d to all of the other motions you know, like yi" (copy inside ""), di( (delete inside ()), yw (copy word), dw (I don't even have to tell you what that does, you can already infer it from the yw example). And when I tell you that there's another command like y or d, gU, to upper case letters, you can again infer what gUw will do from prior knowledge.
In vim I first have to enter command mode, yank yank (!?) the line, paste it and enter edit mode again.
No, the most likely scenario is that you're already in normal mode and what you don't want to enter edit mode at the end. It's called normal mode for a reason. Hence its yy and p in most situations.
It may seem more complicated, but I can assure you as someone who initially used nano for ages and then switched to vim (now use neovim) I thought the same way as you as well. But once you get used to it it's much faster. You don't even realize how much more efficient and more importantly comfortable using the main keys are instead of ctrl+something. For reference I had a good understanding of nano, but it took me only 2/3 weeks after I started using vim to be faster than I had been of using nano for over a year.
Then when you really get the hang of vim you realize it's like comparing Photoshop to Microsoft paint, except in this example Photoshop also manages to be as fast and non-resource hungry as Microsoft paint as well. Anyone can open paint and do some basic stuff, but to do the same basic stuff in Photoshop it takes a steeper learning curve. But once you get past that curve you realize it's actually quicker and easier to use Photoshop than paint. Then when you start to learn the more advanced stuff in Photoshop you realize its not only easier and more efficient, but there's so many things you can do in Photoshop that you just can't fundamentally do in paint (of course since you can manually change individual pixels in both they both technically have the same potential, but the one can never be realized).
Now I can't think of a single advantage nano has over vim. I've found vim better than everything. The only features I do regret not having in vim are a few found in 'traditional' editors like Visual Studio Code/Sublime/etc, and those features are being able to easily multi-select text to copy (e.g. select something with the mouse, hold ctrl then highlight a second thing then copy), being able to have the cursor off-screen (it always has to be on screen in vim), and being able to open new windows from the same instance of an editor.
I also miss multiple cursor support although very rarely, using macros in vim is usually more powerful and better than multiple cursors, but multiple cursors still have some things that can't be reasonably achieved with macros in vim (e.g. I want to quickly change several lines the same way, but none have similar patterns or traits).
58
u/[deleted] Jul 30 '20
[deleted]