Vim Training Class 1 - Basic motions and commands

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 152

  • @superspectator123
    @superspectator123 8 ปีที่แล้ว +70

    This is the best introduction video on Vim that I have seen on TH-cam. Thank you.

  • @djwave28
    @djwave28 5 ปีที่แล้ว +1

    The first VIM tutorial I feel enriched and not overwhelmed. Copies you commands in my own cheat sheet. The best cheat sheet to get started.

  • @RussellTeapot
    @RussellTeapot 8 ปีที่แล้ว +41

    one of the best vim tutorials I've ever saw

  • @habituallearner7680
    @habituallearner7680 3 ปีที่แล้ว +2

    This is incredibly helpful and it's laid out in a logical manner. I've been away from Linux and vim for four years and this is perfect for my needs. Further, I believe that your teaching method would enable someone new to vim to grok the editor's methodology. You give enough of the why to help us understand the how.

  • @ChristopherBreeden85
    @ChristopherBreeden85 9 ปีที่แล้ว +20

    After this guy shows off block selection at around 39:30, you can here this guy in the background day "What!? Are you serious?"... I had the same reaction.

  • @caigner
    @caigner 7 ปีที่แล้ว +6

    One word: Brilliant!
    Thanks for this great introduction to vim.
    Greetings from Austria/Europe

  • @o0v0ox
    @o0v0ox 11 ปีที่แล้ว +1

    The way you speak and how your document is structured is very instructive. Thank you very much. Maybe it would be helpful if you could add the questions of your students as comment as they are very hard to understand.

  • @osmanjant
    @osmanjant 9 ปีที่แล้ว +20

    the best vim tutorial.

  • @kbabioch
    @kbabioch 6 ปีที่แล้ว +1

    Definetely one of the best VIM intros I've seen. Very much appreciated, thank you!

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว +1

    Absolutely, I usually do repeat questions when I'm talking at a podium but this one was sitting down next to everyone so it never occurred. As far as editing it was just a raw class, if I were to do just me and a mic for an hour I would probably edit.

  • @test89267
    @test89267 6 ปีที่แล้ว

    five years passed. but still awesome and actual. thumbsup.

  • @outtabubblegum7034
    @outtabubblegum7034 3 ปีที่แล้ว +1

    This deserves a remake (update)

  • @travisandmissydog
    @travisandmissydog 6 ปีที่แล้ว +1

    Thank you for posting this! Very helpful for a first time Vim user!

  • @skyline2022
    @skyline2022 2 ปีที่แล้ว

    Explained precisely in an elegant way

  • @devinm9245
    @devinm9245 9 ปีที่แล้ว

    Very eloquent and enjoyable to follow probably the best demonstration to this monster with such a high learning curve, many much thanks.
    -D
    Post Script: I learned through much frustration that altering my keybindings for Esc. to Lft. Ctrl. / Lft. Ctrl to Caps Lock / and Caps Lock to Esc.
    Considering manufacturing and selling such keyboard setups.

  • @kim15742
    @kim15742 7 ปีที่แล้ว

    I'm fine with Sublime Text, which does most of these things a little more user-friendlyly, but I appreciate the tutorial. Great teacher!

    • @TomKatom
      @TomKatom 5 ปีที่แล้ว

      yes i agree everything showcased *here* can be done with sublime text with ease, but the possibilities are endless with vim.

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว +7

    *nod* Big biff on my part not repeating their questions, it's a small classroom so it didn't occur to me to do so while recording this. Definitely something to keep in mind for future videos.

  • @holalluis
    @holalluis 10 ปีที่แล้ว +1

    I use Vim and I enjoy every minute of using it. After I got used to the hjkl movement, I began flying when coding

  • @guinsly2mondesir
    @guinsly2mondesir 10 ปีที่แล้ว +3

    That's way the Best Tuto online. So efficient. Merci!

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว +2

    Home row should have your right hand on jkl; so having your right index hitting h and j shouldn't be that awkward. That said, hjkl are fairly specialized motions. That is, when moving around unless you really only need to go one character or one line there is almost always a better motion.

  • @GrizzLeeTroll13
    @GrizzLeeTroll13 8 ปีที่แล้ว +2

    absolutely fantastic video. I liked how you had fun with the presentation. You're quite the painter.

  • @perlpetual
    @perlpetual 11 ปีที่แล้ว +1

    Thank you very much for this video. I was planning to move to a good editor. Your video makes a lot of things very clear. Thank you once again.

  • @TheCuteworm
    @TheCuteworm ปีที่แล้ว +1

    still helpful and useful to me today

  • @MasterSergius
    @MasterSergius 5 ปีที่แล้ว +5

    Wow, almost 1 hour! Just tell me if you show how to exit Vim in the end?

  • @dylanchase12345
    @dylanchase12345 5 ปีที่แล้ว

    Bravo! This is a great introduction to Vim and really gets me excited to learn more. Thank you very much!

  • @bagoquarks
    @bagoquarks 4 ปีที่แล้ว

    11:02 "... the mouse is your enemy, your mortal enemy ..." => most important take away

  • @JeanPaulSauve
    @JeanPaulSauve 9 ปีที่แล้ว +18

    Great tutorial! Unfortunately, "gg v G" does not select everything if there is no blank line at the end of the file. The "G" moves the cursor to the first character of the last line, not to the very end. What worked for me is "gg V G", which operates on whole lines, even if the cursor is in the middle of the line when you enter visual mode.

    • @allenhuai6153
      @allenhuai6153 8 ปีที่แล้ว

      +$ is ok

    • @drghartnangamn
      @drghartnangamn 7 ปีที่แล้ว +2

      thanks

    • @savaion53
      @savaion53 7 ปีที่แล้ว +1

      Right!
      Thanks!
      :-)

    • @franklinbradfield9131
      @franklinbradfield9131 7 ปีที่แล้ว +1

      Sure, but maintaining a blank line at the end of the file is standard best practice for editing / coding in any language anyway.

  • @igorthelight
    @igorthelight 6 ปีที่แล้ว +3

    38:54
    Windows: a
    Vim: ggvg
    It's actualy SLOWER.
    Other functions are faster than "usual".

    • @igorthelight
      @igorthelight 6 ปีที่แล้ว +1

      So a few comparasions:
      Windows: LeftArrow, DownArrow, RightArrow, UpArrow
      Vim: h, j, k, l
      Windows: RightArrow, LeftArrow
      Vim: w, b
      Windows: ???
      Vim: w, b
      Windows: Home, End
      Vim: 0, 4
      Windows: Home, End
      Vim: gg, g
      Windows: a
      Vim: ggvg
      Windows: RightArrowc, LeftArrowc
      Vim: y, by
      Windows: v
      Vim: p
      Alot more comparations here:
      cognitivewaves.wordpress.com/vi-editor/

    • @quanhongtie9577
      @quanhongtie9577 5 ปีที่แล้ว

      I can press a piano key doesn't mean i could be Chopin.

  • @_yiggy
    @_yiggy 7 ปีที่แล้ว

    If you can't wrap your head around h, j, k and l for movement, you can use arrow keys in a same way (all the same commands work as well)

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว

    > Some plugins reasonably require the arrow keys in insert mode
    They shouldn't. If they do they're doing it wrong. The wildmenu used for completion can be navigated with ctrl-n, ctrl-p.

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว

    Yup. Though the very bottom line has since been updated to be even prettier. The vim prettiness is vim-powerline, I also use tmux-powerline

  • @PontiacCZ
    @PontiacCZ 7 ปีที่แล้ว +1

    Have just learned the unbounded search with g* and g#, thank you! :-)

  • @RaspberryPy
    @RaspberryPy 10 ปีที่แล้ว

    Excellent video. I use Vim but don't know it very well. I learned a lot from this.

  • @duruiz
    @duruiz 9 ปีที่แล้ว

    I think "a" and "A" are very similar too, "a" append from the cursor position and I think in "A" like a big append that goes to the end of line.

  • @djwave28
    @djwave28 5 ปีที่แล้ว

    Thanks for this. I think the most important starting command is "u" ;-) ... Love the course!

  • @ShawnBiddle
    @ShawnBiddle  12 ปีที่แล้ว +3

    You can see the plugins I'm using by looking in the .vim/bundle/ folder in that dotfiles repo linked in the comments

  • @SHOTbyGUN
    @SHOTbyGUN 9 ปีที่แล้ว

    So I'v been using notepad++ nano and netbeans many years, but when I look at this video it just makes me clap my hands like a 1 year old.... I have to learn vim! \o/

  • @OliNorwell
    @OliNorwell 5 ปีที่แล้ว +1

    This is very good, though some of the comparisons to the same action in Notepad++ etc are missing the faster way of doing things.
    "Take your mouse and click and drag until the end of the line..."
    errm... no
    SHIFT+END done almost instantly

    • @nonono4160
      @nonono4160 2 ปีที่แล้ว

      Unless the line is too long and is wrapped by editor, then the behavior is everybody's guess. Usually END takes to end of the wrap instead of actual end of the line, vscode does that for example.

  • @aryeahzenter4378
    @aryeahzenter4378 5 ปีที่แล้ว

    Best tutorial around. Thank you!

  • @syfenx
    @syfenx 8 ปีที่แล้ว

    The column part was the best.

  • @Esparzamx
    @Esparzamx 6 ปีที่แล้ว +1

    MIND BLOWN!!!!!!!!!!!!!!

  • @someuser4166
    @someuser4166 4 หลายเดือนก่อน

    Good tutorial, the editing mode thing reminds me of blenders workflow. But 12:06 is not true, you could just press ctrl L or go to the line, press HOME , hold shift and press END then DELETE. But ctrl L would be the fastest.

  • @teliph3U
    @teliph3U 11 ปีที่แล้ว

    I really like the style of your shell environment (and of course the tutorial). Can I find everything in that git repository? (Including that fancy bar on the bottom in vim?)

  • @Fahad-dh7wg
    @Fahad-dh7wg 8 ปีที่แล้ว

    For no highlighting, or cancelling the highlighting, I typically find "/" followed by some completely random string like asdasdsdad.. it's dirty but fast!

  • @rootytuners
    @rootytuners 4 ปีที่แล้ว +1

    How do you show the carriage return symbol at the end of lines (as seen in this screencast)?

    • @rootytuners
      @rootytuners 4 ปีที่แล้ว

      Settings for you .vimrc file:
      " Shortcut to rapidly toggle `set list`
      nmap l :set list!
      " Use the same symbols as TextMate for tabstops and EOLs
      set listchars=tab:▸\ ,eol:¬
      The first setting allows you to show/unshow with "\l"
      The second is the mapping of alternate characters to the tab and eol
      Information found at:
      vimcasts.org/episodes/show-invisibles/

  • @josephclark861
    @josephclark861 9 ปีที่แล้ว +33

    If this is the second Vim training class (0:00-0:07), where's the first?

    • @pato2516
      @pato2516 7 ปีที่แล้ว +28

      In his github repo he explains that the first class was just about installing vim and because of that was not recorded

  • @Nour_Ayasrah
    @Nour_Ayasrah 8 ปีที่แล้ว

    This is great, thank very much for sharing.

  • @aussiephantom4507
    @aussiephantom4507 8 ปีที่แล้ว +2

    Great video Shawn, curious if the ~/.vimrc file for the above setup can be shared?
    Thanks.

    • @baki-dev
      @baki-dev 5 ปีที่แล้ว

      github.com/shawncplus/dotfiles/blob/master/.vimrc
      How about this?

  • @flow2k790
    @flow2k790 5 ปีที่แล้ว

    Great video. What environment is being used here? For example, I don't see the bottom bar that tells me the mode, encoding, line number, etc.

    • @thisissayantan_
      @thisissayantan_ 5 ปีที่แล้ว

      It is a plugin called vim-airline. It is a light-weight and highly customizable powerline for vim.

  • @carltaylor43
    @carltaylor43 11 ปีที่แล้ว

    Good stuff man... Ive been wanting to get into VIM for a while... it looks like 'The Matrix' :)

  • @anteconfig5391
    @anteconfig5391 5 ปีที่แล้ว

    Damn bro. You have some pretty, fucking, goddamn good-looking skills there dogg! Thanks.

  • @ShawnBiddle
    @ShawnBiddle  11 ปีที่แล้ว

    Class 1 was "How to install vim" which is wholly uninteresting and wasn't worth posting. Class 3 was lost to a corruption issue with the screen recording software. The class notes, as noted on Video 4 are in the vim-classes repo linked in the description

  • @gactve2110
    @gactve2110 7 ปีที่แล้ว

    Bigup!
    great class!
    Thank you for sharing!

  • @celestialbeing4767
    @celestialbeing4767 4 ปีที่แล้ว

    Great tutorial, and update would be cool

  • @ReneHoffmann194
    @ReneHoffmann194 7 ปีที่แล้ว

    Thanks for 24:41 realy a game changer!

  • @vladtarniceru394
    @vladtarniceru394 7 ปีที่แล้ว

    Hi, what is the colorscheme you're using in the video? I've seen more in your dotfiles.

  • @TheShneek
    @TheShneek 10 ปีที่แล้ว

    ya this was pretty much amazing.

  • @maxioscode
    @maxioscode 7 ปีที่แล้ว +3

    very annoying to press Esc whenever one want to go back to normal mode. instead, I see some Vimmers run the command
    :imap jj
    so that going back to the normal mode is under the tip of your index finger.

    • @kevinlong4657
      @kevinlong4657 6 ปีที่แล้ว

      good suggestion

    • @tah3460
      @tah3460 5 ปีที่แล้ว

      You can also use Ctrl + C or Ctrl + {

  • @TheJohnny966
    @TheJohnny966 7 ปีที่แล้ว

    Pretty decent tutorial, thanks

  • @user-vq1pe8vr8t
    @user-vq1pe8vr8t 8 ปีที่แล้ว

    Thank you for your sharing

  • @mabroorahmad2182
    @mabroorahmad2182 3 ปีที่แล้ว

    That's amazing ❤

  • @clyt9636
    @clyt9636 7 ปีที่แล้ว

    if you set relative numbering on vim
    then 10j comes more easily on the keyboard

  • @mandolearner
    @mandolearner 11 ปีที่แล้ว

    This is awesome !! Thank you very much.

  • @whitestork3896
    @whitestork3896 7 ปีที่แล้ว

    I disagree with the statement that there isn't much resemblance between shift and bon shift commands (beginning of the video). They are the same actions, the only difference is non-shift are on characters and shift are on lines.

  • @dasten123
    @dasten123 10 ปีที่แล้ว

    wonderful tutorial

  • @jeffreysbrother
    @jeffreysbrother 9 ปีที่แล้ว +1

    I see that your Terminal has some variety of syntax highlighting. How did you achieve this?

    • @user-zi4zh7nb2i
      @user-zi4zh7nb2i 9 ปีที่แล้ว

      what do you mean? you can set syntax in the ~/.vimrc

  • @MrLinuxFreak
    @MrLinuxFreak 5 ปีที่แล้ว

    does vim usefull as php ide? I consider moving to vim from phpstorm, would like to have any suggestions

  • @ikdukov
    @ikdukov 8 ปีที่แล้ว

    Great tutorial

  • @esquireeventrade4838
    @esquireeventrade4838 7 ปีที่แล้ว

    Gave this a thumbs up after like 4 mins. good shit.

  • @as1ckmatt
    @as1ckmatt 6 ปีที่แล้ว

    so sick thanks

  • @flywithoutwingss
    @flywithoutwingss 2 ปีที่แล้ว

    Great content

  • @user-zi4zh7nb2i
    @user-zi4zh7nb2i 9 ปีที่แล้ว

    thanks for your share

  • @vapon
    @vapon 9 ปีที่แล้ว +2

    Which vim are you actually using? That kind of "INSERT", etc at the bottom-left, hadn't seen before. I mean the kind of graphics.

    • @ShawnBiddle
      @ShawnBiddle  9 ปีที่แล้ว +4

      vapon1 github.com/powerline/powerline

    • @vapon
      @vapon 9 ปีที่แล้ว

      *****
      Great! Thank you. Very nice trainings too!

  • @_yuuzo
    @_yuuzo 9 ปีที่แล้ว +1

    Hey man thanks for this. I just installed your dotfiles and now "dd" takes a long time to delete a line. As opposed to d$ or diw it's instant. Also deleting many lines or a selected block takes time. Is this normal?

    • @_yuuzo
      @_yuuzo 9 ปีที่แล้ว

      +Lourayad nevermind it was because of the mappings in ~/vim/startup/mappings.vim. I removed some of them and now it's fast again.

    • @ChrisCox-wv7oo
      @ChrisCox-wv7oo ปีที่แล้ว

      This happens if you have another key map that is one character longer than what you are typing.
      If you have ddw mapped, then vim doesn't know if your are done when you type dd. You could be typing ddw, so it waits
      Whatever you deleted was probably prepended with dd.

  • @krajsnick
    @krajsnick 11 ปีที่แล้ว

    Can I ask you how your vim is setup? How do you get the statusbar look so good?

  • @billkillernic
    @billkillernic 8 ปีที่แล้ว

    Once I am in insert mode nothing works no S (shitft L shift right ctrl caps lock what so ever it just prints a capital or a lowercase "s") same goes for all the other letters except lower case "o" which +ctrl pastes or does something like that..
    I use Gvim in ubuntu (same problems by starting vim in console)

    • @FLYkargo
      @FLYkargo 8 ปีที่แล้ว +3

      You need to be in normal mode. Which you get to by pressing ESC or CTRL-[

  • @refaiabdeen5943
    @refaiabdeen5943 7 ปีที่แล้ว

    Awesome Mate

  • @ronbronb
    @ronbronb 10 ปีที่แล้ว

    Excellent

  • @cevxj
    @cevxj 7 ปีที่แล้ว +5

    It would be better to teach F and T as find and till. Find h, till h, are much easier to understand and don't require the "inclusion" or "exclusion" explanations. And :nohl can be :noh, but that was offtopic and nitpicky.

    • @plxiznogoud3328
      @plxiznogoud3328 6 ปีที่แล้ว

      I remember F and T that way too but I think it's one of those things that if you're taught one way and it doesn't work for you then you just figure out something that works.

  • @RagHelen
    @RagHelen 10 ปีที่แล้ว

    The editor for people in a different mode.

  • @joselima9398
    @joselima9398 7 ปีที่แล้ว

    thank you!

  • @allenhuai6153
    @allenhuai6153 8 ปีที่แล้ว

    老师讲的很棒,赞一个!

  • @Maxt3r1
    @Maxt3r1 11 ปีที่แล้ว

    SUPER VIDEO !!

  • @drghartnangamn
    @drghartnangamn 7 ปีที่แล้ว

    Amazing!

  • @radsimu
    @radsimu 8 ปีที่แล้ว

    this is crazy. in np++ you delete a line with ctrl+l. and there are lots of shortcuts, and you don't need to use the mouse...

  • @hk0i
    @hk0i 9 ปีที่แล้ว

    actually :nohl is short for "no highlight" also :noh is 25% shorter than :nohl if you wanna get crazy

    • @DGDG0000000
      @DGDG0000000 7 ปีที่แล้ว

      hk0i not 25%, but 20%. There is : inside.

  • @GNU_Linux_for_good
    @GNU_Linux_for_good 8 ปีที่แล้ว +1

    What's the name of the font that powerline makes use of? Thanks.

    • @ShawnBiddle
      @ShawnBiddle  8 ปีที่แล้ว +1

      +FreeSoftware Ubuntu Mono IIRC

    • @GNU_Linux_for_good
      @GNU_Linux_for_good 8 ปีที่แล้ว

      +Shawn Biddle hell - that was fast ;-)

  • @pi3dr
    @pi3dr 10 ปีที่แล้ว

    What terminal/distribution of Linux are you using?

  • @kkoppa
    @kkoppa 10 ปีที่แล้ว

    What is the amazing PS1 that appears at the bottom? Please share how to do that.

    • @ShawnBiddle
      @ShawnBiddle  10 ปีที่แล้ว +1

      At the time of the video it was GNU Screen which I patched to have 256 color hardstatus but I use tmux now because I didn't have to patch it. My dotfiles are in github (link in the description)

  • @haventfoundme
    @haventfoundme 10 ปีที่แล้ว

    Thank you

  • @hb123220
    @hb123220 10 ปีที่แล้ว

    very helpful~

  • @clyt9636
    @clyt9636 7 ปีที่แล้ว

    how did you color some lines orange and others green.
    I know that vim does syntax highlighting but this is plain english

    • @cannuhlar8229
      @cannuhlar8229 7 ปีที่แล้ว

      This is actually not plain english, it's called markdown and it's a markup language. More on this topic here: en.wikipedia.org/wiki/Markdown

  • @spindelhalla
    @spindelhalla 11 ปีที่แล้ว

    Where are classes 1 and 3? I can only find 2 and 4.

  • @8bitclassical
    @8bitclassical 8 ปีที่แล้ว

    The guy at the end :D "yaaAAaAayYy"

  • @JustinCDas
    @JustinCDas 9 ปีที่แล้ว

    Great Video Thankx.........................

  •  7 ปีที่แล้ว

    Take a look at 'rhysd/clever-f.vim' at github

  • @valensmann5572
    @valensmann5572 10 ปีที่แล้ว

    Class three is where?

  • @info305
    @info305 11 ปีที่แล้ว

    I would love to learn and use vim unfortunately I don't think it will help with Java that much.

  • @stardiviner
    @stardiviner 10 ปีที่แล้ว

    what tool do you use for recording this video?

    • @ShawnBiddle
      @ShawnBiddle  10 ปีที่แล้ว

      The very shitty recordmydesktop, the whole reason I lost Class 3. The most recent videos I'm just using ffmpeg directly, transferring it to a windows machine and editing in Premiere

    • @duncon98
      @duncon98 9 ปีที่แล้ว

      ***** u don have intention to redo Class 3?

  • @736939
    @736939 6 ปีที่แล้ว

    You already installed cool plugins :( I need to know how to do it