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!
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,
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.
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..." ;-)
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 😀
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.
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...
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...
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.
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.
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.
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.
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.
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. (^_^)
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
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.
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.
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.
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.
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.
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.
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
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
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.
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.
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?
The beginning sounded like you were describing your experience in a group therapy for Vim addiction hehe.
Hi, my name is DT, and I'm an addict...
@@DistroTube Vim is life :)
“VIM is so good it makes me suck at everything else”
"VIM has really penetrated my life in a pretty big way"
@@gutox253 😯
@@gutox253 AND NOT ONLY MY LIFE
iI think I got that joke^[:wq!
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!
thanks
Creators should pay for this service.
Vim actually stands for:
Vim
Is not
M'just a text editor, it's a way of life
M'just, what
Recursion detected
Vim Is Mastery
merely
Vim
Is
More than a text editor (Vim really is a way of life)
VIM key bindings really get deep into your brain.
IMHO it is the closest we have ever got to brain-computer interface
:good night!
@@harrytsang1501 I'd say the mouse is.
nope. I Can't switch over to hjkl, I gotta use arrows. Even though it gets a bit awkward when switching TMUX panes.
@@TheEjaay why would I? That's simply not comfortable
itfw you automatically press 'i' when trying to writting somethinghhhhhhhhhhhhciwwrite
anyway, nice video:wq
lol
a
Personally, I', used to using the ED commands.
.
c
Personally, I'm used to using the ED commands
.
w
q
iyou can also type :x to write and quite :x
LOL Perfect!
ZZ works for quit also
Lol I loved this: “gg” : “ why in the world is he trying to go the top of the document in steam” that is awesome!
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!
I've been using vim for the last four years, because I couldn't close it
@Meux Palefa ZQ also
pfffff, all noobs here keep telling ppl to use zee and qiu. Every one knows pros unplug the power cord
@@nobeltnium That works I guess, but what I found to be equally effective was to stop paying my power bill
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,
Yep, I could also have done "w" and "b" to move by word, as well.
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.
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..." ;-)
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 😀
Great video! I did not know Vifm and now I just love it. Thanks for sharing it with us. Keep going that way.
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.
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...
vim is love, vim is life, vim text editor is very nice
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...
VIM really is a way of life!!
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.
If I weren't already a happy VIM user, the first 90 seconds of this video would have me afraid of ever trying it!
are you and Luke Smith gonna make a video together sometime?
both of you are my favorite Linux channels in RUclips
same . but why you want them to make a video together . 5:49 he has a screenshot from luke's video
Thank you. I always learn something new and useful from your videos. 👍🏼
Writing anything at school was such a pain since we have to use Google docs
I'm new at Vim, thanks! Also.. the audio quality is outstanding
Very cool Derek. Another solid video. I really like this kind of content. Thank you.
Thanks man, learning something good everyday from you. Keep it up!
Thanks! :D
Nice one on the vim key binding for shell
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.
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.
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.
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.
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.
You mean like vimtutor?
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. (^_^)
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
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.
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.
9:53 /g (= greedy) in substitute is technically only necessary when what you match may be present multiple times in the same line.
Didn't know about vifm, thanks!
Edit: Or exa.
That looks great, I did not know you could do that in bash, thanks!
Thanks! vifm is really a fantastic tool!
vim is love. vim is life. (emacs with evil mode is the master race tho)
Thanks for Sharing enable vim in shell. I was looking for it for a very long time.
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.
amazing video, i´m starting to apply now
Very cool, didn't know about vifm before!
I feel you brother!
woah, didn't know about vifm, installed it right away! :D
Good stuff as usual, Derek!
Personally I’ve found vim keys a life saver on Firefox. I use VIM Vixen plugin and it’s really nice.
Also try "Vimium FF"
So try qutebrowser.
Great vid, thanks! Keep up the content
Practical Vim helped me a lot.
this is exactly how I imagined a fanatic vim user.
nano is the true warrior way
5:50 is that a Luke Smith video screenshot?? Hahaha
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.
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.
very useful and clear.
By the way I liked the sound quality.
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.
Thanks for saVIM my life with these tips.
Well, vim is better but you first need to memorize the 105347098754 shortcuts to make your life easier with vim!
Thanks vim
You should try Neovim. I recently switched to it from VSCode and it's pretty nice. Basically vim with more features and better performance.
14:05 - what is in your login script to create that summary?
neofetch
@@DistroTube ah cool. Thanks!!!
some more basic usage will be great, like switch between the two panel and copy files etc
*So* wicked! Thanks man.
👍
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.
Thank you for the lesson.
This is quite useful thanks.
Which program are you using to display the keys pressed on the screen?
screenkey. Should be in everyone's repos.
Very beautiful theme you have for vim.
V-I-F-yem sounds pretty good!
With oh my zsh and p10k, the zsh prompt chevron changes to show which vi mode you are in.
5:44 the guy on the screenshot uses arch btw
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
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
So what you're saying is Vim is a better operating system than Emacs because it actually has a decent text editor?
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.
Vim is superior, but it has a steep learning curve 👌
i rediscovered vim a few months ago
and now i feel slow editing in a regular text editor xD
What program do you use to show all the keys you are typing? That seems very useful
screenkey - should be in everyone's repos.
great video, I know I'm a bit late, but could you tell me what your distribution is ?
What's the theme used in vim? It looks great.
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.
now that you tried emacs do you prefer vim or emacs?
Cool. Now I'm using vim keys with zsh. Thanks.
OOOI! That i3WM? I'm using it but your indicators top right are very nice. What are they? I'm using i3blocks
I was using herbstluftwm in this video. The bar is polybar. Configs are on my gitlab page.
@@DistroTube tyvm! Will have a look at that soon!
great voice :) .. thanks for vim tips
You really live in Vim man. You should go to Text editors rehab haha jk, amazing info 🙂 Thank you
Pro and cons about ranger then ? Or maybe vim vs ranger ? Why not ?
Why don't do it in Emacs's dired mode with vim key-binding?
Which video editing software do you use as a arch linux user?
Kdenlive. Its easily the best FOSS option
Would love to see some list whats on your desktop (desktop manager, bar, powerline?, .files etc)
Me 2
Don't forget sc-im or scim: github.com/andmarti1424/sc-im Curses based spreadsheet with vim keys.
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?
I'd like to know too if this is possible in vim mode
dude probably VIM'd his coffee maker
Is there a way in zsh to exit to normal mode and freely navigate the history in vim mode?
1:25 what are you doing stepvim??
Could you tell me what’s the plugin name that show the file name at the top of vi ?
Vim-airline.
@@DistroTube thank you very much
I found ranger to be a few orders of magnitude better than vifm. (just noticed you mentioned it - wonder why you prefer vifm)
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.
Which mic is this!
I had a distro open some file in Vim for me to edit the other day, and I'm still confused.
Hi!, How did you make your taskbar like a zsh terminal for system monitoring