Learn How to Use the Vim Text Editor (Episode 1) - Basic Usage (and how to exit Vim)

Поделиться
HTML-код
  • Опубликовано: 27 май 2024
  • Welcome to the brand new Vim series! In this course, you'll learn everything you'll need to know in order to become productive with Vim, a popular UNIX/Linux text editor. You'll learn how to install it, how to use it, and some quality of life tips to increase your skills. In this episode, you'll get an introduction to Vim and learn some of the basics.
    LPI Linux Essentials Course Available
    Check out the new course on Udemy! ➜ learnlinux.link/lpi-course
    ➜ learnlinux.link/lpi-course
    Check out the Linux Shop
    In the official shop, you'll find Shirts, hats, stickers, bags and more!
    ➜ merch.learnlinux.tv
    5% discount on LPI exam vouchers
    After you finish Jay's new course, get 5% off an LPI exam voucher here:
    ➜ learnlinux.link/lpi-voucher
    Become a Patron
    Show your support for Learn Linux TV on Patreon and get access to exclusive perks!
    ➜ learnlinux.link/patron
    Become a Channel Member
    Show your support for Learn Linux TV here on RUclips and get access to exclusive perks!
    ➜ learnlinux.link/member
    Mastering Ubuntu Server: 4th Edition
    Jay's latest book covers everything you need to know in order to master Ubuntu Server. It's available here:
    ➜ ubuntuserverbook.com
    Linux Gear and Kits
    Check out Jay's choice of hardware products, audio/video equipment, and more.
    ➜ learnlinux.link/amazon
    Grab an awesome Pi-powered KVM
    Support Learn Linux TV and grab yourself a TinyPilot KVM here:
    ➜ learnlinux.link/tinypilot
    Note: Royalties and/or commission is earned from each of the above links
    Other Episodes in this Series
    * Episode 1 ➜ This Video
    * Episode 2 ➜ Modes, Navigation and More: linux.video/vim-2
    * Episode 3 ➜ Buffers: linux.video/vim-3
    * Episode 4 ➜ Visual Mode: linux.video/vim-4
    * Episode 5 ➜ Splitting Your Vim Window: linux.video/vim-5
    * Episode 6 ➜ Tips, Tricks and How to Configure Vim: linux.video/vim-6
    *Video Specific Links*
    • Neovim (available for most platforms) ➜ neovim.io
    • Neovim overview video (coming soon) ➜ linux.video/neovim
    • Macvim (for macOS users) ➜ macvim.org/
    • Neovim Releases Page ➜ github.com/neovim/neovim/rele...
    Time Codes
    00:00 - Intro (And some Tips)
    02:13 - Installing vim on Debian and Ubuntu
    04:49 - Installing vim on Fedora/Red Hat/CentOS (etc)
    05:23 - Installing vim on macOS
    05:45 - Launching vim on MacOS
    05:59 - Neovim is worth checking out
    06:28 - For macOS users, macVim is worth considering
    06:53 - Why are there multiple "versions" of Vim?
    07:32 - Launching Vim
    08:23 - Opening an existing file in Vim
    10:25 - A summary of vim's "modes"
    14:21 - Saving changes in Vim
    16:05 - How to Append in Vim
    17:17 - Undoing changes
    18:03 - Moving between the beginning and end of a line
    Full Courses from Learn Linux TV
    • Linux Crash Course series ➜ linux.video/cc
    • Learn how to exit use tmux ➜ linux.video/tmux
    • Learn how to use vim ➜ linux.video/vim
    • Bash Scripting Series ➜ linux.video/bash
    • Proxmox VE Cluster Full Course ➜ linux.video/pve
    • Learn Ansible ➜ linux.video/ansible
    Linux-related Podcasts
    • Enterprise Linux Security ➜ enterpriselinuxsecurity.show
    • The Homelab Show ➜ thehomelab.show
    Learn Linux TV on the Web
    • Main site ➜ www.learnlinux.tv
    • Community ➜ community.learnlinux.tv
    • Enterprise Linux Security Podcast ➜ enterpriselinuxsecurity.show
    • The Homelab Show Podcast ➜ thehomelab.show
    • Content Ethics ➜ www.learnlinux.tv/content-ethics
    • Request Assistance ➜ www.learnlinux.tv/request-ass...
    Disclaimer
    Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. The person viewing Learn Linux TV's content is expected to follow their best judgement and to make their best decisions while working with any related technology. Always make sure you have written permission before working with any infrastructure. Also, be sure that you're compliant with all company rules, change control procedures, and local laws.
    #linuxtutorial #DevOps #Linux
  • НаукаНаука

