Your audio was fine for me lol Thanks for sharing! I can already find a few uses for it in my workflow. Every day I learn something about vim. That’s part of the fun.
in command mode in vi (or vim) just type !! at the second exclamation point you'll be a special ! prompt where you could type ip a | grep inet. I seem to recall that this worked before :r knew to do something other than read files. The reason this might be more useful is the second character doesn't need to be a ! it can be other "addresses". So for example you can type !} ip a | grep inet. That will replace the current line up until the next blank line with the output of your command since } means "the next blank line". If the second character is ! in means replace the current line.
yoooooo that's a game changer for me! I've finally been learning how to make use of cli tools like sed and this makes the workflow 10x smoother, thanks!
Impressive! One more tip is that instead of using lsblk -f and select the desired UUID, you can simply use blkid -s UUID -o value /dev/sda1 (change /dev/sda1 to your target device) to just print the UUID.
! Is more than that, we can redirect anything to cmdline with it eg: type in buffer for i in range(10): print(i) Visual select it, :!python result executes in python replace there eg 2: you have in buffer 2 3 1 5 so just do :!sort to sort it, :!sort | uniq to remove dupes or :!jq to format json string in file etc or how about bulk renaming files? :r !ls :%norm 0y$Imv ^[A ^[p to get ^[ (which is esc) use ctrl-v ctrl-[ now edit names :%!sh
Hi, thanks for the video. @Dexter101x is right in the sense that : You should use an external microphon, because we hear your keystrokes and that's loud and annoying, and because audio level is too low. Please enhance sound quality, it only relies on you.
pretty neat, every so often I search up how to make it so you can freely move the cursor in a shell like zsh to, for instance, select and copy the text of a previous command, and I'm surprised that nothing ever shows up. this seems like one way to do it though
Sorry, just realized how small the font is!! 😅😅
In vi command line mode
:r !
Not only that, your audio is terrible
Your audio was fine for me lol Thanks for sharing! I can already find a few uses for it in my workflow. Every day I learn something about vim. That’s part of the fun.
also you can use vim terminal ( :term ) then normal mode ( Ctrl + \ + n ) .
this way u can yank anything from terminal
I think 'j' and ':w' are probably my most used vim features, but this seems useful as well 😂
in command mode in vi (or vim) just type !! at the second exclamation point you'll be a special ! prompt where you could type ip a | grep inet. I seem to recall that this worked before :r knew to do something other than read files. The reason this might be more useful is the second character doesn't need to be a ! it can be other "addresses". So for example you can type !} ip a | grep inet. That will replace the current line up until the next blank line with the output of your command since } means "the next blank line". If the second character is ! in means replace the current line.
this is amazing. thanks for sharing!!!
yoooooo that's a game changer for me! I've finally been learning how to make use of cli tools like sed and this makes the workflow 10x smoother, thanks!
WOAHHH that was awesome!!!
to the point video, thank you :)
You're welcome!
This is pretty useful!
Cool tip :)
Impressive! One more tip is that instead of using lsblk -f and select the desired UUID, you can simply use blkid -s UUID -o value /dev/sda1 (change /dev/sda1 to your target device) to just print the UUID.
Nice! that saves time
awesome, I've never came across this feature
thanks for sharing
thank u for this!
! Is more than that, we can redirect anything to cmdline with it
eg: type in buffer
for i in range(10):
print(i)
Visual select it, :!python
result executes in python replace there
eg 2:
you have in buffer
2 3 1 5
so just do :!sort to sort it,
:!sort | uniq to remove dupes
or
:!jq to format json string in file etc
or how about bulk renaming files?
:r !ls
:%norm 0y$Imv ^[A ^[p
to get ^[ (which is esc) use ctrl-v ctrl-[
now edit names
:%!sh
Hi, thanks for the video. @Dexter101x is right in the sense that : You should use an external microphon, because we hear your keystrokes and that's loud and annoying, and because audio level is too low. Please enhance sound quality, it only relies on you.
pretty neat, every so often I search up how to make it so you can freely move the cursor in a shell like zsh to, for instance, select and copy the text of a previous command, and I'm surprised that nothing ever shows up. this seems like one way to do it though
You could press prefix + [ in tmux to go into copy mode and move around with your vim keys
@@jackyzheng55 oh shit that's really cool, thanks
that’s sick
:q ?