40:56 begins the tmux subject, just in case someone wants to jump to it directly
In vim you can use ZZ and ZQ in command mode (with shift pressed), instead of :wq and :q!
3:33 Yes, I use "ex" mode LoTs of times, especially for bulk edits, where you want to search through a 5000 line file for a word or pattern, and making 800 edit changes in only 40 seconds. You have a LOT of command-line power on the "ex" :colon: command line, when you need it. A bit of Unix history: The "ex" command line is a complete editor, all by itself... and was the editor used on BSD Unix, way back in 1976, when most terminals ONLY had command line, and printed to paper like a teletype at 300 baud.(no screen) Original Unix was all written that way ! The "vi" editor was written as the vi=visual mode "on top of ex"; but the full "ex" editor still exists at the :colon" command line under vi+vim, with over 50 editing commands that you can use. BTW: As mentioned at 3:33... When you "get stuck" at the "ex" command line, just type "vi' and you should get back to the main screen you are familiar with. The "ex" editor and "vi" editor are the SAME binary program/EXE on Unix (BSD,Sun,HP-UX,AIX,MIPS,AT&T,Altos,3b2a,Ultrix) I've used each of them. The editor program just pays attention to what name you used on the command line when you typed the command to start it... and if you call it "ex" on Unix command line, it starts with command line mode and if you say vi/vim on Unix command line, it starts with "vi" full screen mode. In the original "vi" program capital-Q would switch from "vi" to "ex" editing, and typing "visual" or "vi" in "ex" mode went full screen. I suspect, you felt "stuck" in "ex" mode, after pressing "Q"... although "vim" often re-maps "Q" recently. 4:04 even though I've used "vi" for 30+ years, I consider it "ok" if you want to use arrow keys in "vim". What ever makes YOU feel most effective +comfortable getting work done with the editor is good. ...Learning more efficient ways to get work done is still a good thing. Of course, most Unix machines across the decades had NO mouse attached to VT100 terminals, (before GUI+X-widows) and even after GUI-Unix, "vi" didn't know the mouse was there before Linux. 5:04 You can look here, to see layout of ADM-3A terminal in use at Berkley when "vi" was written. https://en.wikipedia.org/wiki/Vi The VT100 terminals did have arrow keys at the time, but FN-keys and arrows were not standard across different brands, and that is a big reason that 'vi' was written to use ALL available keys as function keys in command mode. 5:35 Many keys are Easier to remember, if you learn them with related key-words in a description. ^F=Fwd page, ^B=Back page, H=High(cursor to top line) L=Low/Last_displayed-Line, #G=Goto line_N ^E=Edge-Up(scroll) ^Y=wYpe-Down(scroll) 36:00 The fugitive plugin looks Good, to let "vim" use "git" features smoothly in sub-windows. Old-style "vi" certainly didn't have anything like that 20 years ago !
A better way to do the whole increasing the number for each data object is to record the following macro: Step 0- Place cursor anywhere before the first number Step 1- yy (copy line) Step 2- j (go down 1 line) Step 3- <C-a> (increase the first number it finds) Step 4- l (go right 1 character) Step 5- Either press <C-a> again or use . to repeat the increase Step 6- Do steps 4 and 5 as many times as it takes to reach and increase the last number; in this case, it's 2 more times. Step 7- Stop recording Step 8- now you can repeat the macro with N@<register>, for example, create 49 more objects so you can have 1 to 50: 49@q
This is the best vim tutorial on youtube i've seen so far. Thanks for sharing!
For moving around, I always leave `'relativenumber'` on, so I can just type [number]j/k instead of having to concoct some particular special movement. Also, look up ctrl-u & ctrl-d to scroll by half a page, and zt and zb to scroll such that the current line goes to the top/bottom of the window. So, if I'm reading the docs for Vim or a plugin, I'll scroll by half-page to keep context, and then sometimes [number]j to a header, followed by a zt to put that header at the top of the window. I hardly ever use i or a. I'll use cc (change the whole line, respecting smart indentation) a lot, or C (change to the end of the line), or I (insert before first non-whitespace) or A (insert after last character). If I need to replace something somewhere in a line, I'll use ci[text object or delimiter] (though I don't remember how much of that is Tim Pope's surround plugin). Or I'll use c[motion], with motions like '4W', or 't[character]'. I use macros, but I probably use things like the :s command more frequently—usually upon a visual selection. I've also started preceding various multi-line manipulations with recursive :g commands for more precise narrowing.
Loved it! Still relevant in 2021
I got distracted at 22:59 by my other monitor... But then Ace ventura brought me back. 11/10 presentation.
This video was amazing, thanks for sharing!! Couple tidbits to add to your repertoire b jumps back a word in vim :qa quits all windows in vim
I found this tutorial several month ago, Now I code very smoothly in IDE Vim mode.Thanks for sharing.. :)
This is the talk that made me try vim. It's been 5 years
This is by far the best video on Vim on YouTube. Thanks so much!!
Fantastic vid, thanks allot Nick, now my I'm hooked to tmux and vim. P.S. Also just found tmux-resurrect plugin for session restore between reboots, can't be happier now. Cheers
This was one of the most interesting videos I've seen for a long time, thanks a lot
12:49 Jay saying "wow" is all of us
I picked up a ton of helpful tricks from this talk. Thank you so much!
Fantastic video, Nick Nisi. Very helpful. I'm just getting back into Vim after a two year lapse and this was a fantastic refresher. I tried tmux once and it was just too much for me. Really helpful. Thank you.
Super solid video. One of the best vim + tmux videos I've seen. Thanks
I liked so much the way that you present and customize Vim !!! it's just very funny and practical at the same time. Thank you Nick
@Amike