Комментарии • 66

  • @ahahswe
    @ahahswe 3 месяца назад +3

    11 commands in 1 video, this is the best Vim introduction!

  • @Wampa842
    @Wampa842 7 месяцев назад +11

    18:09 One addition I would've made. Pressing 0 moves the cursor to the beginning of the line, but typing ^ (caret, which I think is shift+6 on a US keyboard) moves the cursor to the first non-space character. Very useful if the text file is indented.

    • @juanmacias5922
      @juanmacias5922 7 месяцев назад

      Huh, that's a no go for my nvim setup lol I would have mentioned "o", and "O", for creating a new line under, and above the cursor. :D

    • @pablogonzalezmora4679
      @pablogonzalezmora4679 7 месяцев назад

      Very good tip. In Spanish keyboards, caret needs two keystrokes.

  • @randleqgod
    @randleqgod 7 месяцев назад +14

    This is literally my favorite editor. I appreciate you putting this out.

  • @Rbourk252
    @Rbourk252 7 месяцев назад +5

    I love this editor. Once I’d mastered a few key bindings and commands, I could edit text very quickly without touching the mouse.

  • @blah148
    @blah148 5 месяцев назад +1

    The first 2 minutes were a bit fluffy, but nice long-form vids! Glad to have this series.

  • @jamesalles139
    @jamesalles139 7 месяцев назад +1

    Yes. Exiting Vim should be the first lesson and the first step!
    EMACS

    • @Mzansi74
      @Mzansi74 7 месяцев назад +1

      EMACS is really cool. And I think that it is the most productive editor, especially for systems programmers. The learning curve was just so steep, so I never learnt it.
      But with today's IDEs, GUI is actually the most productive for most people.
      I did not realize that EMACS is still a thing! LOL

  • @manueljordan317
    @manueljordan317 7 месяцев назад +2

    Huge thanks for this video and the playlist - Yes, I am going to watch all this serie!!!!

  • @bTorch-nz7rp
    @bTorch-nz7rp Месяц назад

    Great start to relearning this amazing journey!!!!

  • @programmersurfdude
    @programmersurfdude 3 месяца назад

    Thank you so much, I am a student right now and we are learning about Vim. Also want to mention that your room is AMAZING

  • @hyltoncarboo8303
    @hyltoncarboo8303 2 месяца назад

    I started using vim recently. It is hella powerful when you start getting used to it.

  • @JudgeFredd
    @JudgeFredd 7 месяцев назад +1

    Everybody needs this video ...

  • @Parsley4706
    @Parsley4706 6 месяцев назад

    Very informative, thank you!

  • @matthewfaherty
    @matthewfaherty 7 месяцев назад +4

    Thank you for this.
    I literally just asked a Facebook group about Linux why on earth somebody would use vim, as to me, it seems so impossible to use compared to things like nano.
    Answers I got surprised me. And I didn't realize how important it is in the Linux/UNIX space

    • @juanmacias5922
      @juanmacias5922 7 месяцев назад

      I think it's a preference thing, but after you understand the commands, and they become second nature, you fly through files! I feel hindered when I have to use the mouse to edit files now lol

    • @Mzansi74
      @Mzansi74 7 месяцев назад +2

      Another cool thing, is the the predecessor of vim, namely vi was available on (almost) all POSIX (UNIX) installations.
      That is why we "had" to learn it. Especially because we were often not directly connected to the Internet. And vi is even more esoteric. Coming from vi, vim was REALLY a step up.

    • @ironfist7789
      @ironfist7789 7 месяцев назад +2

      @@Mzansi74 I'm still on pico which is pre-nano. I used vi a bit but never spent enough time to make it second nature

    • @Mzansi74
      @Mzansi74 7 месяцев назад

      @@ironfist7789 "real programmes" us ed - the predecessor to vi LOL

  • @ghangj
    @ghangj Месяц назад

    I use vim btw :). Thanks for your lectures and videos, it has improved my linux skills.

  • @ranimungcal
    @ranimungcal 2 месяца назад

    thank you for this vim tutorial!

  • @shado2wx
    @shado2wx 7 месяцев назад +3

    Thank you for this!!!

  • @2wardruid2
    @2wardruid2 5 месяцев назад

    Great tutorial! Thank you

  • @freckhard
    @freckhard 7 месяцев назад +7

    :wq will always write the entire buffered file before quitting, wether or not you have changed it. You may want to use :x which only writes the buffer if you have actually edited the file and then closes it / exits vim. Especially useful for very large files like syslog and others, hope this helps :-)
    Great series Jay, even though I am using vim daily I still watch your (updated) series, you never know if there is something new or something I forgot, keep it up!

  • @Whoknowsthatman
    @Whoknowsthatman 6 месяцев назад

    Thank you Jay.

  • @subarutendou
    @subarutendou 7 месяцев назад +4

    Good to see a vim turtorial, I'm using emacs but using evil for vim movement because I'm using vimium on browser and I'm lazy and don't want to using so many different movement across all the program and vim seem to available for almost every program I'm using, so I'm choose vim movement. evil have some movement not act the same as normol vim, but it still good to refresh and maybe found something I didn't think of how to use vim movement.

  • @tanuj05
    @tanuj05 6 месяцев назад

    Awesome video !!

  • @n-o-i-d
    @n-o-i-d 7 месяцев назад

    The last part of the title made me chuckle

  • @YannMetalhead
    @YannMetalhead 6 месяцев назад

    Good guide.

  • @michaelplaczek9385
    @michaelplaczek9385 6 месяцев назад

    micro is my favorite nano-styled editor, vim is my favorite general text editor

  • @Jason.M
    @Jason.M 7 месяцев назад

    Yes! I Want to take the VIM "cert" from the Linux foundation.

  • @michaelenelmar
    @michaelenelmar 3 месяца назад

    Quick save in vim?
    Hey Jay.
    After nano, I'm a very happy micro user.
    But I love to optimise and get more efficient and what's better than get glued to the keyboard?
    I love the hjkl navigation!
    So here comes my question:
    I'm learning bash scripting and, like everybody else, I got one terminal with my script and another with my code.
    But to test it, I have to leave insert mode, type w, hit enter, test my code, go back and enter edit mode again.
    On nano you just hit Ctrl + w and on micro it's really Ctrl + s !
    What I mean is that how can the most efficient editor ever be so inefficient in such a basic and essential task?
    Save, test, continue.
    Thx for all your great work.

  • @achinthadulshan8682
    @achinthadulshan8682 7 месяцев назад +1

    Thanks❤‍🔥

  • @atajahangiri5861
    @atajahangiri5861 7 месяцев назад +1

    VERY very GOOD video

  • @RahulKumar-yq9ic
    @RahulKumar-yq9ic 3 месяца назад

    learning is not a rush

  • @davidmoore573
    @davidmoore573 7 месяцев назад

    good stuff

  • @user-bhha4mt7ov1w
    @user-bhha4mt7ov1w 7 месяцев назад

    Great ❤

  • @KomentarSaya
    @KomentarSaya 2 месяца назад +1

    please add screenkey to your monitor

  • @manueljordan317
    @manueljordan317 6 месяцев назад

    Is curious, I have Ubuntu Desktop 22.04 and I wrote the "command -v vim" command and returns nothing as you too. I wrote the "vim --version" command and returns error about vim is not installed and suggested some commands to install, such as vim, vim-tiny .... the fun part is if I execute "vi --version" it shows an output with "VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 16 2023 18:15:38)" as the first line .... so VIM really was already installed from the beginning - and just in case, I can open VIM as you do with the same commands but just using "vi" and not "vim"

  • @user-rt8nh4xl8u
    @user-rt8nh4xl8u 6 месяцев назад

    nice

  • @INTJames
    @INTJames 6 месяцев назад +1

    Redo is ctrl r

  • @Yupppi
    @Yupppi 5 месяцев назад

    "People make fun of vim saying how hard it is to exit" that is not a joke. I started my coding on my uni's unix server terminal interface and used jed that was configured for students. It also had vim and I heard vim is good so I opened it and I also sometimes accidentally opened it. I was always stuck for minutes and it was doing all kinds of crazy stuff (and I never managed to write a single line that I intended).
    Just now I'm editing a file in vim and :q does nothing (other than type :q on the file), I can't even get to the command area.

  • @dark_cloud_storm
    @dark_cloud_storm 7 месяцев назад

    What is benefit of vim over nano?

    • @Multowz
      @Multowz 7 месяцев назад +3

      More feature-rich and easier to navigate/edit the file

    • @juanmacias5922
      @juanmacias5922 7 месяцев назад +2

      I think it depends on what you are doing? If you are just changing some configuration, or something small, might as well use nano. But if you change files often, like a developer, it enables you to move around the files easily, find, replace, cut, paste, multiply text. Along with macros, which are like tiny recordings, that will replay a combination of key strokes as many times as you need, so that you don't have to do something manually many times. Also, I believe nano doesn't have syntax highlighting for programming languages, and you can also run a program from vim by using the command ": ! bun program.ts". Bun is a JavaScript run time, which can be replaced by any language runner, like ": ! python program.py"

  • @jasonbourne757
    @jasonbourne757 7 месяцев назад +1

    Please do the NeoVIM series

  • @bugajpcmr6093
    @bugajpcmr6093 2 месяца назад

    How do I quit?

  • @MarkusHobelsberger
    @MarkusHobelsberger 6 месяцев назад

    :x team unite!

  • @MaverickFischer
    @MaverickFischer 7 месяцев назад +19

    Wait, the title says how to exit VIM. I’m watching later!

  • @SnowTheParrot
    @SnowTheParrot 5 месяцев назад

    Not the Windows tutorial :0
    lol

  • @Vlad_a450
    @Vlad_a450 7 месяцев назад

    ":q" - does not work! want my screenshots? )))) It only works befor you start texting!

    • @helloimatapir
      @helloimatapir 7 месяцев назад

      Of course it works. Sounds like you are in Insert Mode. Go back to Normal Mode.

    • @MarkusHobelsberger
      @MarkusHobelsberger 6 месяцев назад

      @@helloimatapir This. Probably needs to press Esc first to go back to normal mode.

  • @rajendraprasad937
    @rajendraprasad937 6 месяцев назад +1

    😅😅😅😅😅😅

  • @Merc399
    @Merc399 11 дней назад

    is there a video with a HELLA FAST recap of the hotkeys??? like wtf is these tutorials with all this useless extra info?

  • @d3x84
    @d3x84 14 дней назад

    vim is very likely one of the worst applications ever created.

  • @BeesCantSwim
    @BeesCantSwim 7 месяцев назад

    You talk too much.

    • @Mzansi74
      @Mzansi74 7 месяцев назад +3

      There are other channels...
      But I find Jay's step-by-step approach the best for solidifying Linux knowledge!

    • @SnowTheParrot
      @SnowTheParrot 5 месяцев назад +3

      This isn't a channel for quick how-to's. This is a channel for Linux enthusiasts who want to learn as much Linux as possible. We love this guy, he's a treasure trove of Linux administration and automation. You can go watch a 30-second how-to from some high-schooler who googled how to install Vim 30 minutes before he recorded the video if you want.

  • @ubeaut
    @ubeaut 7 месяцев назад +2

    I put these 2 lines in my .vimrc so I have persistent undo.
    echo "set undodir=~/.vim/undodir" >> ~/.vimrc
    echo "set undofile" >> ~/.vimrc
    I like vim but sometimes it is confusing.

  • @moistness482
    @moistness482 7 месяцев назад +1

    You can always :q! vim
    But you can never quit vim