The Vim Tutorial - Part Two - More Commands

Поділитися
Вставка
  • Опубліковано 29 сер 2024

КОМЕНТАРІ • 111

  • @videodude5337
    @videodude5337 4 роки тому +78

    Vim is so great and addicting, that people can’t quit

  • @gregf9160
    @gregf9160 5 років тому +6

    Thanks for all this, Derek. I've been a vim user for a number of years but this was full of a LOT of stuff I'd forgotten! First rate.

  • @mitchelvalentino1569
    @mitchelvalentino1569 5 років тому +24

    Long live Vim!

  • @SteemeX
    @SteemeX 4 роки тому +2

    Such clear speech and well-made material. So easy to understand and memorise despite english is not my native

  • @thebasketofgoods9753
    @thebasketofgoods9753 Рік тому

    One thing I found out with vim is, in the event you want to create a text-containing file with zero new-lines, is to create the file by writing "vim -b [file]" in terminal. Combining this with saving the file using ":set noendofline" then ":wq", it will save the text doc with no newlines whatsoever.
    Discovered this when trying to figure out why my encrypted password wasn't working, and found out it was because the newline was causing errors.

  • @stephensmith346
    @stephensmith346 5 років тому +1

    Running bash commands from within vim is something I did not know about...thank you DT!

  • @fatcatsound
    @fatcatsound 5 років тому +3

    Very good job on the video. Appreciate the tutorial. On a sidenote, concerning the microphone deployment, I would offer a suggestion to try that would improve the sound and clear the sightlines. If you raise the Baby Bottle to where the capsule is approximately at your eyebrows and angle down to point at the area in front of your mic, you can lose the pop filter, which does alter the sound, and the sound is more natural requiring less EQ in post. This is not to say that it doesn't sound good, already. Just something I tried based on older recording techniques that I was sold on the first time I tried it.

  • @juandonosa374
    @juandonosa374 5 років тому +19

    one little note, 'Shift+i' places you into Insert mode at the beginning of that line, I feel like the way you explained it might have been a bit confusing
    also as for the substitute command '%s/Dererk/DT/g' you don't need the 'g' at the end, what the g does is change every occurence of Derek in that line to DT, so say for example you had a line that read:
    Derek Taylor Derek
    and you used '%s/Derek/DT/g' it would change to:
    DT Taylor DT
    but if you just used '%s/Derek/DT/' it would change to:
    DT Taylor Derek
    otherwise a very informative video for my favorite editor

  • @cheesecurd9003
    @cheesecurd9003 5 років тому +5

    Thanks for the video Derek, very informative as always! I'm curious to know if you've ever had the chance to fiddle around with the Plan 9 environment - more specifically the acme editor. It uses a very different paradigm from vim & emacs which are very keyboard-centric, and puts a lot more power into the mouse. It was quite the adjustment, but I've grown to really enjoy the way its command system works and how it easily integrates with the rest of the system. Looking forward to hearing your thoughts! Cheers!

    • @DistroTube
      @DistroTube  5 років тому +3

      Haven't played with Plan 9.

  • @NekoiNemo
    @NekoiNemo 3 роки тому +1

    16:00 If anyone is also wondering why question mark search is a thing: logs. The way you generally diagnose logs is to go to the very end and then try to find the last occurrence of whatever you're looking for, and then go backwards from that

  • @baggiowong1332
    @baggiowong1332 4 роки тому

    The two tutorials are so well paced, and the presentation so lucid it made it really easy to follow along and kept me hooked to learn more - no fluff, just direct tips and instructions - one of my favourite styles of presentation! Thank you so much Derek, really appreciate the effort gone into preparing and filming the tutorials. 😊

  • @andrewpalm2103
    @andrewpalm2103 5 років тому +2

    Derek, another very useful tutorial. Thanks!

  • @darthvalar4377
    @darthvalar4377 5 років тому +1

    Very nice tutorial! I'm new to vim and although I went through the vimtutor twice, I still learned a few new tricks now. Subscribed.

  • @Jonathan-dm3pt
    @Jonathan-dm3pt 5 років тому +3

    Very good tutorial DT, appreciate the content.

  • @stephenjames5745
    @stephenjames5745 5 років тому +2

    Another awesome video! Thank you!

  • @user-ob9eg5cl8i
    @user-ob9eg5cl8i 4 роки тому +1

    thanks for the Shift+a tip, it helped me

  • @SteemeX
    @SteemeX 4 роки тому +1

    Very progmatic stuff! Thanks a lot!!!

  • @lotunkanji7838
    @lotunkanji7838 5 років тому +4

    "dubya"
    lol thanks a lot though. really helped me out

  • @cthedosboss5113
    @cthedosboss5113 5 років тому +2

    thanks DT pretty cool stuff here some i didnt know about : )

  • @guilherme5094
    @guilherme5094 5 років тому +1

    Very good Derek.

  • @MaciejKurzyca
    @MaciejKurzyca 5 років тому +3

    Great tutorials.
    Thank you very much.
    I'm beginning to understand VIM's workflow
    Please, do more VIM tutorials. For example, copying and pasting between VIM and other programs, I found it quite difficult

    • @freydun
      @freydun 5 років тому

      Install gvim to access system clipboard.

  • @oj0024
    @oj0024 5 років тому +12

    Vim best editor :)
    nothing about emacs here

    • @dustinmorse8497
      @dustinmorse8497 5 років тому +2

      Emacs is an interesting operating system, it just needs a good text editor.

  • @migue7490
    @migue7490 5 років тому +2

    I switched to vim after switching to i3, it is a very good editor, it takes time to configure but is powerful. Now my highlight when I search and informative text in normal mode dissappeared and is kinda annoying but it is probably my vimrc.
    Awesome tutorial I was waiting for it!

  • @fuseteam
    @fuseteam 4 роки тому +31

    btw vim never deletes it only cuts :p

    • @arinroday302
      @arinroday302 4 роки тому

      use x to delete

    • @fuseteam
      @fuseteam 4 роки тому +3

      @@arinroday302 that also cuts fwiw
      try it use x on a character then do p to paste it ;)

    • @fuseteam
      @fuseteam 4 роки тому +2

      @@Bob-ys2fb is it? i find it awesome, especially since you have many clipboard at your disposal :^3

  • @terrythompson7535
    @terrythompson7535 3 роки тому

    Thank you sir!

  • @nikhilthota9431
    @nikhilthota9431 3 роки тому

    Great video - quick question, what software are you using to record your keystrokes?

  • @avinashprajapati255
    @avinashprajapati255 2 роки тому

    starts at 1:45

  • @klaskycsupo121
    @klaskycsupo121 5 років тому

    Excellent!

  • @Froggie92
    @Froggie92 5 років тому +1

    👏 more 👏 of 👏 these

  • @michalroesler
    @michalroesler 2 роки тому

    Can You please tell what edit should be made in .vimrc to remap CapsLock to Esc key?
    Everybody talks about doing it, but no one showed exactly how to do this.

  • @leredempteur3011
    @leredempteur3011 5 років тому +1

    Very nice 👍 😺😸

  • @lancetschirhart7676
    @lancetschirhart7676 4 роки тому

    I like using both / and ? *shrug*
    I know whether I want to go up or down when I need to press / or ?
    So I do the right one, that way I can always use n to navigate. Guess it's just taste.

  • @saurabhmahra4084
    @saurabhmahra4084 3 роки тому

    Vim is so addicting that even youtube has shortcuts in vim mode xD.

  • @gavinvales8928
    @gavinvales8928 5 років тому +2

    has your camera resolution always been that good?

    • @DistroTube
      @DistroTube  5 років тому

      I didn't do anything different as far as my camera. The lighting was a little low in this video, compared to the previous vim video. Other than that, the same.

  • @52naturalhairstyles
    @52naturalhairstyles 5 років тому +4

    Currently using Visual Studio Code...is there more of a benefit with VIM?

    • @DistroTube
      @DistroTube  5 років тому +2

      >not sure if it brings up code prediction
      If vim doesn't have it by default, most things can be added through plugins. Here is a neat code completion plugin: github.com/Valloric/YouCompleteMe

    • @RobBoudreau
      @RobBoudreau 5 років тому +4

      The benefits of Vim over Code is speed. When you learn how to move around in Vim, moving around and editing text in files happens almost as quick as thought. However, Vim is a text editor, not an IDE. If you've never used it before, and need the tools of an IDE like VSCode, you'll quickly become frustrated with it.
      While it is possible to duplicate and IDE-like environment with Vim, and many developers do, it takes time, a lot of trial and error with plug-ins and configuration. If you're interested in Vim, I highly recommend trying it, but stick with VSCode for your day-to-day tasks while you learn. In time you'll know whether you want to go further with Vim or not.

    • @52naturalhairstyles
      @52naturalhairstyles 5 років тому +2

      Thanks so much for this. Kind of sounds like I need to graduate to Vim similar to the way that I went from CodePen to VS Code. Appreciate the feedback!

    • @52naturalhairstyles
      @52naturalhairstyles 5 років тому +1

      Thank you!!! Checking it out now.

    • @52naturalhairstyles
      @52naturalhairstyles 5 років тому +1

      @James Willams. I used Atom as well in a class for a gaming project and loved it.

  • @santiagomiranda7310
    @santiagomiranda7310 2 роки тому

    *Great tutorial!*
    Just a comment: Wouldn't *w* recognize *, . ) ( ] [* and others as words, issuing *dw* would not delete a word.
    Having written *function name(...)* deleting just the *name* using *dw* would be impossible. As it would delete the symbol too. At the same time typing *dw* in this array *[adfb,adfbsd,dfgdf]* would remove the whole thing afaik (try *dW* to check it out).
    Ideally it should delete a-zA-Z and navigate using a-zA-Z + symbols. But *w* is the same command.
    There is a compromise between *word* movements and *delete* ops and we have to choose sides.

  • @fetB
    @fetB 2 роки тому

    Is there a way to dock a cheat sheet or overlay?

  • @eddyecko94
    @eddyecko94 4 роки тому

    Thanks.

  • @juanadriancastroquintana8939
    @juanadriancastroquintana8939 5 років тому +2

    > Learn to use vim
    > Use emacs evil-mode

    • @crwmike0
      @crwmike0 5 років тому +1

      The only thing about emacs is waiting six weeks for it to load.

    • @juanadriancastroquintana8939
      @juanadriancastroquintana8939 5 років тому

      @@crwmike0 If you open it normally, yes, it takes like a year to load, but with emacsclient it loads at the startup, and every instance opens immediately.

  • @jackfrosterton2530
    @jackfrosterton2530 4 роки тому

    sounds like things would be better if some of these capital/lowercase mappings were swapped.

  • @fuseteam
    @fuseteam 4 роки тому

    dang did not know of ctrl d, crt o and ctrl i

  • @abhinandanj8182
    @abhinandanj8182 5 років тому +1

    where's your accent from ? love it...

  • @swaroopsonline
    @swaroopsonline 4 роки тому

    Can you please enlighten us, as to how we can copy from a text file and paste it in vim editor?

    • @timmymorris91
      @timmymorris91 4 роки тому

      swaroopsonline copy using Ctrl + C or Ctrl + Shift + C. Paste into Vim with Ctrl + Shift + V.

  • @betafaccion2289
    @betafaccion2289 5 років тому

    Wow, perfect timing, just started trying evil yesterday on emacs
    Any contraindication on learning vim commands on emacs-evil? Should I take a few weeks on raw vim or it's ok to learn on evil?

    • @DistroTube
      @DistroTube  5 років тому +2

      I know nothing about emacs. Sorry.

    • @betafaccion2289
      @betafaccion2289 5 років тому

      I really love emacs but been planing to use evil/vim keybindings for a long time, the composability of VIM commands are way superior than the 'C-x M-c M-butterfly' mess that emacs have
      Thanks for the video btw!

    • @RobBoudreau
      @RobBoudreau 5 років тому +1

      Evil is -- of all the Vim-like keybinding plugins other apps have -- the closest to Vim itself. There are some Vim commands that Evil doesn't have, but not many. What you learn with Evil-mode will directly translate to Vim. All the motions, text-targeting and manipulating are the same.

    • @betafaccion2289
      @betafaccion2289 5 років тому +1

      ​@@RobBoudreau Yeah, I heard that, I am planing on doing a natural transition from normal to evil bindings but am a bit afraid of possible bad habits it could create.
      I found a lot of good info from vim users talking about the transition to evil but none from normal emacsers going to evil

    • @RobBoudreau
      @RobBoudreau 5 років тому +1

      @@betafaccion2289 I'd imagine the hardest thing will be trying not to press CTRL or ALT all the time to move around and edit.
      Kinda like when I started trying Emacs. I was constantly finding myself typing " : " and commands into my text. I had to go to Evil-mode to save my sanity, little as it is.

  • @fixilein1
    @fixilein1 5 років тому +2

    Can you do a video on Vim Plugins?

    • @DistroTube
      @DistroTube  5 років тому +3

      Will probably do that in a future video.

    • @fixilein1
      @fixilein1 5 років тому

      @@DistroTube Awesome! Thanks!

  • @thengakola6217
    @thengakola6217 3 роки тому

    does anyone here know how to remap esc to caps lock?? can i do it inside vimrc? like inoremap stuff??

  • @jamescobb2618
    @jamescobb2618 5 років тому

    Thank-You Sir (Flying..)

  • @Subbeh2
    @Subbeh2 4 роки тому

    How do I get vim to look like this?

  • @Douglas-hw8is
    @Douglas-hw8is 3 роки тому

    why don't you tell us HOW you opened the file?

  • @mr-rosh
    @mr-rosh 5 років тому +1

    Hey DT!

  • @vmisev
    @vmisev 5 років тому +5

    Politics according to Vim:
    Far-left ␛0
    Far-right ␛$
    Far-center :command Farce exe 'normal 50%' | exe 'normal '.(virtcol('$')/2).'|'
    /s :D

  • @fahdv2597
    @fahdv2597 3 роки тому

    you move words with double yuh

  • @jandrorojas6714
    @jandrorojas6714 4 роки тому

    you know how we moved from the stone age to the bronze age? or when we all finally understood that slavery was wrong? gee why do we still have to use this thing? Here we are, taking a course to use a freaking text editor 🤯

    • @someonehere4380
      @someonehere4380 2 роки тому

      because you are way faster with vim! stay in your text editor using a mouse

  • @hottake3633
    @hottake3633 5 років тому

    am i the only one who thinks j and k in VIM should be swapped? meh, i guess i'm just an eastbound and down fan

  • @horatiopugwash9183
    @horatiopugwash9183 5 років тому +2

    I installed Wine so I can use notepad 😏

  • @TheDrunkenAlcoholic
    @TheDrunkenAlcoholic 5 років тому +1

    donate to children in Uganda?? wtf how about donate to children of your own country who are poverty stricken ... great tutorial mate keep it up

  • @fuseteam
    @fuseteam 4 роки тому

    :Ex >> :!ls :p

  • @ummareli2791
    @ummareli2791 2 роки тому

    >uses vim
    >looks at the keyboard for every shortcut
    cringe

  • @LinuxLuddite
    @LinuxLuddite 5 років тому +1

    Now we have to watch tutorials for text editor..smh

  • @hewfrebie2597
    @hewfrebie2597 5 років тому +2

    never :q!

    • @DistroTube
      @DistroTube  5 років тому

      I wouldn't say never use it. But users should be aware that it will quit without giving you a warning if you have unsaved changes.

    • @hewfrebie2597
      @hewfrebie2597 5 років тому +3

      @@DistroTube No I just found a website that sells stickers about programmers and tech enthusiasts telling jokes in a nerdy way. Just like you did about GNU/Dentist .
      So in my case I said never :q! (normal perspective: never quit!) as in never giving up in a nerdy but funny way. So I though that I should add something funny about vim.

    • @DistroTube
      @DistroTube  5 років тому +1

      Ah! A vim joke! Nice. :D

    • @DistroTube
      @DistroTube  5 років тому +2

      I think I need to make me a cup of coffee. Can't believe I didn't catch your joke. smh

    • @hewfrebie2597
      @hewfrebie2597 5 років тому +1

      @@DistroTube That's right, so never :q! making nerdy jokes and videos about gnu/linux and keep up the good work.

  • @vagabund6778
    @vagabund6778 5 років тому +1

    Dude turn around, your laptop is melting