Vim Makes Everything Better, Especially Your File Manager And Shell!

Поделиться
HTML-код
  • Опубликовано: 15 янв 2025

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

  • @zuekut
    @zuekut 5 лет назад +374

    The beginning sounded like you were describing your experience in a group therapy for Vim addiction hehe.

    • @DistroTube
      @DistroTube  5 лет назад +82

      Hi, my name is DT, and I'm an addict...

    • @zuekut
      @zuekut 5 лет назад +14

      @@DistroTube Vim is life :)

  • @maxbarnard7165
    @maxbarnard7165 5 лет назад +381

    “VIM is so good it makes me suck at everything else”

    • @gutox253
      @gutox253 5 лет назад +26

      "VIM has really penetrated my life in a pretty big way"

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

      @@gutox253 😯

    • @e.6z1
      @e.6z1 4 года назад +5

      @@gutox253 AND NOT ONLY MY LIFE

    • @frechjo
      @frechjo 4 года назад +3

      iI think I got that joke^[:wq!

  • @jcwl70
    @jcwl70 5 лет назад +175

    00:00 Intro
    02:35 vifm (vi file manager)
    04:33 working with vifm
    05:40 renaming bunch of files with vifm
    11:04 vim mode enable in your shell (zsh)
    13:55 vim mode enable in your shell (bash)
    15:08 summary
    16:18 thanks patrons!

  • @TheJobCompany
    @TheJobCompany 5 лет назад +190

    Vim actually stands for:
    Vim
    Is not
    M'just a text editor, it's a way of life

    • @anthonyrossi8255
      @anthonyrossi8255 5 лет назад +10

      M'just, what

    • @muski282
      @muski282 5 лет назад +4

      Recursion detected

    • @MrGustaphe
      @MrGustaphe 5 лет назад +7

      Vim Is Mastery

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

      merely

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

      Vim
      Is
      More than a text editor (Vim really is a way of life)

  • @gwojcieszczuk
    @gwojcieszczuk 5 лет назад +184

    VIM key bindings really get deep into your brain.

    • @harrytsang1501
      @harrytsang1501 5 лет назад +26

      IMHO it is the closest we have ever got to brain-computer interface

    • @tapank415
      @tapank415 5 лет назад +8

      :good night!

    • @smorrow
      @smorrow 5 лет назад +3

      @@harrytsang1501 I'd say the mouse is.

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

      nope. I Can't switch over to hjkl, I gotta use arrows. Even though it gets a bit awkward when switching TMUX panes.

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

      @@TheEjaay why would I? That's simply not comfortable

  • @wacesferpit
    @wacesferpit 5 лет назад +356

    itfw you automatically press 'i' when trying to writting somethinghhhhhhhhhhhhciwwrite
    anyway, nice video:wq

    • @DistroTube
      @DistroTube  5 лет назад +31

      lol

    • @randomorganist
      @randomorganist 5 лет назад +8

      a
      Personally, I', used to using the ED commands.
      .
      c
      Personally, I'm used to using the ED commands
      .
      w
      q

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

      iyou can also type :x to write and quite :x

    • @SB-qm5wg
      @SB-qm5wg 5 лет назад +2

      LOL Perfect!

    • @EnsYlmaz51
      @EnsYlmaz51 5 лет назад +4

      ZZ works for quit also

  • @Nimitz_oceo
    @Nimitz_oceo 5 лет назад +41

    Lol I loved this: “gg” : “ why in the world is he trying to go the top of the document in steam” that is awesome!

  • @TAsSos101000
    @TAsSos101000 4 года назад +4

    The way the files are renamed is really amazing! It even looks unreal if a user uses only a graphical interface!
    Very nice! Thank you!

  • @TubeHeader
    @TubeHeader 4 года назад +102

    I've been using vim for the last four years, because I couldn't close it

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

      @Meux Palefa ZQ also

    • @nobeltnium
      @nobeltnium 4 года назад +17

      pfffff, all noobs here keep telling ppl to use zee and qiu. Every one knows pros unplug the power cord

    • @magnusanderson6681
      @magnusanderson6681 4 года назад +4

      @@nobeltnium That works I guess, but what I found to be equally effective was to stop paying my power bill

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

    To navigate within a line you can use t (till) and f (find). That way you can avoid pressing h and l multiple times.
    For example:
    To move the cursor to the next comma you can use f,

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

      Yep, I could also have done "w" and "b" to move by word, as well.

  • @mkschreder
    @mkschreder 5 лет назад +4

    NeoVim is truly taking things to the next level. You can basically run vifm inside a neovim subwindow because you can now have terminal inside a window.

  • @RobBoudreau
    @RobBoudreau 5 лет назад +6

    Something you might find useful DT, try ':set number' in vifm. Gives you line numbers like Vim, makes navigating large folders easier. "25G" would open the 25th folder or file no matter where you are in the folder. You can make it permanent in your vifmrc if you like it.
    Great video. I can certainly relate to your having Vim bindings ingrained in your head. I hate having to reach for the mouse, and trying to remember "Is it Ctrl-k l, or Alt-k w, or..." ;-)

  • @rmcellig
    @rmcellig 5 лет назад +3

    Wow Derek!! What an excellent video!! I sent a link no to my nephew who is a HUGE vim fan. I'm starting to use it. So much fun even though most of the time I use nano and am trying to use vim instead. Your vim videos are great and I hope you will do more 😀

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

    Great video! I did not know Vifm and now I just love it. Thanks for sharing it with us. Keep going that way.

  • @simonced
    @simonced 5 лет назад +43

    Nice video.
    You did a little mistake when explaining /g after your substitute command.
    /g allows to replace more than one occurence on the same line where a match is found.
    The % at the beginning of the line is what makes the substitute command to apply to the whole document.
    Lastly, when saving and closing at the same time, you can use the command :x or event ZZ in normal mode.
    Also, `dw` will delete until next word, `daw` will delte a word (including space before it) and `diw` will delete in the word.

  • @CheapHomeTech
    @CheapHomeTech 5 лет назад +8

    You might want to start using vim as your terminal. Write the line you want to execute directly into a vim file and then put your cursor over it and execute it. For example I have a file called "/home/dt/Dropbox/fresh-mint-install.bsh" and I add to it anything I install on my system. So for instance after watching this video I added the line:
    :!apt-cache search vifm | grep "^vifm "; time echo your-password | sudo -S apt-get install -y vifm; apt-cache search vifm| grep "^vifm "
    and in my .vimrc I have a line that looks like :
    nnoremap :exe getline(".")
    So all I have to do is press the f2 key and the line under the cursor will be executed as if it were entered in the shell.
    Since I live in vim, do all my notes in vim, I sometimes have to open other programs from within. So my daily todo notes might have a line like:
    Update bank spreadsheet :!libreoffice -o $(locate mybiz.ods) & :!firefox www.bbvacompass.com/ &
    which would open a browser to my bank and a my libreoffice calc spreadsheet by pressing ,gg because my .vimrc file has a line like:
    :map gg :.,.s/:!.*&//gcn"tyf&@t:.,.s/&.*:!//gcnf:"tyf&@t
    Just some thoughts...

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

    vim is love, vim is life, vim text editor is very nice

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

    I first used vi in 1988 when using Unix and VMS mainframes at college. All these years later, I am back to using it and now I want to use vim bindings in everything. Back in the day, I didn't realize how powerful and efficient it is...

  • @rajeshsharma5320
    @rajeshsharma5320 5 лет назад +3

    VIM really is a way of life!!

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

    Cool video! I'm a long time Vim user, but just getting started with file managers, potentially vifm. Btw, if you happen to be using NeoVim, you can set inccommand and see the potential results of your substitute commands live. And the modifier "g" is only needed if you wanna do more than one substitution per line.

  • @AlchemistCamp
    @AlchemistCamp 5 лет назад +7

    If I weren't already a happy VIM user, the first 90 seconds of this video would have me afraid of ever trying it!

  • @eddiezaraza4805
    @eddiezaraza4805 5 лет назад +42

    are you and Luke Smith gonna make a video together sometime?
    both of you are my favorite Linux channels in RUclips

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

      same . but why you want them to make a video together . 5:49 he has a screenshot from luke's video

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

    Thank you. I always learn something new and useful from your videos. 👍🏼

  • @ArtixBTW
    @ArtixBTW 4 года назад +5

    Writing anything at school was such a pain since we have to use Google docs

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

    I'm new at Vim, thanks! Also.. the audio quality is outstanding

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

    Very cool Derek. Another solid video. I really like this kind of content. Thank you.

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

    Thanks man, learning something good everyday from you. Keep it up!

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

    Nice one on the vim key binding for shell

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

    I agree with your last words. Plugin for browsers Surfingkeys has similar functionality like the vim. You can move on a website or write in a input text (almost) like in vim.

  • @riseabove3082
    @riseabove3082 5 лет назад +3

    Should be mentioned that there is a VI light that comes with most distros and then there is VIM the full pkg you can apt install. The key bindings work ever so differently in VI light vs VIM. I always have to install VIM to get the key bindings to work correctly. I used VIM and preferred it over Nano at the time but after discovering 'micro' I fell in love with its simplicity and how user friendly it was in comparison but still very fast to use. I especially preferred micro's ability to auto-detect different script/programming languages to correctly highlight variables in different colors. Plus it is only one binary file that you install in the /bin folder. I put it on all my Linux boxes.

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

      Well said. Micro is brilliant for making quick edits to config files for instance - I can add my lines, then save and quit almost instantly.

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

    You had 99.9K subscribers. I decided to subscribe thinking it'd reach 100K, but nothing happened.
    Then I clicked this video and it was 100K (I guess it needed a refresh). Congratulations, but now give me my 100K-th subscriber reward.

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

    My first experience with vim was.. unpleasant. I felt trapped, was erasing lines, felt like I froze it up, didn't know what the hell to do, and when I finally got out of it I said "fk this thing.." Now use it all the time. People getting into Linux should practice on a document you don't care about and learn vim. It's so worth it. I never used vifm, but will be grabbing it later.

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

      You mean like vimtutor?

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

    on Ranger, we can do bulk renaming with press "v" for select all files, then type ":bulkrename", if you set your "export VISUAL="vim" on `~/.profile`, it will open Vim with all list file name. Exactly same like in this video. (^_^)

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

    I think the vi mode is implemented by readline library that is widely used by many terminal interactive tools, like bash.
    For browser, the Surfingkeys chrome and Firefox extension will make you feel at home, it has a lot of good features, one of the feature that other vim style ext missing is add bookmark. Surfingkeys ext is not very widely known, I guess its name prevents it from easily searched by vim lovers, but it really deserve your time to check it out, believe me

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

    2:55 Nautilus and Dolphin are for guests; for personal use there is rsync, cp, mv, mkdir, ln, rm, but also mc, ranger, or vifm if one will have to rename batches.

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

    Trying to use something that doesn't have vim bindings is like typing with only two fingers.
    It's a skill that is just about as powerful for editing text as learning to touch type is.

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

    9:53 /g (= greedy) in substitute is technically only necessary when what you match may be present multiple times in the same line.

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

      Didn't know about vifm, thanks!
      Edit: Or exa.

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

    That looks great, I did not know you could do that in bash, thanks!

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

    Thanks! vifm is really a fantastic tool!

  • @KingZero69
    @KingZero69 5 лет назад +3

    vim is love. vim is life. (emacs with evil mode is the master race tho)

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

    Thanks for Sharing enable vim in shell. I was looking for it for a very long time.

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

    I made the comment that for a new linux user, their first task should be to learn vim. Vim is very important to your success with linux in general.

  • @alfonsodonotsi6691
    @alfonsodonotsi6691 3 года назад +1

    amazing video, i´m starting to apply now

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

    Very cool, didn't know about vifm before!

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

    I feel you brother!

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

    woah, didn't know about vifm, installed it right away! :D

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

    Good stuff as usual, Derek!

  • @MrUnderScore81162
    @MrUnderScore81162 5 лет назад +5

    Personally I’ve found vim keys a life saver on Firefox. I use VIM Vixen plugin and it’s really nice.

  • @user-ej6yc8sr3f
    @user-ej6yc8sr3f 5 лет назад +2

    Great vid, thanks! Keep up the content

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

    Practical Vim helped me a lot.

  • @nemesis9410
    @nemesis9410 5 лет назад +3

    this is exactly how I imagined a fanatic vim user.
    nano is the true warrior way

  • @edupazz
    @edupazz 3 года назад +1

    5:50 is that a Luke Smith video screenshot?? Hahaha

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

    I always worry about putting vim bindings in bash because then I will become even more reliant on my own systems, making it very hard to work on a vanilla OS on a differently configured computer. I live vim, I definitely will look more into vifm, but i want to make sure i dont forget the bash or other key bindings.

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

    You can also add 'set editing-mode vi' to your '~/.inputrc' and that will enable vim bindings to any app that use the GNU Readline, not just Bash. If you're an emacs fan, you can do 'set editing-mode emacs'. Just remember to source '~/.inputrc' after making changes.

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

    very useful and clear.
    By the way I liked the sound quality.

  • @mrdenpes1309
    @mrdenpes1309 5 лет назад +4

    mc has been there for 25 years now, and it's still improved. It's a terminal based filemanager. vifm cannot even stand in it's shadow. MC has it all. image preview, file editing, ftp/sftp, far better interface. Better and directly accessible info. Comparing dirs, and so on and so on. for advanced stuff, you can use bash. And it's all more or less build in. You can even set vi as it's main file editor if you wish. (i use nano within mc though). mc had some probs in terminal multiplexers, but not anymore.

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

    Thanks for saVIM my life with these tips.

  • @NourMuhammad
    @NourMuhammad 5 лет назад +4

    Well, vim is better but you first need to memorize the 105347098754 shortcuts to make your life easier with vim!
    Thanks vim

  • @mbednarek360
    @mbednarek360 5 лет назад +6

    You should try Neovim. I recently switched to it from VSCode and it's pretty nice. Basically vim with more features and better performance.

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

    14:05 - what is in your login script to create that summary?

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

    some more basic usage will be great, like switch between the two panel and copy files etc

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

    *So* wicked! Thanks man.

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

    You speak from my heart. Vim is extremely great, the next that comes close it maybe emacs, but I use alt to navigate through my i3 windows and do not like that emacs heavily rely on alt commands. Vim is more independent from that shit, also works on non-desktop environments like server terminals.

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

    Thank you for the lesson.

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

    This is quite useful thanks.

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

    Which program are you using to display the keys pressed on the screen?

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

      screenkey. Should be in everyone's repos.

  • @gizzmoguy.
    @gizzmoguy. 5 лет назад

    Very beautiful theme you have for vim.

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

    V-I-F-yem sounds pretty good!

  • @RazgrizDuTTA
    @RazgrizDuTTA Год назад

    With oh my zsh and p10k, the zsh prompt chevron changes to show which vi mode you are in.

  • @churrosgratis
    @churrosgratis 3 года назад +1

    5:44 the guy on the screenshot uses arch btw

  • @cprn.
    @cprn. 4 года назад +2

    Put the following in your `~/.inputrc` and you'll have `vi mode` in every CLI tool using standard input (e.g. `mysql`):
    set editing-mode vi
    set keymap vi-command

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

    Good video, I know what you mean about how it infiltrates your life. What are you using to get the big arrow shaped blocks denoting Normal mode, etc?
    Also if you haven't yet, check out the Vimium add on for Chrome and FF, I love it

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

    So what you're saying is Vim is a better operating system than Emacs because it actually has a decent text editor?

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

    Yes, vim^Wemacs is a best editor of the world! :) To be serious Vim is a great text editor. But, after a thinking about different text editors I decided that Emacs is the best text editor for me. Emacs was written in C and Lisp (ELisp) and one could change almost any behaviour of the text editor at the runtime using ELisp interpreter. And that ELisp power allows me to change the text editor as a like. Using a Vim give me vibes that it is an ad-hoc editor comparing to the Emacs (which is like a software Lisp machine). Now, I am using vim/sed/ed for ad-hoc tasks like list processing, configs, etc and Emacs to edit source codes, To-Do (org mode), TeX and so on both local and remote (Tramp!). But, anyway they are both cool text editors :) Sorry for off-topic.

  • @affiliatewatch
    @affiliatewatch 5 лет назад +4

    Vim is superior, but it has a steep learning curve 👌

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

    i rediscovered vim a few months ago
    and now i feel slow editing in a regular text editor xD

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

    What program do you use to show all the keys you are typing? That seems very useful

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

      screenkey - should be in everyone's repos.

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

    great video, I know I'm a bit late, but could you tell me what your distribution is ?

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

    What's the theme used in vim? It looks great.

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

    I found vi mode in bash very annoying because ctr-L stops working (unbound in vi-insert mode).However eventually I found this on some forum:
    bind -m vi-insert "\C-l":clear-screen
    With that binding it's perfect.

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

    now that you tried emacs do you prefer vim or emacs?

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

    Cool. Now I'm using vim keys with zsh. Thanks.

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

    OOOI! That i3WM? I'm using it but your indicators top right are very nice. What are they? I'm using i3blocks

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

      I was using herbstluftwm in this video. The bar is polybar. Configs are on my gitlab page.

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

      @@DistroTube tyvm! Will have a look at that soon!

  • @opcom64
    @opcom64 5 лет назад +3

    great voice :) .. thanks for vim tips

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

    You really live in Vim man. You should go to Text editors rehab haha jk, amazing info 🙂 Thank you

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

    Pro and cons about ranger then ? Or maybe vim vs ranger ? Why not ?

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

    Why don't do it in Emacs's dired mode with vim key-binding?

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

    Which video editing software do you use as a arch linux user?

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

      Kdenlive. Its easily the best FOSS option

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

    Would love to see some list whats on your desktop (desktop manager, bar, powerline?, .files etc)

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

    Don't forget sc-im or scim: github.com/andmarti1424/sc-im Curses based spreadsheet with vim keys.

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

    The first thing I noticed was that with vim mode enabled in my .zshrc, it no longer allows me to type a a few characters and then scroll though my history of only things that start with those characters. That is probably the thing I love the most about zsh. Do you know of a way that I can retain this functionality with vim mode enabled?

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

      I'd like to know too if this is possible in vim mode

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

    dude probably VIM'd his coffee maker

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

    Is there a way in zsh to exit to normal mode and freely navigate the history in vim mode?

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

    1:25 what are you doing stepvim??

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

    Could you tell me what’s the plugin name that show the file name at the top of vi ?

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

      Vim-airline.

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

      @@DistroTube thank you very much

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

    I found ranger to be a few orders of magnitude better than vifm. (just noticed you mentioned it - wonder why you prefer vifm)

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

    Nice tut, but a bit too stretched. When screenshots previews were enabled, the top screenshot was from Luke's channel. Nice that they check eachother.

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

    Which mic is this!

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

    I had a distro open some file in Vim for me to edit the other day, and I'm still confused.

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

    Hi!, How did you make your taskbar like a zsh terminal for system monitoring