So far all videos displaying the "power of vim" have had me screaming at the screen as they use macros to solve absolutely basic problems that can be solved much better with :%s/pattern/replacement/g (assuming the dev is not a tool and actually knows Regex). This is the first demonstration I see of actual powerful use macros. Especially since you also demonstrate the power of text objects and arglist. Well done sir! PS: my most recent use of macros was selecting certain bits of text and moving them from one file to another. It's suprisingly easy to record a macro that: 1. deletes the entire text object your cursor is on 2. switches window (I had the other file open in the other window) 3. jumps to the bottom 4. pastes 5. comes back to the first window 6. jumps to the next text object to inspect
As someone just getting started with vim, that was amazing to watch! Can you do a video on how you have your vim set up? I mean with all the plugins ...etc.
Im pretty new to vim but so far I really love its capabilities though im no where near this level! The only thing is trying to remember all the keys and wishing I knew more about vim builtin scripting. Glad to discover your content and thank you for producing it!
Excelent showcase on actually doing real example on how to use this tools. I often when doing some refactoring try to learn a new way on doing it by using Vim or some cli tool like sed. Never knew I could run a macro on several files like that, and also that example on taking the results of a regexp and pasting on that line. Very good stuff! Keep them going!
Great video! Love to see how others use vim. The best way to learn after one knows the basics. Cool Examples! Looking forward to the next vim workflow video!
Good morning, Sir. I hope you are doing well. I would like to recommend you to do some videos about the vim's plugins that you use. Sincerely, a brazilian friend.
Thanks for this one! How did you set up your config to make it highlight while typing :%s/^function ? I'd also appreciate it if you enable screen keys so we could see what you're actually typing :)
@@semicolonsons Yeah. I'm using neovim so I don't have problems with it. I tried doing what you did btw, but apparently doing :%s/^function/foo/g doesn't match anything for me. while :%s/function/foo/g works fine. Any ideas why the ^ was not working in my case?
@@semicolonsons I learnt it from the help system, ea means earlier and you can move trought different states in your file thank to this command and "later" (I think, I don't use this last one quite often so I don't remember). If you use ea 10m you go back to the state you were 10 minutes ago, if instead of m you use f you move thought save states. You can think of it like a mini git. (stackoverflow.com/questions/18500352/how-to-undo-up-to-last-write-in-vim)
Here's a pretty recent version. I plan on doing a future video where I build it up piece-by-piece. gist.github.com/jackkinsella/aa7374a6832cca8a09eadc3434a33c24
What is happening, how do you get it set up like that! And your prompt, I have heard about customizing your linux prompt, but you must have installed some software.
Errata 4.16: I said "command line mode". It's actually "command mode". Thanks to the great people at r/vim for catching that. Show notes and episode alerts: www.semicolonandsons.com/episode/Advanced-Vim-Workflows
Just curious what you are using for code completion engine? I see you are using fzf for search and this video put me over the edge into trying it. Thanks for the great video!
I'm using vim-lsp to get access to the Language Server Protocol. I've already recorded a video on that and will be releasing it on semicolonandsons.com instead of TH-cam.
Hey @Semicolon&Sons! I have a question. I'm trying to replicate the workflow of using `args` then `argdo`, hoping I can do similar with `vimgrep` and `cdo`. But it doesn't seem like the w on the command from cdo is actually writing the files, so the `cdo` stops and yells at me because there's no write. I am still fairly new to working with buffers, so maybe I'm not understanding why we need to delete the current buffer, or how to do that in order to make the writes effective. But if you have thoughts/have seen this and can think of a correction, I would be eternally grateful!
Yep, for sure. I've already recorded the next four videos, though I plan on hosting most of them on my own website. The problem is that TH-cam doesn't let me modify exiting videos so I can't fix errors. Show notes are here: www.semicolonandsons.com/episode/Advanced-Vim-Workflows I also added a link in the description (should have put that there initially!)
I'm using neovim and i use tab key to switch buffers. But switching happens after a delay, but when i use :bnext and :bprev for switching it works fast. Is there any solution you can suggest?
It may be possible that you have "tab + something else" mapped to another action and vim is waiting to see whether you end up pressing another key or just leaving it at tab. Check your mappings with something with :map
So far all videos displaying the "power of vim" have had me screaming at the screen as they use macros to solve absolutely basic problems that can be solved much better with :%s/pattern/replacement/g (assuming the dev is not a tool and actually knows Regex).
This is the first demonstration I see of actual powerful use macros. Especially since you also demonstrate the power of text objects and arglist.
Well done sir!
PS: my most recent use of macros was selecting certain bits of text and moving them from one file to another. It's suprisingly easy to record a macro that:
1. deletes the entire text object your cursor is on
2. switches window (I had the other file open in the other window)
3. jumps to the bottom
4. pastes
5. comes back to the first window
6. jumps to the next text object to inspect
to sort a file, same procedure but in number 3 I jump with macro a to line marked a (ma) with macro b line marked b etc...
Holy Sh** this is amazing !! I'm only 6 months into VIM and everyday getting new tricks and commands, but looking forward to a decade in VIM !
As someone just getting started with vim, that was amazing to watch! Can you do a video on how you have your vim set up? I mean with all the plugins ...etc.
Im pretty new to vim but so far I really love its capabilities though im no where near this level! The only thing is trying to remember all the keys and wishing I knew more about vim builtin scripting.
Glad to discover your content and thank you for producing it!
As a new Vim user... you're a goddamn wizard!
And here I am thinking VIM can' surprise me anymore. And then there is this video.
A compliment to another man's vim skills is the greatest compliment of them all.
I am humbled.
Excited to watch this tonight, glad to see more content!
I've been using VI since 1997 and that was just nutty.
I always find so much to vim that I haven't discovered yet. The args do and macro thing I must learn to make use of.
You had me already convinced with Schumann, you didn't need to record all those macros!
Splendid job! Efficient & elegant manner combines with the true knowledge for an aesthetics pleasure. High quality content here!
Excelent showcase on actually doing real example on how to use this tools. I often when doing some refactoring try to learn a new way on doing it by using Vim or some cli tool like sed. Never knew I could run a macro on several files like that, and also that example on taking the results of a regexp and pasting on that line. Very good stuff! Keep them going!
Excellent advanced vim tips.
Kindly use screen key so we can see the commands you type.
Many thanks
humm Edvard Grieg for the intro. Looks like you are a man of culture.
Please do more, sir.
vim indent guides looks pretty nice, I might look into it as an alternative to indentLine
Wow this is master tier level skills!
Omg the prozac thing made me laugh. Love the channel name too.
Best Vim's video ever!
Loved the macro explanation! 🙏
Great video! Love to see how others use vim. The best way to learn after one knows the basics. Cool Examples! Looking forward to the next vim workflow video!
god tier content .... instant sub. Thankyou for making this high quality video and sharing it (Y) kudos
Awesome vid 🙌 Excited for some more content!!
Great video, I learned a lot from this video!
Really good vid, please make more vim ones
To help view the output of "git diff", I like to use: git diff | gvim -c set titlestring="output\ of\git\ diff" - &
This was amazing! Thank you for doing this!
Good morning, Sir.
I hope you are doing well. I would like to recommend you to do some videos about the vim's plugins that you use.
Sincerely,
a brazilian friend.
thanks good idea
Mind officially blown!
We really need great refactoring tools like language servers. This way we can have the IDE in vim.
4:00 tl;dr - use `:argdo normal@c` to run macro at register c on all open buffers
What a gem!
Instant subscribe, awesome content!
How can I get the buffer list on the top of the window like yours??
it feels to me as though a sed or awk script would be better for the first 2 examples... but the third vim example is really cool!
Now I see how developers become 10x, my power level is too weak.
Nice channel name bro, reminds me of steinway and sons
Thanks for this one!
How did you set up your config to make it highlight while typing :%s/^function ?
I'd also appreciate it if you enable screen keys so we could see what you're actually typing :)
Aha! Found it: set inccommand=nosplit
@@yujinyuz It's a neovim only thing as far as I know
@@semicolonsons Yeah. I'm using neovim so I don't have problems with it. I tried doing what you did btw, but apparently doing :%s/^function/foo/g doesn't match anything for me.
while :%s/function/foo/g works fine. Any ideas why the ^ was not working in my case?
@@yujinyuz Ah yes. That's because I have `set gdefault` in my vimrc. Here's a good reference: vim.fandom.com/wiki/Search_and_replace
You can actually do it in vim too, `:set hlsearch` iirc, otherwise, check the arch wiki, I recently made an edit to the tips for this.
Good tips.
3:40 If you don't save and use :ea 1f you would be doing the same but without the need of using a plug-in.
Very interested in understanding this.
Can you unpack your command a bit? I must admit I don't understand it (but am super eager to learn)
@@semicolonsons I learnt it from the help system, ea means earlier and you can move trought different states in your file thank to this command and "later" (I think, I don't use this last one quite often so I don't remember).
If you use ea 10m you go back to the state you were 10 minutes ago, if instead of m you use f you move thought save states.
You can think of it like a mini git.
(stackoverflow.com/questions/18500352/how-to-undo-up-to-last-write-in-vim)
@@Megalcristo2 Amazing. You learn something new every day about vim.
I like how you say hate shtee ML because that's clearly my relationship with www
what a cool voice )
Would you mind sharing your vim configuration files? I'd be interested to see them, your setup looks nice!
Here's a pretty recent version. I plan on doing a future video where I build it up piece-by-piece.
gist.github.com/jackkinsella/aa7374a6832cca8a09eadc3434a33c24
@@semicolonsons Thanks, that's great! I would be really interested in that video and probably others too!
This so blown my mind how did you do that ??? my skills in Vim is in beginners i need to learn more from you Thanks!
10 years of practice :)
And enjoyable through every second
This reminds me of emacsrocks, and that if anything is a compliment to a good video.
Never heard of it but I'm very curious to check out what the dark side looks like ;)
Vim, if u you're absolutely beginner
This book "vim from wtf to omg" will be useful for you
took me 30 seconds to subscribe
That made me want to learn vim :)
DOPE AS FAQ
How do you get the alternating background colors for your start-of-line tabs/spaces?
music at the beginning?
i
Great video man! Can I learn what do you use for autocompletion?
I've already recorded a video on the topic so stay tuned. In brief it's a combination of vim-lsp and the asyncomplete plugin.
what kind of editor is it? is it extended vim with plugins?
What is happening, how do you get it set up like that! And your prompt, I have heard about customizing your linux prompt, but you must have installed some software.
Errata
4.16: I said "command line mode". It's actually "command mode". Thanks to the great people at r/vim for catching that.
Show notes and episode alerts: www.semicolonandsons.com/episode/Advanced-Vim-Workflows
I think you misunderstood the correction. Command mode is synonymous to Normal mode, so at 4:16 "Command Line mode" is the correct word to use.
Just curious what you are using for code completion engine? I see you are using fzf for search and this video put me over the edge into trying it. Thanks for the great video!
I'm using vim-lsp to get access to the Language Server Protocol. I've already recorded a video on that and will be releasing it on semicolonandsons.com instead of TH-cam.
Nice video and all but why is your intro a tiny part of Greig's A minor concerto?
You know your tunes! I just like it and it's old enough that I could find recordings that aren't subject to licensing fees.
@@semicolonsons Is your name somehow referring to steinway&sons aswell? xd
@@luukasportfors9414 I wanted to sound fancy and use alliteration at the same time. Plus something something object inheritance.
Hey @Semicolon&Sons!
I have a question. I'm trying to replicate the workflow of using `args` then `argdo`, hoping I can do similar with `vimgrep` and `cdo`. But it doesn't seem like the w on the command from cdo is actually writing the files, so the `cdo` stops and yells at me because there's no write.
I am still fairly new to working with buffers, so maybe I'm not understanding why we need to delete the current buffer, or how to do that in order to make the writes effective. But if you have thoughts/have seen this and can think of a correction, I would be eternally grateful!
Not a vim question, but if I do a git diff on my machine it looks a lot messier than if you do it.
@Aramis Razzaghipour Exactly.
how can you change buffer while the one you're leaving is modified buffer? 3:09
Can't remember but I think I used a key mapping ]b that maps to :bnext
Ummmm the audio sounds like you applied the background noise removal thing in audacity too many times.
Yea I totally know. I've figured out a way to get the audio a tad better in future.
Anyway, hope you enjoyed the work flows :)
@@semicolonsons i do enjoy your work a lot. I love your channel.
@@kronaemmanuel thanks man! I'm curious what world of development do mostly inhabit? What types of software and stacks?
@@semicolonsons I use vim for React and web development mostly.
Can you share your dotfiles? Good to see other best practices
Gladly gist.github.com/jackkinsella/aa7374a6832cca8a09eadc3434a33c24
@@semicolonsons Much obliged - github.com/idvorkin/Settings/commit/8420806df61e0b75eb61681562da79e175025379
Real Chad
Which colorscheme is this?
Solarized I think, with light customization. Working on updating a publicly shareable vimrc
oh wow
Loved the content, is this going to be a reoccurring subject? Looks like you removed the link to your "Show Notes"?
Yep, for sure. I've already recorded the next four videos, though I plan on hosting most of them on my own website. The problem is that TH-cam doesn't let me modify exiting videos so I can't fix errors.
Show notes are here: www.semicolonandsons.com/episode/Advanced-Vim-Workflows
I also added a link in the description (should have put that there initially!)
Hello! Not actually related to Vim, but I'd love to know the name of the music at the start of the video. Best wishes, great content!
Grieg - Piano Concerto in Am
I'm using neovim and i use tab key to switch buffers. But switching happens after a delay, but when i use :bnext and :bprev for switching it works fast.
Is there any solution you can suggest?
It may be possible that you have "tab + something else" mapped to another action and vim is waiting to see whether you end up pressing another key or just leaving it at tab. Check your mappings with something with :map
@@semicolonsons Yes I'm using tab key as completion key for emmet.vim. Thanks a lot
lmao your name is amazing bro
1:50 tips, use "dj" instead of "2dd"
Fawesome thx
Vim rulez
God bless you in Jesus' Name Amen ✝️
Huh?
jesus, loose the echo oO
I know. Working on it. But COVID-19 means I'm stuck recording in my apartment which has big rooms and therefore terrible acoustics.
@@semicolonsons Oh wow, I thought it was an effect you added later on xD Thanks for the vid anyways, nice tactics! :)