The Vim Tutorial - Part Two - More Commands

Поделиться
HTML-код
  • Опубликовано: 27 дек 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.

  • @baggiowong1332
    @baggiowong1332 4 года назад +1

    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. 😊

  • @SteemeX
    @SteemeX 4 года назад +2

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

  • @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

  • @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.

  • @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.

  • @stephensmith346
    @stephensmith346 5 лет назад +1

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

  • @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.

  • @mitchelvalentino1569
    @mitchelvalentino1569 5 лет назад +24

    Long live Vim!

  • @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.

  • @michalroesler
    @michalroesler 3 года назад

    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.

  • @andrewpalm2103
    @andrewpalm2103 5 лет назад +2

    Derek, another very useful tutorial. Thanks!

  • @Jonathan-dm3pt
    @Jonathan-dm3pt 5 лет назад +3

    Very good tutorial DT, appreciate the content.

  • @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

  • @fetB
    @fetB 2 года назад

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

  • @nikhilthota9431
    @nikhilthota9431 4 года назад

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

  • @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.

  • @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!

  • @Сова32
    @Сова32 4 года назад +1

    thanks for the Shift+a tip, it helped me

  • @guilherme5094
    @guilherme5094 5 лет назад +1

    Very good Derek.

  • @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 : )

  • @stephenjames5745
    @stephenjames5745 5 лет назад +2

    Another awesome video! Thank you!

  • @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.

  • @SteemeX
    @SteemeX 4 года назад +1

    Very progmatic stuff! Thanks a lot!!!

  • @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.

  • @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.

  • @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.

  • @saurabhmahra4084
    @saurabhmahra4084 3 года назад

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

  • @fuseteam
    @fuseteam 5 лет назад +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

  • @Subbeh2
    @Subbeh2 4 года назад

    How do I get vim to look like this?

  • @thengakola6217
    @thengakola6217 4 года назад

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

  • @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!

  • @lancetschirhart7676
    @lancetschirhart7676 5 лет назад

    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.

  • @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.

  • @chrystanthemum
    @chrystanthemum 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.

  • @Douglas-hw8is
    @Douglas-hw8is 4 года назад

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

  • @Froggie92
    @Froggie92 5 лет назад +1

    👏 more 👏 of 👏 these

  • @abhinandanj8182
    @abhinandanj8182 5 лет назад +1

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

  • @fuseteam
    @fuseteam 5 лет назад

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

  • @jackfrosterton2530
    @jackfrosterton2530 5 лет назад

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

  • @leredempteur3011
    @leredempteur3011 5 лет назад +1

    Very nice 👍 😺😸

  • @terrythompson7535
    @terrythompson7535 4 года назад

    Thank you sir!

  • @avinashprajapati255
    @avinashprajapati255 2 года назад

    starts at 1:45

  • @klaskycsupo121
    @klaskycsupo121 5 лет назад

    Excellent!

  • @jamescobb2618
    @jamescobb2618 5 лет назад

    Thank-You Sir (Flying..)

  • @eddyecko94
    @eddyecko94 4 года назад

    Thanks.

  • @cosm.i.n
    @cosm.i.n 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 4 года назад

    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 3 года назад

      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

  • @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.

  • @fuseteam
    @fuseteam 5 лет назад

    :Ex >> :!ls :p

  • @ummareli2791
    @ummareli2791 2 года назад

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

  • @vagabund6778
    @vagabund6778 5 лет назад +1

    Dude turn around, your laptop is melting

  • @LinuxLuddite
    @LinuxLuddite 5 лет назад +1

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