dt: "It's not THAT Hard!" proceeds to explain 300 keybindings
@zherka_pill6 ай бұрын
is really not that hard
@e555t664 ай бұрын
It is like learning alphabets. Do you remember learning them?
@LappDog9 ай бұрын
Some useful find/replacement commands (not mentioned): :s%/foo/bar replaces first occurrence of 'foo' with 'bar' in the buffer :%s/foo/bar/g replaces all occurrences of 'foo' with 'bar' :%s/foo//gn counts all occurrences of 'foo'
@DestopLine6 ай бұрын
the % goes before the s actually :%s/foo/bar
@LappDog6 ай бұрын
@@DestopLine Ooups! Typo. Let me change that..
@alvin555313 ай бұрын
i'd add, the /g is for replace all instances occurring *on the same line*. Without /g it'll still replace across the buffer, but if multiple matches occur on one line, it'll only replace the first on that line.
@LappDog3 ай бұрын
@@alvin55531 global replacement - yes, I know. You can also do a /gn if you want do do a "dry run" and count all occurences of a word.
@jwf31489 ай бұрын
Vim has intimidated me for a decade-and-a-half to two decades...No More !!! Thank you Distro Tube !!!
@Jacob-nz8ok9 ай бұрын
"It takes a day to learn Vim. Everyday"
@zumatse7 ай бұрын
[00:14](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Installing Vim using Pacman on Arch Linux. [00:53](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Introduction to Vimtutor as the first lesson in learning Vim. [01:36](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Opening and quitting documents in Vim. [02:02](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using `:q` to quit Vim and `:w` to save changes. [02:42](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Saving and quitting Vim with `:wq`. [03:24](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Forcing Vim to quit without saving using `:q!`. [03:35](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Explanation of modal nature of Vim and the default "Normal Mode". [04:04](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Basic motion keys in Vim (`hjkl`). [05:25](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Switching from normal mode to insert mode using `i`. [06:21](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Undoing changes with `u` and redoing with `Ctrl+r`. [06:50](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using visual modes (`Shift+V` for visual line mode, `Ctrl+V` for block mode). [07:57](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Moving around the document using `gg` for top and `Shift+G` for bottom. [08:26](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Navigating to specific line numbers with `:[number]G`. [09:07](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using `0` and `$` to move to the beginning and end of a line. [10:33](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using braces `{` and `}` to navigate paragraphs. [11:14](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Searching for strings within Vim using `/`. [12:22](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Moving by words using `w` for forward and `b` for backward. [13:05](kzbin.info/www/bejne/b6jcenh5n9x0n9E): `e` and `ge` for moving to the end of words. [14:24](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using `Shift+W`, `Shift+B`, and `Shift+E` to navigate words without counting punctuation. [15:18](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Navigating matching parentheses, braces, and brackets using `%`. [16:40](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Deleting and copying (yanking) entire lines with `dd` and `yy`. [17:33](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Yanking and pasting the entire document with `:%y`. [19:10](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Swapping lines using `ddp`. [20:19](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Using `P` and `Shift+P` to paste lines above or below the current line. [21:30](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Entering insert mode at the end of a line with `Shift+A`. [22:11](kzbin.info/www/bejne/b6jcenh5n9x0n9E): Deleting characters with `x` and replacing them with `r`.
@joetheman749 ай бұрын
The reason for sticking with HJKL is for typist that know how to type properly. HJKL are on the home row. The idea is efficiency. You keep you fingers planted on the home row without having to move back and forth to the arrow keys and back. It makes things faster and more efficient.
@SethbotStar9 ай бұрын
I've always heard it had to do with the arrow keys simply not existing at the time. It may *also* be that, but it may not have existed if arrow keys happened to be a thing... I can only speculate.
@halfsourlizard93199 ай бұрын
This is the way. Be warned: After you learn Vim, it will be truly painful to watch non-Vimmers flailing around trying to move their cursor by pressing the arrow key 47 times to do what `f(` would have done ... or ... worse ... using the mouse.
@SamuTheFrog9 ай бұрын
Yeahh.... going back to anything else is ruined the second you get even the tiniest bit of muscle memory for vim.
@halfsourlizard93199 ай бұрын
@@SamuTheFrog Pretty much ... And we have a tendency to install Vim keys for everything (readline, Vimium ff, etc.) ...
@smoteytothemax9 ай бұрын
Careful. Emacs binds are just as efficient
@halfsourlizard93199 ай бұрын
@@smoteytothemax Hard disagree -- they're clunkier (since Emacs isn't modal) and they're far less compositional (e.g., yank the next 5 words, paste a line 4 times, select up to and including the next 'f').
@halfsourlizard93199 ай бұрын
@@smoteytothemaxOh, also, good luck doing things like 5,12t0 in vanilla Emacs ;P
@gaiusbaltar71229 ай бұрын
I used to hate Vim and use Nano but once I really took my time to learn it, could not use anything else no more.
@michaelutech47869 ай бұрын
I really don't understand how nano made it to become the goto configuration editor. Sure, VI is ridiculous for anybody being used to normal software. But while nano shows you how to save and exit, it's still so clumsy and quirky that fast editing a config file is a real pain in the warmest place around. There were a whole plethora of simple text editors over the years that did what nano does without the quirks and noise. Something like micro-emacs, which had many of the Emacs quirks but could be used like notepad if only you could remember C-x C-c. What is the nano-binding for that? C-x y? The 'y' in response to do you really want to? VI has config file assassination vibes, jump in, kill the bug, jump out. No need for VIM, it's just the VI that's usually already there. This is the most efficient tool for this purpose I ever saw. Looking at VIM for software development (NeoVIM then?), I see that it can be made to do what most IDE's can, in a terminal, light weight. Ok. I still think Emacs does better. On the other hand, if all you want is code completion, LSP, colors and stuff, that already works in VSCode and you don't have to spend weeks setting up your VIM. Doesn't matter that it takes a while to start, how often do you really close it? Once per day? VI keybindings, yeah, get it. But does this really justify that religious vibe around VIM? Never understood that. Totally not saying VIM is bad or even Emacs is better. Great for hit-n-run, okayish for development. Like a huge bunch of alternatives. Emacs as a Code editor also is not so very convincing, but it has a lot of features that make it entirely unique. They're not for everybody, Emacs is quirky as hell. But these features are something you find only there. I don't see that with VIM. What I can do with org in Emacs is mind blowing. Magit - perfect. I believe that should be the hype for geeks.
@zell44127 ай бұрын
@@michaelutech4786agreed emacs is way better, neovim is really fast and flashy but debugging is shit and much more limited compared to emacs
@Kaikaci079 ай бұрын
I know vim, but still watching because dt❤
@distant66069 ай бұрын
For going to the first and last actual non-whitespace character in a line i think it would be more consistent to use _ and g_ instead of ^ and g_
@lritzdorf9 ай бұрын
If it helps, I remember the keybinds using the fact that they come from regex syntax - i.e. ^ for start-of-line, and $ for end-of-line. Also, I didn't know g_ was a thing, so that's neat. But also, for the sake of your co-editors, please try to avoid trailing whitespace... In which case g_ and $ are equivalent
@nexu95689 ай бұрын
Thanks this is really informative. Ive been using vim for the last half a year and I've been getting used to it and learning some of those keybinds. And this video is great summary of the basics and i will definitely rewatch it in the future.
@MerkDolf9 ай бұрын
HEY DT how did you get your keyboard strokes to show up in the black box at the bottom right of the video?
@DistroTube9 ай бұрын
A program called screenkey. Should be in every Linux distro's repos.
@MerkDolf9 ай бұрын
@@DistroTube Thank you kindly have a great day.
@what-about-bob9 ай бұрын
@@DistroTube be careful, DT! If this software is hacked it can easily become a keylogger. BTW great intro. Not so sure it is gentle but it is clear and shows how powerful vim is even at a basic level. I have been inspired to learn. I am already ditching my word processor for plain markdown and pandoc (LaTeX is OTT for me). Fathers need to tell their sons "don't play with your mouse!" 😂
@richardsxxxx9 ай бұрын
Thanks I like this one more than showmethekeys and it's less intrusive also @@DistroTube
@hulk30775 ай бұрын
Hey DT, thank you for this gentle introduction to Vim, just a small correction that I noticed while following along, the dollar ($) sign won't do reverse search you need to click on the question mark (?) symbol and type the word to search in reverse.
@AndreasWilfer9 ай бұрын
Very informative and well done for absolute vim/evil motions beginners like me, appreciate it!
@tylerdean9809 ай бұрын
vi vi vi is the editor of the beast
@maxsiem779 ай бұрын
Thanks, @DistroTube!
@DistroTube9 ай бұрын
Appreciate that! :D
@smoteytothemax9 ай бұрын
Thanks DT! Youre a LinuxTube legend. 💪
@bojanstrkovski219 ай бұрын
thanks for this great tutorial i finaly understood the visual modes little bit better after using neovim for quite a while keep on creating this much needed lesson for us noobs and everyone else best regards from Macedonia
@Prophet60009 ай бұрын
This video is right on time I just installed Vim recently. I've been using Micro terminal editor.
@joanarling8 ай бұрын
Some viewers might wonder where that "hjkl" idea came from... it's an inheritance from the original vi. At the time that was developed, cursor keys were far from common on many terminals, so other keys had to do.
@teamvigod9 ай бұрын
Great tutorial. One question and not sure if I missed it. What if you want to paste somewhere on the same line. I saw the paste before line and after line commands. But if I need to paste what I yanked at beginning of same line where cursor is, end of same line or somewhere in the middle of same line? thanks
@channyeintun64119 ай бұрын
Boom! Unlock new experience!
@SEGHIIR6 ай бұрын
you just convinced me to use Vim and it's awesome thank you.
@SamuTheFrog9 ай бұрын
I commented on a distrotube video a while back that Vim sucks, too complicated or something like that. I take that back & apologize for my ignorance 🤣🤣🤣 Im laughing at myself now. Having been pushed into it for key reasons, I've found myself to be very wrong in my vim hate. Vim is nice. Vim is really nice. I wanna dabble with neovim at some point.
@halfsourlizard93199 ай бұрын
I had a similar experience years ago ... It's slightly magical watching someone actually using Vim (in the sense of: it's unclear what they're doing, but edits are happening), but learning Vim is nothing short of life-changing.
@bigo729 ай бұрын
Hey DT! you know how much I love you. But this time I ask to myself WHY? Why I should do this to my poor brain? I read about vim from years and years and I use nano....then try to give vim a chance and then go back to nano! In my honest opinion vim is a torture, something invented to break the rules. The cursor is moved with arrow keys in each and every operative system and each and every editor, gui or cli. I don't know, it looks so unnatural to me. The problem is that a lot of software out there uses vim keys, like qutebrowser in example, but not only .... and then I go back to try to give vim a chance, get nervous again and try to forget that other software I was trying... I don't know, maybe it's me....but vim it's not my editor, it can't be.
@moussaadem79339 ай бұрын
It becomes useful once it's hardwired, the keys become second nature, most users don't need that tho, it's only worth it for people who type often, like me. I only noticed that i prefer can't go back when i tried to use a different editor and got frustrated at how slow i am
@RicardoLuna8 ай бұрын
I'm with you on this one. I think vim is quite overrated. If it works for you, fine, more power to you. But I consider myself a medium typer and there is absolutely nothing in vim that I need. It would require months of training to gain a few seconds a day, at best. I think this is more of a ritual thing rather than something actually useful. Specially because everyone says wonders about vim but nobody says a specific achievements except generic compliments (OMG now I'm so fast). Again, if it works for you, great! But please, don't come to me pretending vim is the holy grail everyone should use.
@linuxramblingproductions85545 ай бұрын
So you can’t spend some time to try something new and get stuck at hjkl like dude if you just spend a decent bit of time you get used to it. Plus nano is just kinda garbage just use micro or something else nano is overlyclunky and there are more user friendly and good editors
@noam659 ай бұрын
Coming from a former Unix system admin, never operate on your original file, always edit a copy, and when satisfied, swap it for the old one, which you will keep a copy of. That way, if something happens, you have your previous version to fall back on. In the old days, it might take hours to find a file that an individual lost to restore it, without overwriting other current files.
@vorrnth87349 ай бұрын
That's what rcs what invented for, back in the day.
@noam659 ай бұрын
@@vorrnth8734 we all had different tools, but my backups were to tape, and I eventually used tar for user files, to rescue individual files. I had 60 nodes and 100 + users, and a few other mini based systems that I helped with.
@noam659 ай бұрын
It wasn't a system that I could do as I wished with. It was set up by a vendor to do a particular function. I always found my method easier. The basic tools were available on every box I had or helped with. Lowest Common Denominator
@h2o40fpv9 ай бұрын
So good that I still learning with this videos thank you DT.😊
@NormTurtle9 ай бұрын
Please make same video basic for emacs
@autumnjeserich26898 ай бұрын
I always get gvim because it includes normal vim and gives you a gui vim which is useful if your ever working in a file manager
@vidar1009 ай бұрын
Hey DT, I just wanna say that I'd love to see you make a NeoVim series where you would teach us from basics to turning it into a Sexy IDE. I feel like YOU are the best teacher for it. Please!
@Aturnadagar9 ай бұрын
Lets go Evil mode BABY!
@Danielddiniz9 ай бұрын
After learning Vim keybindings migrate to Doom EMacs
@DarthVader119129 ай бұрын
No. Migrate to Emacs.
@stefanalecu95329 ай бұрын
Migrate to Komodo IDE, that's what all the cool kids use nowadays
@rikhardfsoss9 ай бұрын
@@DarthVader11912with evil-mode :D
@DarthVader119129 ай бұрын
@@rikhardfsoss of course
@macedonskyua9 ай бұрын
Just what I really need. Thanks!
@ahmedthebest9 ай бұрын
very nice video thank's plese more video about vim
@m4saurabh9 ай бұрын
Vim is not hard, it's different. It completely changes the way you have been editing text.
@steinbeckehue88727 ай бұрын
Thanks Very good job
@tsilb4 ай бұрын
Vim seems like its developers went out of their way to make the wrongest possible keyboard shortcuts. Home, end, ^C, ^V are *universal* standards.
@yeyintaung98374 ай бұрын
I learn vim about a year ago ,then I use vimium c in browser,tiling window manager and now I am thinking to get a split keyboard 😂
@IUseArchLinuxBTW9 ай бұрын
Why not use something easier, like nano?
@vorrnth87349 ай бұрын
Because nano is much less powerful.
@IUseArchLinuxBTW9 ай бұрын
Source?
@linuxramblingproductions85545 ай бұрын
@@IUseArchLinuxBTWits factually correct try using regex in nano try deleting and pasting lines changing a specific word with in 3 key strokes. How about using a lsp or debugger.
@homfes9 ай бұрын
"?" is not the "dollar sign"
@ericschmidt2429 ай бұрын
Love the videos, not a professional teacher, but consider making a "change" example in the text editor, by adding a comment. Students like me, like to visually see, and repeat processes.
@travisgoesthere9 ай бұрын
or you could make a video yourself or learn the way you learn by yourself
@RohitSoni-iw6eb7 ай бұрын
thanks much!! wish i could like this video more than once :)
@abdullahazmyelsherbini9 ай бұрын
make a video about nvim and it's plugins.
@moistness4829 ай бұрын
Capital G literally sounds like a rapper name
@theodorealenas31719 ай бұрын
For anyone intersted in a 5 minute tutorial, showing the fewest key bindings that can get you the farthest in zapping around, I've made one
@gizzmoguy.7 ай бұрын
You can also write and quit vim with Shift+ZZ which the easiest way to do it IMHO
@ЛеонидЛореданов9 ай бұрын
Just because of switching from x11 to wayland, the clipboard stopped working in VIM.
@MasterHigure9 ай бұрын
You probably just need a clipboard manager that is actually made for Wayland. Xclip doesn't work there.
@ЛеонидЛореданов9 ай бұрын
@@MasterHigureIt's amazing, in all other applications everything works, even kitty, but in VIM it doesn't. Who is to blame? I am running arch linux and kde plasma 6
@MasterHigure9 ай бұрын
@@ЛеонидЛореданов Copying and pasting across the Vim boundary didn't work out-of-the-box on X11 either, at least not for me. The solution was xclip. Wayland surely has its own alternatives.
@stefanalecu95329 ай бұрын
Wayland has wl-copy, if you've used xclip before
@ЛеонидЛореданов9 ай бұрын
@@stefanalecu9532I have installed wl-clipboard but clipboard doesn't work. I read an article that it is possible to install someone's VIM addon from github, but it seems to me that it should not work that way.
@Rood676 ай бұрын
Got up to the point of don’t use the arrow keys and decided I didn’t like vim in 1986, and I still won’t like it in 2024. Only commenting this to helm Derek’s KZbin algorithm.
@humbertojotas34359 ай бұрын
👏👏👏👏👏
@RonVichar9 ай бұрын
Never realized what's so hard about vim my Unix intro included VI and nano seems like a softcore solution to normie text editors.
@rms____-gl7lt6 ай бұрын
my mind can't comprehend hjkl ;)
@fsmoura9 ай бұрын
Lesson 1: _How to exit Vim and install Emacs_ End.
@distant66069 ай бұрын
Rip pinky
@travisgoesthere9 ай бұрын
They arent the same thing so that doesnt make any sense
@stefanalecu95329 ай бұрын
@@distant6606until you realize that you also have to use your pinky to reach Esc in Vim, so it's just as bad
@josephlandry87879 ай бұрын
Other people have to learn vim? I don’t remember “learning” it at all. Just been using it for 20+ years.
@fsmoura9 ай бұрын
That's what I tell people when they come to me with technical questions about Linux. "Just use it. Feel your way around until you're in tune with the system."
@stefanalecu95329 ай бұрын
Yeah, you've definitely figured out Vim motions all by yourself, you've reverse engineered it like the Rosetta Stone when you were in your womb and you never had to learn anything about Vim ever again What the hell is that argument? You self-reported on being unwilling to learn new things everyday, because you don't "stop" learning. Be real 🥱🥱🥱
@josephlandry87879 ай бұрын
@@fsmoura a friend once told me, the best way to get Linux help is to go into a Linux IRC channel, and complain that, “I can do this on windows, I don’t understand why Linux can’t do it?” Then everybody offers assistance just to prove you wrong.
@josephlandry87879 ай бұрын
@@stefanalecu9532 have you ever got the feeling that people avoid you at parties?
@FilthyPitDog9 ай бұрын
Quit & save - Hold Shift ZZ Quit without saving - Hold Shift ZQ
@valso9 ай бұрын
"It's not that hard", he says in a 30 minutes video... 🤣🤣 I have a DE, I'ma use it with a GUI text editor and GUI terminal where I don't have to learn the contents of the ancient Greek library in order to use them. Aaand in the rare cases I need to boot the "terminal mode" of Linux, I'll use nano bc all the controls are right there on the screen, thus I can focus on the important stuff, not trying to figure out which combo was for "save" or "cut".
@TragicGFuel9 ай бұрын
Keep going at it. People like you are why I get paid so much better!!
@valso9 ай бұрын
@@TragicGFuel Apparently you're tragic at thinking too. That wasn't hate towards you, it was hate towards vim and its developer. Really, how dum_b you gotta be in order to write a program but don't put its controls on the screen where everyone can see them and use the program as a normal person?
@RicardoLuna8 ай бұрын
@@TragicGFuel Such a claim! Could you share with us how vim makes you get paid better?
@421sap9 ай бұрын
In Jesus' Name Amen ✝️
@TheHelvetican9 ай бұрын
@SamuTheFrog how many times do i hit :w when typing elsewhere.... and then you got to explain to your Luddite micromanaging boss why you're doing these extra. unnecessary keystrokes. Vim is bad. Don't bother learning it. It will do nothing but waste all your time trying to figure out the most efficient way to do things. Your hourly co-workers will not like this as you will be taking their job away from them and you will make no friends.
@claudemods9 ай бұрын
I made a archlinux installation tutorial
@nejathakan55219 ай бұрын
💪
@MerkDolf9 ай бұрын
🎉 👌 😄 👍 .
@boringpolitician4 ай бұрын
sudo apt install nano or sudo pacman -S nano or sudo yum install nano Problem solved! No need to learn 300+ keybindings.
@lefrax7627 ай бұрын
People always saying Vim's the superior editor… I don't know about that, but just listening about those crazy inconsistent keystrokes makes me sick. [u] to undo and [ctrl]+[r] to redo? **Seriously?** For me it's a textbook example of sunk cost fallacy if there is one… SMH
@VE00039 ай бұрын
viyyum
@michgingras4 ай бұрын
Arrow keys should be disabled, they actually serve no purpose in vim, (yea yea they work, but things that work in life are not always a good idea... )
@PhanĐìnhLuân-f9f3 сағат бұрын
The video content is very interesting! I am a little confused: someone sent me a TRC20 USDT and I have the recovery phrase: {pride pole obtain together second when future mask review nature potato bulb} How do I extract them?
@quarteratom9 ай бұрын
32 minutes LOL.
@AhsanHabib-mj5ym9 ай бұрын
DT and I are wearing glasses at the same period of time .....🥸🥸