VIM The Ultimate Editor

Sdílet
Vložit
  • čas přidán 29. 07. 2024
  • VIM editor is one of the most beloved, but often misunderstood editor in existence. Let’s configure it from a noobs perspective and show you it’s power.
    Video Links and Guide: christitus.com/vim-the-ultima...
    Timestamps:
    00:00 Why bother with VIM?
    03:06 Vim Cheatsheet
    03:41 Exiting VIM the RIGHT WAY!
    04:22 VIM Modes and Basic Movement
    09:42 VIM Tutor
    12:00 Real World Sys Admin Example fstab
    16:07 VIM Plugins
    21:15 The first vimrc file .
    ►► Digital Downloads ➜ www.cttstore.com
    ►► Reddit ➜ / christitustech
    ►► Titus Tech Talk ➜ / titustechtalk
    ►► Twitch ➜ / christitustech
  • Věda a technologie

Komentáře • 272

  • @chrissaltmarsh6777
    @chrissaltmarsh6777 Před rokem +102

    I'm 72, used Bill Joy's vi in the late 80's
    The muscle memory is still with with me (I use neovim now)
    It was, and is, brilliant if you want to write code while concentrating on thinking about the code you are writing or editing.
    You learn how to transfer thoughts to a keyboard without really thinking about how.
    That is what is so clever about the original vi. Designed to do what you need.

  • @cdey3886
    @cdey3886 Před rokem +29

    I switched from vscode to Vim a few months ago and I can not stress enought how much I love it. And imo, it's not just for programers if you write blogs it's a must have!

  • @VictorRodriguez-zp2do
    @VictorRodriguez-zp2do Před rokem +34

    20:44 - An alternative to this that a lot of people use is remapping your Caps lock key to escape, an even better alternative is remapping your caps lock key to escape AND control, so that when you press caps lock alone it's registered as escape and when you press it with another key it counts as CTRL. In Linux there's this package called caps2esc which does that (it does it for every program not just VIM). When I discovered this I felt like a kid in a toy shop

    • @foss_sound
      @foss_sound Před rokem +2

      That indeed could be a gamechanger. Ty for sharing.

    • @nodidog
      @nodidog Před rokem

      I've been using this setup for a year or so, it works well 👍

    • @sspaeti
      @sspaeti Před rokem +1

      I do similar things, but instead of ESC and Ctrl, I use ESC and Caps and map e.g. HJKL with Caps for moving the arrow key generally. Now I can use arrow keys with homerow in any app outside of vim as well. Caps A for umlaut etc. So I have another layer of shortcuts.

  • @drescherjm
    @drescherjm Před rokem +39

    I used to be descent at vim in the 1990s when remotely programming on unix at the university however I have unfortunately forgotten everything about it and stick to nano from a terminal for at least the last 15 or so years.

    • @DarkGladiator
      @DarkGladiator Před rokem +1

      Why did you forget it? is it because you stopped using computers for a while or just stopped using vim

    • @drescherjm
      @drescherjm Před rokem +7

      @@DarkGladiator I had moved on to a windows software development and network admin job after I graduated and did not use vim. However a few years into that 2002/2003 I switched to using gentoo linux servers but the default editor was nano.

    • @FakhryHTatanaki
      @FakhryHTatanaki Před rokem

      Eyy I can relate to my uni days as well, the labs had windows installed 😝, so I ssh to my home server to do the programming using VIM

    • @drescherjm
      @drescherjm Před rokem +1

      @@FakhryHTatanaki When I started in 1989 the labs had vt100 terminals but those were eventually replaced by solaris workstations and windows machines. I was a student at the university for 6.5 years and I work for them for 25+ now.

    • @jarnobot
      @jarnobot Před rokem

      You might want to give Micro a try.

  • @yvrelna
    @yvrelna Před rokem +67

    Coming from a Vim veteran here, there's nothing wrong with mouse=a
    Keyboard moves are great for quick and precise movements, but there are times when using the mouse just makes a lot of sense, like when you're browsing texts without specific aim and doesn't actually need to edit anything. Don't feel like you have to use the keyboard all the time, the mouse is there to be used.
    The problem is if you're using the mouse as a crutch instead of actually learning vim keyboard keys. That'll make it hard to actually improve your editing efficiency.

    • @zeocamo
      @zeocamo Před rokem +1

      that is why neovim got it out of the box and got right click menus too.

    • @danmar007
      @danmar007 Před rokem

      I often challenge myself at using only my mouse to navigate Windows. In fact, one of the things I used to show new Windows users was how much you can do with just the mouse.

    • @entelin
      @entelin Před rokem +3

      @@zeocamo When I just read your comment I was like "wtf is he talking about? right click?" then I right clicked on my neovim window.. "omg he's right XD"

    • @entelin
      @entelin Před rokem +5

      I agree. If you are actively editing in vim, then your hands really should be both on the keyboard. However if I'm going back and fourth between a web browser, or an image editor or whatever, then my right hand wont be on the keyboard. So that creates some tension, and there's cases for example where I will highlight and scroll with the mouse in vim because my right hand is already there and will probably need to stay on the mouse in the next moment when I go back to whatever else I was doing.

    • @user-he4ef9br7z
      @user-he4ef9br7z Před rokem +4

      Heresy. Your computer shouldn't even have a mouse.

  • @rkdeshdeepak4131
    @rkdeshdeepak4131 Před rokem +5

    The Primeagen can convince someone who doesn't even have a computer just by his excitement

  • @sysandy2
    @sysandy2 Před rokem +9

    I've been a vi(m) user for the past 20+ years. I started my sysadmin career working on Solaris 2.6 and BSDi systems which were pretty primitive compared to today. I will say that even though I have been a long time user I still learn a new trick now and then. You will be surprised by how quickly those key strokes become muscle memory. Also, I always set vi keybindings (set -o vi) in my shell; try it if you have not already done so.

    • @vikingthedude
      @vikingthedude Před 19 dny

      I did NOT know we could do that in our shell. Ill check it out first thing tomorrow

  • @Mikesco3
    @Mikesco3 Před rokem +2

    It's really fun to watch your journey.
    Also nice to compare it to our own journey.

  • @avocado9227
    @avocado9227 Před rokem +4

    Vim is like the alphabets for any language; the sooner you learn it, the sooner you benefit from knowing it. Similarly, the sooner you learn how to touch type, the sooner you benefit from the productivity that comes with knowing where ASDF is on the keyboard. Only you and you alone will benefit from Vim's high productivity until death do you part.

  • @user-hc6uo5fp8n
    @user-hc6uo5fp8n Před rokem

    Thank you have learnt so much from you and JustAGuy Linux , DistroTube over the last two months. As a long time windows user (98 to win10? To big and loaded with stuff that I never used) I was so used to changing something in windows and waiting for the blue screen of death that I just stopped changing things. You have give me the confidence to try things in Linux and make the system suit me thank you again keep up the good work.

  • @KeepEvery1Guessing
    @KeepEvery1Guessing Před rokem +7

    Do be sure that you can use it without your customized settings. A great advantage to vim is that it's always there on a Linux box. In fact, there is some advantage to knowing how to get by in vi, because the *nix systems that aren't Llinux may not have vim, but will have vi, and the basics are the same. (I prefer emacs myself, but that's rarely pre-installed on other peoples boxed. I started out with TECO - old old guy - which was what Stallman originally wrote emace in, since it was a highly programmable editor even way back then.)
    BTW, the direction for the arrow keys is that the DEC VT-52 and others had arrows over the letters on HJKL keys. I believe that HACK, a game from those days uses the same direction keys, or did.
    And vi, and maybe vim, has exed mode (:ex), harkening back to when we edited on printing terminals like teletype machines (I did my thesis on an Execuport 300 in the TJ6 markup language). Probably not worth it for you, but it's good to know if you wind up having to edit over a VERY slow connection, where having your screen constantly updated is just untenable.

    • @tanmaypanadi1414
      @tanmaypanadi1414 Před rokem

      Cool ,Thank you for sharing

    • @Winnetou17
      @Winnetou17 Před rokem +2

      Hack and NetHack do use the HJKL. Also, NetHack is still being developed to this day (though it's mostly bugfixes for those insanely obscure cases + QoL improvements)

  • @sandmanxo
    @sandmanxo Před rokem +2

    I was a vi user since the 90s and switched to vim 3 years ago when a coworker was using it. It's the first thing I install on any distro, or even inside dockers containers.

  • @wishmaster1449
    @wishmaster1449 Před rokem +2

    Thanks for sharing your vim's configuration, Chris. I have a question. How do you open the Markdown previews? Do you have another plugin or you can do it with vim-markdown?

  • @Vashinator7
    @Vashinator7 Před rokem +4

    Nice. Kinda thinking my first live stream will be speed running vim tutor in neovim haha.
    Plan to dive into neovim quite a bit and work on some lua and python I believe

  • @gwgux
    @gwgux Před rokem +2

    He finally did a video dedicated to Vim! Good coverage on it! Vim is a beast where there's always more to learn for how to use it in new ways, especially with the plugins. At least you don't need to be an expert to be proficient and able to benefit from it. Learn the basics and you'll already start being more efficient in how you edit files.

  • @zinsy23
    @zinsy23 Před rokem

    I agree with your view on j and k! When I first learned VIM, I decided to configure the vimrc to flip them around using nmap so I didn't have to bother making myself miserable learning the default way. So much better!

  • @MoGuy-zy1gh
    @MoGuy-zy1gh Před rokem +4

    Hey Chris. In one of your past videos, ("Installing Linux The "Right" Way") you mentioned that you had created your own personal Debian mirror, and that you would soon make a video on how you did that. Did you ever make that video? I've been wanting to create a personal mirror of my own, and would like some direction. Thanks!

  • @zeocamo
    @zeocamo Před rokem +3

    4:30 no it is not the only 3 modes, you can do a :h vim-modes for the full list and more details but it is notmal, visual, select, insert, command-line, ex, terminal, operator-pending, replace, virtual replace, insert normal, insert visual and insert select mode.
    so that is 13 modes not 3 but 13

  • @zeocamo
    @zeocamo Před rokem +9

    the g in the substituting is for global, and if you first select the lines with visual mode, then it will only run on the selected lines, then you can do(without %) :s/"//g and without the g here it will only replace the first " on the line

    • @FabianBarajas
      @FabianBarajas Před rokem +4

      Just to add on something I find useful, the '%' sign at the beginning of the command tells the substitute command to run over the current file/buffer. You can also set a range using line numbers :20,30s/findthis/replacewiththis/g. The 'g' tells the substitute command to replace all occurrences of the located search expression on a line that it's operating on, otherwise it will only change the first occurrence on each line it operates on.

  • @mateiberatco500
    @mateiberatco500 Před rokem +2

    "The first thing to learn"...to exit: I remember an article comparing Windows (XP or 98) to Linux where the reviewer gave point to Windows because he couldn't shutdown Linux. It worked for a whole week (Linux stability), but he wanted to turn off his PC during the night.

  • @zeocamo
    @zeocamo Před rokem +9

    if you start with neovim in stand of vim, it is more new user friendly with mouse support out of the box, and better default settings making it easier to get start.

    • @ChrisTitusTech
      @ChrisTitusTech  Před rokem +6

      Agreed, I just moved since the video was made.

    • @StillConfusing
      @StillConfusing Před rokem +2

      neovim is also great because lua is a real language that's pretty useful to know, and is also super fast

    • @zeocamo
      @zeocamo Před rokem +3

      @@StillConfusing yes and it easy to write in, and the LSP and treesitter and telescope and nullls etc. it is at a place now that you can build a great editor for you, or a PDE as Teej_dv call it.

    • @Kalasklister1337
      @Kalasklister1337 Před rokem +1

      If you for some reason do not like to figure out all your plugins on your own and your are switching from something like vscode, your should definitely try lunarvim initially created by a person also named Chris (chris@machine). It is a pretty popular set of neovim configs that makes neovim behave more like a modern IDE without you having to configure much. I'm sure there are other projects like it and you can try those as well.

    • @zeocamo
      @zeocamo Před rokem +1

      @@Kalasklister1337 yes lunarvim is a nice project that i also help with a few things, but when you use it for a while then you need to learn get to fix stuff in neovim maybe with your own config

  • @blevenzon
    @blevenzon Před rokem

    Yessssssss!!!! I was waiting for this Chris. Woooohooo

  • @MrKristian252
    @MrKristian252 Před rokem +2

    15:08 Oooo! For this I would use the multi cursor plugin. Select the content you want to search, then CTRL + N to duplicate the cursor till you've selected all of them, and then now you have selected all of them.
    I don't think I can link the github page, because I'm getting the feeling youtube is hiding comments containing links

  • @generalfun6960
    @generalfun6960 Před rokem +2

    Do you know the vimium plug in for the browser ? You can use the vim stuff on the browser works on chromium and firefox.

  • @VictorRodriguez-zp2do
    @VictorRodriguez-zp2do Před rokem +2

    Don't worry about hkjl, I also had trouble with it but after a while you get used to it. It's the same with a lot of VIM features they seem pretty counter-intuitive at first but after some time you feel like you are flying

    • @xn1kkix
      @xn1kkix Před rokem +2

      10:06 Chris vocalized the mechanical crisscrossed confusion as it was experienced

  • @seyu8666
    @seyu8666 Před rokem

    I absolutely love vim! Been using it for more than two years now

  • @danmarvarela1446
    @danmarvarela1446 Před rokem +3

    One of the many things I learned using vim is one could map H and L to :bprev and :bnext respectively in nomal mode to move left and right between open buffers just for the muscle memory (since h and l navigates left and right respectively). H is for moving the cursor on top of the screen but one could use gg for that. L is for moving the cursor to the bottom of the buffer but one could use G instead.

    • @michaelkrailo5725
      @michaelkrailo5725 Před 4 měsíci

      I like that remapping idea for H and L to switch buffers, but your wrong about what the original H and L commands do. They only go to the top or bottom of the viewable buffer, not the entire file. I normally just use leader(space) p or n to go to previous or next buffer.

  • @mithubopensourcelab482
    @mithubopensourcelab482 Před rokem +1

    This will be my 149th attempt to learn Vim after watching your video. Thanks Chris.

  • @PinakiGupta82Appu
    @PinakiGupta82Appu Před rokem

    Press 'Ctrl+[' in insert mode instead of pressing Escape and change the mode to normal mode. 'Control' plus 'Third Bracket'. Or, simply map ''jk"/"jj" to Escape. Using the mouse seems fair sometimes when you have to copy from other application windows such as a web browser. There's no shame in admitting that after using Vim loosely since 2013, I don't think that I'll know everything about Vim even at the end of my life. Nobody is a Vim master. It's just a matter of the level of mastery. How one uses Vim also counts. I still learn from new Vim users. I still look at vimrc files dated back to 1997. Like learning in all other disciplines, the journey to acquire mastery in Vim is a never-ending process.
    Good job! Keep it up!

  • @WayneSmith619
    @WayneSmith619 Před rokem +1

    Nice thing about vim is when somebody else tries to use your terminal they just sit there an press the escape key to leave, which is harmless and amusing. It is like having an editor with a keyboard lock.

  • @camueller28
    @camueller28 Před rokem

    I like the cheatsheet. Can you make it available for download or did I miss the link somewhere?

  • @RobotechII
    @RobotechII Před rokem

    I switched to Vim back in 2015 and it's been amazing. I need to go through my plugins and remove the old junk and look for new plugins. To learn Vim you need to immerse yourself completely and not lean on any crutches and you'll be competent within a week.

  • @Gryfang451
    @Gryfang451 Před rokem

    I came here to learn more about VIM, but I'm over 50, what should I do?
    If you're in IT, you should learn something new every day. It will keep you from stagnating. Once that sets in, you're pretty much done for. The great news for those of us over 50 is that eventually you will forget what you learned yesterday, so tomorrow will seem all fresh again and you get to re-learn it all over! Just like all those cert questions you learned and dumped within minutes of passing your MCSA or Security+. I can't remember what I had for dinner a few hours ago, but I can still remember an activation code for Windows XP. Thanks for the video Chris! When you pass 50, hit me up and we'll put arthritic fingers to keyboards and see who can still write PowerShell without using Google. I figure by then, PowerShell will be like the Windows XP license and I'll be able to just start typing...

  • @SigmaTapion
    @SigmaTapion Před rokem +2

    Though you need some extra fonts installed, I've found AstroNvim to be a pretty good intro into using vim as an IDE
    Probably not optimal as regular vim/nvim with the same type of plugins and your own config is probably better, but.... it's a good fit for me

  • @cyphodias1640
    @cyphodias1640 Před rokem +1

    Undo Tree feels like a local GitHub repository showing all your undo commits.

  • @369time7
    @369time7 Před rokem

    OMG you triggered VIM PTSD from college. I thought I had forgotten it. Vim on orange VAX terminals in Cobol class. Lucky us it was the very last semester it was required. We were busy reveling in Win-95 and dissing ancient systems.

  • @eduardoarandah9990
    @eduardoarandah9990 Před rokem +2

    Let me suggest mastering splits and tabs. It was a game changer for me to explore code

  • @davidtipton514
    @davidtipton514 Před rokem

    I used vi in unix for many years! Thanks for the video...

  • @yvrelna
    @yvrelna Před rokem +3

    6:18 "that's five words back... or actually there's some dots there, so it'll be three b from here, or two b, I can't count..."
    😂, but seriously, use the capital W/E/B instead if you want to ignore all those special characters, it's generally easier to count that way.

  • @jefferygrantham5582
    @jefferygrantham5582 Před rokem +8

    Instant like for quickly addressing the "how to exit vim" argument. ZZ and ZQ for the win! String replacements in vim are magical also. Syntax is just like using sed. Undotree is one of my absolute favorite plugins for vim using vundle.

    • @DarkGladiator
      @DarkGladiator Před rokem

      No no you must reboot!!!

    • @edge3646
      @edge3646 Před rokem

      nice

    • @zeocamo
      @zeocamo Před rokem

      yes .. newbie found ZZ and ZQ is for the people who just started out, but Chris is getting there, and we just need to keep helping him in he's steams.

    • @zeocamo
      @zeocamo Před rokem

      gundo is also nice

  • @arcanelore168
    @arcanelore168 Před 6 měsíci

    Do you have totorials on that file manger built-in.

  • @shutdowncnn6086
    @shutdowncnn6086 Před rokem

    ThePrimeagen, the speed demon of Vim. Can't believe you have not discovered him until now? I have been watching this guy for a while. I use Vim for my Linux note taking. My Linux notes are 14,000 lines long. Vim let's me move effortlessly to my documented command lines and scripts quickly.

  • @michaelkrailo5725
    @michaelkrailo5725 Před 4 měsíci

    To overcome that confusion between j for down and k for up, just make a gesture pointing down and say to your self "Your going down!". It's very natural to point down with your forefinger. Of course, pointing up with just your middle finger conjures the "Up yours" phrase. Those two mental images should get you going in the right direction more often.

  • @gradientO
    @gradientO Před rokem +4

    I recently felt the need to learn vim because using arrow keys often isn't that efficient

  • @neil_from_future
    @neil_from_future Před rokem

    10:17 I totally agree with you about j and k, I always thought j(up) and k(down) that how my brain work but vim is not. Anyway what your distro you use and why is looking so colorful, I've never see any distro have topbar like that.

  • @Jakeu1701
    @Jakeu1701 Před rokem

    do you cover the sea captians blend?

  • @HC-nu6xr
    @HC-nu6xr Před rokem

    Great video, how did you put a window manager on Debian?

  • @TuxWing
    @TuxWing Před rokem +2

    Vi(m) is definitely the best command line editor. But I appreciate IDEs that have vi(m) capabilities either natively or via a plugin...and as long they exist, I use them every time.
    Oh BTW, the /etc/fstab can use double quotes just fine as I use them without issue.

  • @Kenny.Orellana
    @Kenny.Orellana Před rokem +1

    You could remap Esc to jj or jk by adding
    imap your_key_combination
    To your vimrc file and does the same thing you say the plugin does

  • @_Code.Pilot_
    @_Code.Pilot_ Před rokem +2

    I had the same issue with "j" and "k". I started thinking about the bottom curve of "j" as pointing downward.

  • @jamesyoung151
    @jamesyoung151 Před rokem +1

    I've been using vi the very first time I touched a unix system. When I install linux, vi/vim is one of the first things I install. I never learned any other editor. I have a cheat sheet from when I was in college.

  • @paulstokes1992
    @paulstokes1992 Před rokem

    Thanks... it's working... Good Job...!

  • @bartek...
    @bartek... Před rokem

    Is it works on Windows? Is it Visual Studio extension? Do you need virtual linux machine for it? ^.^

    • @astratow
      @astratow Před rokem

      You have it with git for windows console, you may install it separately, may use gvim.

  • @bastianp982
    @bastianp982 Před rokem +3

    Best random password generator: give a non-tech person a vim and ask them to exit

  • @xn1kkix
    @xn1kkix Před rokem +1

    Ara ara, Chris just invented a letter. 10:06

  • @AndrewErwin73
    @AndrewErwin73 Před rokem +2

    Prime also uses a DVORAK keyboard! I assume he has remapped keys so navigation is similar.

  • @cuzimhappyy7982
    @cuzimhappyy7982 Před rokem +1

    have you ever looked into Doom Emacs? it uses a vim emulator so the key binds are similar but has more functionality with it being a graphical program (it also has a terminal mode).
    ps. emacs has a ssh client called TRAMP, it can also use sudo.

    • @entelin
      @entelin Před rokem +1

      I got interested in emacs for awhile but decided it just wasn't worth it. The main thing emacs has over vim is a decent scripting language and client/server capabilities. Emacs lisp is clearly superior to vimscript, but both languages are slow. That's changing quickly with neovim however and the pace of development in neovim and the wider community of plugins is very high. LUA is far faster, cleaner, and has a large existing user base so many of the advantages of emacs I think will be erased over the next couple years. vi & vim's advantage over emacs has always been that it's a very functional program by default and ubiquitous, with genuinely inspired keybindings. Emacs can be made to be usable, but it's a very serious hobby to get somewhere that is a good experience, and even then the loading times can become genuinely obnoxious. Doom is a good project, and integrating the vim way of doing things certainly helps, but even then it's not all there and mixed with emacs bindings.

  • @SimGunther
    @SimGunther Před rokem +3

    What about Neovim? Love it so much that I mapped the vim alias to nvim on my bashrc.

    • @ChrisTitusTech
      @ChrisTitusTech  Před rokem +4

      Just moved from vim to nvim 2 days ago after I finished this video lol.

    • @zeocamo
      @zeocamo Před rokem

      @@ChrisTitusTech you only on the top of a really deep hole right now, if you push on with this in 30-60 days, you will be so close to Prim .. it go really fast when you start looking on others dot files and find lua plugins.

    • @John-Dennehy
      @John-Dennehy Před rokem

      @@ChrisTitusTech Was going to ask the same question, but while checking your github for the cool terminal formating I happened to see the recent neovim repo :D Can't wait to see that video ;)

  • @L0tsen
    @L0tsen Před rokem

    what windows manager do you use and how did you get it like that

    • @cenkhocakesitleri
      @cenkhocakesitleri Před rokem

      It's bspwm. Also you can get the exact looking, see for "installing my version of linux" video of ChrisTitusTech.

  • @michalroesler
    @michalroesler Před rokem

    Can anyone provide link for this "Primogen" or "Primogem" youtube channel?? I just can't find it on my own.

    • @GiovanniCKC
      @GiovanniCKC Před 8 měsíci

      "the primeagen" is his name. he has like 5 channels here on youtube, as well as a twitch channel.

  • @atharva_raje
    @atharva_raje Před rokem +2

    But how do I exit it? 😭

  • @MrHappygolfer
    @MrHappygolfer Před rokem

    Accidentally found vi in 1996, while investigating a Solaris 2.3 machine. Was hooked on Vim while learning Linux in 1997.

  • @HectorGonzalez-vp1ss
    @HectorGonzalez-vp1ss Před rokem +1

    I too was amazed the first time I saw some theprimeagen videos, looks like chris just going through the same.

  • @AnzanHoshinRoshi
    @AnzanHoshinRoshi Před rokem

    Thank you, Chris.

  • @AndrewErwin73
    @AndrewErwin73 Před rokem +3

    I suggest lunar vim if you want to use neovim as an IDE. It has everything you need, including LSP, Git integration, fuzzy finders, menu system... it is my favorite.

    • @jupiteriana.
      @jupiteriana. Před rokem +1

      I'm having a hard time understanding what Lunar Vim is, is it Neovim with preinstalled plugins?

    • @AndrewErwin73
      @AndrewErwin73 Před rokem +1

      @@jupiteriana. it is a ton of plugins! But the coolest thing is microsoft's lsp (language server protocol) which provides stuff like intellesense, syntax highlighting, etc. for almost any language you can think of. Also Git integration (do all of your git management from inside neovim)... essentially, it turns neovim into a full fledged IDE!
      You can get all of this stuff (or less) without lunar vim, but it is nice to have it all in once place.
      There are other packages that do similar things... lunarvim is the one I landed on.

    • @jupiteriana.
      @jupiteriana. Před rokem

      @@AndrewErwin73 thank you!

  • @foss_sound
    @foss_sound Před rokem

    Didn't know there is a way to share the yanks to the system via vimrc. Yay!

  • @redrebel__
    @redrebel__ Před rokem +1

    i've tried vim i've tried nvim. i don't do code im not a tech person really. i've tried to mess with stuff on linux but it's sort of hard to learn things when you never used it to begin with.

    • @GiovanniCKC
      @GiovanniCKC Před 8 měsíci

      I really feel that lol-- you could try getting the browser plugins for it and stuff, like SurfingKeys n' such. Could help make it permeate more of your life's activities if you're looking for a second go at it.

  • @corvusabaddon
    @corvusabaddon Před rokem

    I love that Mandalorian poster.

  • @Adiusza
    @Adiusza Před rokem

    Hi, great video thank you

  • @ambuj.k
    @ambuj.k Před rokem +2

    The very first thing I do when I install vim is to remap j+k to esc in insert mode so I never have to move my hands off of the home row; ctrl+[ is also a great default alternative to pressing escape in vim, escape is just a major annoyance when you quickly switch between normal and insert mode very often.

    • @Joe_Brig
      @Joe_Brig Před rokem +1

      I hate the default location of escape and control, so at the OS level I mapped caps-lock to escape if pressed alone. I also have caps lock mapped to control when pressed with another key.

    • @ambuj.k
      @ambuj.k Před rokem

      @@Joe_Brig That is some complex keymapping, idk how you'd do that. I use windows and wsl so I just set jk to escape in vim extension settings.

    • @Joe_Brig
      @Joe_Brig Před rokem

      @@ambuj.k I use a tool called Karibener on a Mac.

    • @Kalasklister1337
      @Kalasklister1337 Před rokem +1

      @@ambuj.k On windows you should use autohotkey. Its free and allows you to easily remap any of your keys to do whatever you like. Have not used windows in a few years now but i always liked autohotkey for its simplicity and power. Reason for binding rebinding capslock on OS level is that you use Escape a whole lot and caps lock is basically never used.

  • @CoolDudeClem
    @CoolDudeClem Před rokem

    Is this how to edit a video on Linux? Just typing a bunch of stuff? I think I'll stick with Windows.

  • @danmar007
    @danmar007 Před rokem +1

    I had to find out once and for all. There is a Vigor editor. Next video: become an expert at Vim and vigor.

  • @mirror1766
    @mirror1766 Před rokem

    For hjkl I feel the same and also have the dislike feeling hand needs to leave home row.. I try to remember 'j' sticks down so is down. Another option is separate learning(and practice use) h and l from learning j and k.

  • @Rez996
    @Rez996 Před rokem +1

    Personally, I just use "ctrl + [ " to escape out of insert mode. Saves on reaching for the escape key and also saves on having to use a plugin and/or script.
    Another option is using a macro tool to rebind "right-Alt" to "ESC".

    • @rkdeshdeepak4131
      @rkdeshdeepak4131 Před rokem +1

      Map jk and kj to ESC, best thing. Will cause initial delay while navigatingbup or down though

    • @nodidog
      @nodidog Před rokem +1

      Re-map caps-lock to be Esc when tapped, and Ctrl when held. I would never go back, it's so easy to use.

    • @JedHurricane
      @JedHurricane Před rokem

      @@nodidog Say what? Also, how do you set up hold to ctrl?

    • @nodidog
      @nodidog Před rokem +1

      @@JedHurricane Caps lock is ESC when tapped, and control when held (or pressed in combination with another key).
      I use a bit of software called karabiner elements.

    • @GiovanniCKC
      @GiovanniCKC Před 8 měsíci

      @@rkdeshdeepak4131 you can use `:set ttimeoutlen=100` to speed that up a bit (it's because it's checking to see if you'll hit both keys in the mapping before it interprets it as the normal single key)

  • @rufine4114
    @rufine4114 Před rokem +1

    I don't know why
    but I hate VIM with no reason
    gonna watch this video later and I'll see if I will use it or no
    btw, what is the best IDE for shell scripting (please don't recommend sublime cuz I've already used it)??
    edit: vim is OP, and I"m fallen in love with it,
    and for those people who don't use VIM and they wanna learn how to use it, go to the terminal and type "vimtutor" and you'll see kinda free offline VIM course (it works if you have VIM in your computer)
    and for me, VIM is such a great program for editing files that I wanted to write this comment using it but there's no VIM here on CZcams ;(

    • @GiovanniCKC
      @GiovanniCKC Před 8 měsíci

      firenvim seems to work with youtube's comment box last I checked ;)

  • @matthiasbenaets
    @matthiasbenaets Před rokem +3

    Emacs The Ultimate Editor

  • @NudeJawn
    @NudeJawn Před rokem +1

    My typical use case in VIM is like this. I 2x click a txt file, it opens in vim, I press shift zz and look for a different editor.

    • @astratow
      @astratow Před rokem

      I recommend Jason Cannon course about vim on udemy. It might be expensive, but it will drive you in right direction.

  • @toromac9786
    @toromac9786 Před rokem

    used to hate vim as well, until I decided to remove nano and force myself to use vim. I'm not proficient by any stretch of the imagination, but turning on vim mode in Obsidian really helped!

  • @vikingthedude
    @vikingthedude Před 19 dny

    20:52 its all fun and games until you find yourself writing a JJ Abhrams fanfic

  • @michaelplaczek9385
    @michaelplaczek9385 Před rokem +1

    Vim has buffers, that’s cool

  • @blusewill
    @blusewill Před rokem

    Should Get the vim cheatsheet and prints as mousepad when I forgot how to use it check the mousepad lol

  • @DJ_Cthulhu
    @DJ_Cthulhu Před rokem +3

    One word; EMACS 😈

    • @zeocamo
      @zeocamo Před rokem +1

      yea, Emacs is not useful any more after neovim got lua, now it is neovim that not all the plugins, email client too ;)

    • @entelin
      @entelin Před rokem

      @@zeocamo This. There's still some benefits that emacs has, like client/server. But the advantages emacs has had are quickly evaporating.

  • @peterjansen4826
    @peterjansen4826 Před rokem +1

    Yeah, now Chris says that. It took some effort to get him there. 😁But he is right, it is the perfect editor.

  • @xn1kkix
    @xn1kkix Před rokem

    Don't heh heh I'll be 50 years old to me Chris, you can do anything you set your mind to, I believe you could get there in several months at most.
    P.S. have you ever played "osu!" ?

  • @r.b.587
    @r.b.587 Před rokem +1

    I use vim (or gvim) just because I'm used to it. Sometimes I use vscode depending upon my mood. Going to another editor seems like a major time investment which I'd rather not do. Enjoy the videos.

    • @donaldmickunas8552
      @donaldmickunas8552 Před rokem

      I can’t use another editor easily. I keep trying to use the vim keys out of habit.

    • @user-he4ef9br7z
      @user-he4ef9br7z Před rokem

      I can't use anything that doesn't have vim keybindings.
      My email, pdf viewer, browser, file manager everything has vim keybindings at this point.

    • @ISCARI0T
      @ISCARI0T Před rokem

      @@user-he4ef9br7z what email tho?

    • @user-he4ef9br7z
      @user-he4ef9br7z Před rokem

      @@ISCARI0T Neomutt

    • @ISCARI0T
      @ISCARI0T Před rokem

      @@user-he4ef9br7z ah okay

  • @mrcrackerist
    @mrcrackerist Před rokem

    I swapped the tilde key and escape key much nicer then the default location :P

  • @David-135
    @David-135 Před rokem

    You should do a video on the benefits of using mutt as your email client.

  • @ucielsola
    @ucielsola Před rokem +1

    BLAZINGLY FAST!

  • @pdxdragon7479
    @pdxdragon7479 Před rokem +1

    I've been an unhappy Windows programmer for two decades. I loved Solaris and vi.
    This brings back happy memories.
    Does Vim still leave ~files around? That bothered me.

    • @mirror1766
      @mirror1766 Před rokem

      vim is available for windows. you can move where those undesired files are created or disable them being made.

  • @nodidog
    @nodidog Před rokem

    I highly recommend the book 'Practical Vim' by Drew Neil if you want to up your game. It's a treasure trove

  • @KaiBuskirk
    @KaiBuskirk Před rokem

    Wow…. Let’s take a look!

  • @logicalfundy
    @logicalfundy Před rokem

    It's interesting, and it's different. But . . . I'm not seeing anything strikes me as "must have" and completely unavailable in something like Visual Studio Code. I also just don't get the point in having dedicated modes for things that can be done with hotkeys.

    • @GiovanniCKC
      @GiovanniCKC Před 8 měsíci

      it allows for MORE COMMANDS XP

  • @AndrewErwin73
    @AndrewErwin73 Před rokem +1

    Aside from tabs, you can also split the screen horizontally or vertically.

    • @entelin
      @entelin Před rokem +1

      You can and I certainly use that. Though I think if you are making extensive use of splits and tabs there may be an issue with your workflow that could be improved with various kinds of jumps and finders.

    • @AndrewErwin73
      @AndrewErwin73 Před rokem

      @@entelin I don't disagree with that completely! In general I use tmux anyway. But there are times when I want to compare files or something like that. But yeah, you are right. Tabs, buffers, and a fuzzy finder SHOULD be plenty for a normal work flow.

    • @entelin
      @entelin Před rokem +1

      @@AndrewErwin73 ctrl i, ctrl o, and if coding lsp based jumps like jump definition and so on. I wish neovim would add a client/server solution where you could attach multiple copies of the client to a single server holding all the buffers. Because without that you can't be editing the same files across multiple tmux, or multiple systems, or split between monitors, etc. For example I have about 150 source files in my current programming project. Often I just open them all in the editor at once with vim src/*, but even if I didn't as I navigate I accumulate buffers and if then another copy of vim is opened it will step on that. There are multiple neovim gui clients, one of which supports detaching vim windows "fvim" so that's another possible solution though I haven't tried it yet.

    • @AndrewErwin73
      @AndrewErwin73 Před rokem

      @@entelin nice! I haven't pushed neovim to that limit just yet! But it is good to know that I could.

  • @radui7468
    @radui7468 Před rokem

    Wow man, this is like another world. It it a bit too deep for me. A few days ago I was talking to a friend about the future programming, in a few years we may start programming with visual blocks.

  • @matthieujoly
    @matthieujoly Před rokem

    ... and finally, your starting to install all the vim plugin available to most software your using.. browser at least.

  • @b1zzler
    @b1zzler Před rokem

    I prefer VS Code. Not because I like the UI or use any of its features and extensions but because it's an Electron application powered by JavaScript, the most-loved programming language among software engineers.

    • @astratow
      @astratow Před rokem

      I think Richard Stallman would disagree with this statement. I am also not the biggest fun of js.

  • @chrisstr33tkng61
    @chrisstr33tkng61 Před rokem +3

    EMACS for me, but vim is great too.

    • @astratow
      @astratow Před rokem

      I am still to get there. Emacs is vast.

  • @ButthurtNinja
    @ButthurtNinja Před rokem

    What a lot of noobs (no offense) don't get is that even just the tippy tip of the vim iceberg will speed up your workflow. Just using the movement keys, search, and especially find and replace is way faster than not using vim.

  • @billbinder7754
    @billbinder7754 Před rokem

    When MSDOS appeared, I used to prefer EDLIN to vi and any of it's rat-infested descendants. Because for several years In the 80's. I had to write software with vi and document it with vi & nroff. On terminals where all sorts of keys (up/down/let/right/etc) generated ESC sequences, happily terminating whichever idiotic vi mode you were in and dropping you into something random. EDT on VAX/VMS was marginally more useful, EDIT on MSDOS was not bad, TPU (also VAX) was rather lovely, and MicroEMACs was bliss. I do still remember how to get out of vi(m) and how to do the very basic stuff, lets call it scar tissue. It's surprisingly visceral after all those years. Sorry, nuffin personal.

  • @FarrellMcGovern
    @FarrellMcGovern Před rokem +2

    Starting a religious war, I see...🙂 The whole Vi vs EMACS was never a thing for me...I use JOE in it's WordStar mode. OK., I am old fashioned...but I *like* the CTL based command set, and I rarely need all of the funky features those other two give you, as gosh wow as they are.

    • @zeocamo
      @zeocamo Před rokem

      good for you, if you don't need it then you will not save time, most people will but nice you know your are not one of them