@@naowalplayzgames6218 I truly see no benefict in using Mac, you have all the disadvantages of lack of software and the disadvantages of being proprietary.
Ten hefty ladies from Huntsville Alabama had to sit buck nekkid in the nosebleed at the crocodile dun see funeral party (for the full service, half time, and post game Ho-down) just to save a file in their new tui text editor. And it was still more intuitive than fucking Vim.
The talk is great, and many effort has been put in doing it. By watching it I even learned some things I didn't know before like the :earlier command (learning never ends with vim). However, there is one thing which I never understand. Why would someone want to use tmux + vim while vim has buffers, tabs, splitting, :find, and tons of features to make multiple file editing cool. You can even use the :shell command (or :terminal in neovim) to just start a shell or use the power of :make to compile and test your code. Also, why do people always want to transform vim into an IDE with that files tree and everything. I personally find project trees to be useless when vim has the power of :find, or even control P and control T. And I want my vim to be the most lightweight it could possibly be. I want it to load in less than one second, and to never crash. So all the features which are IDE like (some of them using a lot of autocommands and making vim heck of slow) seem really not vim like to me. The only feature that I find useful is file linting and that's basically the reason why now I use neovim with neomake because syntastic is way too slow for me. I see people using vim with all those fancy stuff (like nerd tree or powerbar), and while that is completely okay and you can use it as you want, I struggle to understand the need to make vim that fancy. It sometimes even ends up with people saying "oh yes, vim is powerful, but I stopped using it and started using a vim shortcut plugin with sublime text". If you want to learn vim, I think it is better to dive inside of vim's workflow instead of trying to transform it into a modern IDE. Vim is older than me (created in 1991), and its philosophy is completely different than the philosophy of modern IDEs, so trying to use it like it was one is kind of wasting time and energy, while it would be way easier to just conform to Vim's philosophy. Vim is just so powerful by itself that not many functionalities have to be added Instead of that IDE styled vim, I personally prefer a minimal vim with just the necessary plugins editorconfig/editorconfig-vim to be able to work with other people having other text editors neomake/neomake if you have neovim wakatime/vim-wakatime can be useful if you have an account kien/ctrlp.vim can be useful but I personally think that :find is just as powerful and is shipped with vim other plugins for syntax such as udalov/kotlin-vim depending on the languages you use wikitopian/hardmode can be cool to stop using hjkl and finally I personally like terryma/vim-multiple-cursors which offers the command d of sulime text, because, yes macros could do the same thing, but sometimes, comand d is just way faster.
I agree that a file tree is mostly not useful in vim, however sometimes I just forget what the filename is and I have to see the file system to see what the filename was (happens to me a lot) and I use the tree plugins just for that
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- (increase the first number it finds) Step 4- l (go right 1 character) Step 5- Either press 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@, for example, create 49 more objects so you can have 1 to 50: 49@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. 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 !
So, I'm currently training on vim. UA-cam has some interesting keybindings: j: back 10 seconds, k: pause/play, l: forward 10 seconds This must be by design :)
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.
I just use absolute numbering, so instead of [number]j, I just [number]G. I've tried to get used to rnu a couple times but tbh I can't really see a use for it. Seems like a ymmv to me
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
A simpler macro (no marks) for @25:58 is the following. Start anywhere on the template line and then record this macro (store it in a register): yypf,h^Af';h^Af';;h^A i.e.: yank the entire line (yy), paste it (p), find the comma (f,), move left (h), increment the number (^A), find the single quotation mark (f') but move to the next one (;), move left (h), increment the number (^A), and lastly find the single quotation mark (f'), but move to the third one (;;), move left (h) and increment the number again (^A).
Thanks a lot, this video is awesome! Using Vim since many years now, I still could learn a lot from your lesson. I also got encouraged to watch out for some nice plugins. Great Look 'n' Feel that you implemented.
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.
Literally putting this video on my todo list for the next week... each day I’ll watch and review the pieces you outlined. I’ve been loving vim, and am doing alright with it, but I clearly have much Kung fu to learn. Thank you
God bless this upload! i am quarter way this video and i have learnt a lot, very INFORMATIVE highly recommend this video for anyone starting / intermediate with vim. Am surprised to see the dislikes prolly Emacs fans!
Hey Nick. You're "the man". Thanks to you I switched to tmux (you and a problem with neovim escaping under GNU screen). Also thanks to you and NeoVim video I switched to neovim - it's Great. Thank You! There is only one thinig which I can't understand.. In your "tmux.conf" there is a section "more settings to make copy-mode more vim-like" where you unbind opening square bracket. I hope you know that in Vim you don't have to use "Esc" at all because there is "Ctrl + [" which does exactly the same... Once I have learned that- I stopped using escape completely...
Yea, I usually remember direction: "J"ump down and "K"ick UP... "H"ang-Left, "L"etter-Right VIM cmd-mode uses nearly Every key on your keyboard into bonus FUNCtion keys that give you precision control of your editing. ** Alphabet keys gets tripple use, with Upper/Lower/Ctrl capabilities ** Each key has a mnemonic name, to help remember what it does (list below) ** verb,num,obj,key words form a vocabulary +quick edit phrases for "vi" edit magic. ** the more "fluent" you get with these "vim" phrases, the faster you can get things done. . ### Here is a vi/vim keyword summary, for Upper+lower case features: (a)fter(A)pp-END (b)ack(B)ack.more (c)hange(C)hange>end (d)el(D)el>End (e)nd-word(E)nd.more (F)indX (g)go(#G)Go-line/EOF (h)ang.Left(H)igh.top (i)nsert.B4(I)Nsert@front (j)ump.dn(J)oin.line (k)ick.UP (l)etter.RT(L)ast.Line.shown (m)ark-X (M)iddle.Line.shown (n)ext.search(N)ext.back (o)pen.low(O)pen.up (p)aste.dn(P)aste.up (r)replace.one(R)eplace.many (s)ub-X.char(S)ubstitute.Line (tX)jump-TO-x (Tx)back-TO-x (u)ndo (U)NDO.Line.mult (w)ord.fwd (W)ord.big (x)X-del-1 (X)
Very good tutorial... the way of explaining is awesome... it is like a friend sitting beside me and explaining. Thank you so much for sharing this video.
Try Neovim, you can run asynchronous terminals in it, so you don't need tmux anymore. You can run terminals in Neovim windows just like any other buffer.
This has a nice podcast vibe to it, although this video is 4 years old it would be really interesting if you made more videos where you just showcase something interesting and discuss/explain it with/to your mates
The whole thing you're trying to do @29:40 can be accomplished with only a few keystrokes. Place the cursor on the line you're trying to run the macro on and do: qqyyplllq That macro does exactly what you want it to do and doesn't require messing with markers or any other such silliness.
what is your terminal music manager? I see T Swift is hanging around on the bottom right for a lot of the talk in your terminal. Great video, by the way.
I'm just using Spotify or Apple Music, but I have an AppleScript running and printing the current song in the tmux bar. github.com/nicknisi/dotfiles/blob/1f14af4ef9a2e15886409d02d039b9ef2e6b43db/applescripts/tunes.scpt
John Mark Perocho Are you referring to within vim? That's the airline plugin: github.com/bling/vim-airline. In tmux, I have set up custom styles: github.com/nicknisi/dotfiles/blob/master/tmux/theme.sh
Hi Nick, I have seen the github but there are no instructions on how to set it up. I am new to these concepts, so could you please let me know. Also when i tried to download the tmux on my OS X Sierra, its says build failed. Same with the macvim. Error: url: (22) The requested URL returned error: 404 Not Found Error: Failed to download resource "readline--patch" Download failed: gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
Almost every tmux tutorial shows to unbind and use instead. I really don't understand why. It looks for me that everybody is just repeating this without thinking. is used in Vim to increment numbers. I would really really miss that! is fine for me. Also most Vim users use as alternative , so mapping this to also makes not much sense to me. You type much more inside Vim, than controlling tmux, think about it. Maybe the mapping makes sense if you use the "jk" sequence in Vim to leave insert mode. Nice video.
+Hans Dampf I also use because it works fine. is often seen in the recommendations because a lot of people are moving to tmux from GNU Screen which uses as its prefix.
I say leave ctrl-b for tmux because on occasion I have ssh'ed to another host from within tmux and then used screen on the remote host as a simple way to preserve a session in case of disconnecting.
Hey, this is the best thing on youtube. Best video ever. you should do a version for linux, cuz ATM, i dont ahve a mac OS X machine. Or you could make a seriesthat would walk us through doing this, to our vim, cuz you have like the best dotfiles. Again, Great job
for the macro...it's just a for loop with a replace command...... pasting default lines: yy20p create the iterator (that doesn't pollute the text): :let a=1 create a macro "q" that replace "0" with the iterator: qq:exec ":s/0/".a."/g" that increments the iterator and down 1 line: :let a+=1jq now do this for 20 lines: 20@q your solution would need to yank and paste from a random register, like with r: "ryw
It's a bit late for this video, but I am curious about something. You have a vim binding/plugin for "Move left one video, and if we're already at the most left, create a new window". What would this be?
Kazathul Imo, if you're actually trying, you can make Vim pretty usable within 2 weeks. Last year I started learning Vim and it took about 2 weeks for me to stop using my previous editor ( which was Notepad++). From that point on, you'll only get better and better at using it. Much like programming, learning to use Vim takes a bit of time and persistence to get good. And there's a high skill ceiling, so you'll always have room to improve.
Cool video. I could not found command d+i+ elsewhere and this is extraordinarily useful for code editing. I prefer ctrl+[ instead of Esc for I don't have to move left hand that much.
Hey there Nick. Really nice presentation with tons of useful tips. One non-techie question tho. Are You using one of built-in zsh themes or a custom one?
Great intro to vim and tmux. I use vim but just got into tmux and found this helpful! I got a question regarding you indent guide. Which plugin are you using? There are a few of them out there that I am evaluating but none of them looks like yours. Trying to settle on one :)
@25:58 I'd probably do substitution with macro in that situation. I kind of have motion sickness. For following { id: 0, name: 'foo 0', description: 'description 0'}, my q macro would be yyp t, "kyiw ^A yiw :s/^Rk/^R0/g ^M In this situation yyp -> copy pastes current line to the bottom at moves cursor to starting. t, -> moves cursor until , meaning 0(first integer) "kyiw -> copies what's under that in k register ^A -> increment value yiw -> yank to default vim register :s/^Rk/^R0/g -> substitution , ^R -> pastes from register , so ^Rk means paste from k register, ^R0 means paste from 0 register(which is where yanked texts are stored) ^M -> enter Purely macro(and motion) based answer would be -> yypt,^Af';h^A3;h^A
I've been using VIM for almost three years but hell... there is still new things worth to watch even in part where you talk about the basics! Great talk! My question is: what's the plugin/method for displaying tabs before each line? I am using spaces and I couldn't find any working plugin to show these spaces (could not imagine why).
As a linux user that 1:50 "we are mac users" broke my heart
Facts. Why use a proprietary unix system when you can use an open source unix system.
@@naowalplayzgames6218 I truly see no benefict in using Mac, you have all the disadvantages of lack of software and the disadvantages of being proprietary.
same :(
You have a great audience. They add so much value to your presentation
I love the form of this video. It is somewhere between friendly conversation/podcast and tutorial, I have never come up to something like this :D
Looks like did a few vids and it's gone
40:56 begins the tmux subject, just in case someone wants to jump to it directly
very cool thanks;
But i would suggest its worth watching first 41 minutes.
In vim you can use ZZ and ZQ in command mode (with shift pressed), instead of :wq and :q!
I'm so used to hitting :w all the time that :wq is practically free.
Ten hefty ladies from Huntsville Alabama had to sit buck nekkid in the nosebleed at the crocodile dun see funeral party (for the full service, half time, and post game Ho-down) just to save a file in their new tui text editor. And it was still more intuitive than fucking Vim.
:command W w
a must
I never get tired of learning more "simple" vim hacks :)
This is awesome!
This is the talk that got me into Vim! Thank you so much, Nick!
The talk is great, and many effort has been put in doing it. By watching it I even learned some things I didn't know before like the :earlier command (learning never ends with vim). However, there is one thing which I never understand.
Why would someone want to use tmux + vim while vim has buffers, tabs, splitting, :find, and tons of features to make multiple file editing cool. You can even use the :shell command (or :terminal in neovim) to just start a shell or use the power of :make to compile and test your code.
Also, why do people always want to transform vim into an IDE with that files tree and everything. I personally find project trees to be useless when vim has the power of :find, or even control P and control T. And I want my vim to be the most lightweight it could possibly be. I want it to load in less than one second, and to never crash. So all the features which are IDE like (some of them using a lot of autocommands and making vim heck of slow) seem really not vim like to me. The only feature that I find useful is file linting and that's basically the reason why now I use neovim with neomake because syntastic is way too slow for me.
I see people using vim with all those fancy stuff (like nerd tree or powerbar), and while that is completely okay and you can use it as you want, I struggle to understand the need to make vim that fancy. It sometimes even ends up with people saying "oh yes, vim is powerful, but I stopped using it and started using a vim shortcut plugin with sublime text". If you want to learn vim, I think it is better to dive inside of vim's workflow instead of trying to transform it into a modern IDE. Vim is older than me (created in 1991), and its philosophy is completely different than the philosophy of modern IDEs, so trying to use it like it was one is kind of wasting time and energy, while it would be way easier to just conform to Vim's philosophy. Vim is just so powerful by itself that not many functionalities have to be added
Instead of that IDE styled vim, I personally prefer a minimal vim with just the necessary plugins
editorconfig/editorconfig-vim to be able to work with other people having other text editors
neomake/neomake if you have neovim
wakatime/vim-wakatime can be useful if you have an account
kien/ctrlp.vim can be useful but I personally think that :find is just as powerful and is shipped with vim
other plugins for syntax such as udalov/kotlin-vim depending on the languages you use
wikitopian/hardmode can be cool to stop using hjkl
and finally I personally like terryma/vim-multiple-cursors which offers the command d of sulime text, because, yes macros could do the same thing, but sometimes, comand d is just way faster.
I agree that a file tree is mostly not useful in vim, however sometimes I just forget what the filename is and I have to see the file system to see what the filename was (happens to me a lot) and I use the tree plugins just for that
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- (increase the first number it finds)
Step 4- l (go right 1 character)
Step 5- Either press 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@, for example, create 49 more objects so you can have 1 to 50: 49@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.
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 !
Loved it! Still relevant in 2021
So, I'm currently training on vim. UA-cam has some interesting keybindings:
j: back 10 seconds,
k: pause/play,
l: forward 10 seconds
This must be by design :)
Press "?" to see even more. You can also try this in the webinterface of gmail. Have fun.
i - to 'minimize' to the corner.
ikr??? The number of times I jumped around the video on accident haha
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.
i use easy motion plugin
I just use absolute numbering, so instead of [number]j, I just [number]G. I've tried to get used to rnu a couple times but tbh I can't really see a use for it. Seems like a ymmv to me
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
This is the best vim tutorial on youtube i've seen so far. Thanks for sharing!
Watched this around 6 months ago, I admit you change my way of editing text since then. Thank you, Nick!!
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
12:49 Jay saying "wow" is all of us
This is the talk that made me try vim. It's been 5 years
A simpler macro (no marks) for @25:58 is the following. Start anywhere on the template line and then record this macro (store it in a register):
yypf,h^Af';h^Af';;h^A
i.e.: yank the entire line (yy), paste it (p), find the comma (f,), move left (h), increment the number (^A), find the single quotation mark (f') but move to the next one (;), move left (h), increment the number (^A), and lastly find the single quotation mark (f'), but move to the third one (;;), move left (h) and increment the number again (^A).
My solution was -> q=> 0 t,^A 2t'^A t}h^A yyp
Now for repeating say 20@q
Edit: a simpler version of your's would be yypt,^Af';h^A3;h^A
Just letting you know this is one of the best presentations of vi/vim I have ever read/watched. I pass this everyone I know.
7 years gone yet this video is so useful.
Much thanks for the video. Always nice to see people explaining how they wield the sword of the gods :) You are guaranteed to learn a few new tricks.
This was one of the most interesting videos I've seen for a long time, thanks a lot
This is by far the best video on Vim on UA-cam. Thanks so much!!
Thanks a lot, this video is awesome!
Using Vim since many years now, I still could learn a lot from your lesson. I also got encouraged to watch out for some nice plugins. Great Look 'n' Feel that you implemented.
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.
I got distracted at 22:59 by my other monitor... But then Ace ventura brought me back.
11/10 presentation.
Literally putting this video on my todo list for the next week... each day I’ll watch and review the pieces you outlined. I’ve been loving vim, and am doing alright with it, but I clearly have much Kung fu to learn. Thank you
I found this tutorial several month ago, Now I code very smoothly in IDE Vim mode.Thanks for sharing.. :)
lol, I wanted to exit when I saw webstorm in the beginning then in 2 seconds realised its a joke. lol, good one. You got me.
If I only get the dot command from this, I still seriously leveled-up my vim game.
The "." command to repeat what you just did is awesome. Did not know it, using it all the time now xD
God bless this upload! i am quarter way this video and i have learnt a lot, very INFORMATIVE highly recommend this video for anyone starting / intermediate with vim. Am surprised to see the dislikes prolly Emacs fans!
Hey Nick. You're "the man". Thanks to you I switched to tmux (you and a problem with neovim escaping under GNU screen). Also thanks to you and NeoVim video I switched to neovim - it's Great. Thank You! There is only one thinig which I can't understand.. In your "tmux.conf" there is a section "more settings to make copy-mode more vim-like" where you unbind opening square bracket. I hope you know that in Vim you don't have to use "Esc" at all because there is "Ctrl + [" which does exactly the same... Once I have learned that- I stopped using escape completely...
58:30 In vim you can ctrl + w + o to close all panes but the current one (where cursor is).
I like ctrl-w s ctrl-w T for a similar effect that preserves your window layout and opens another window for the current buffer in a new tab.
I like ctrl-w s ctrl-w T for a similar effect that preserves your window layout and opens another window for the current buffer in a new tab.
on 5:20 the J is DOWN not UP
Yea, I usually remember direction: "J"ump down and "K"ick UP... "H"ang-Left, "L"etter-Right
VIM cmd-mode uses nearly Every key on your keyboard into bonus FUNCtion keys
that give you precision control of your editing.
** Alphabet keys gets tripple use, with Upper/Lower/Ctrl capabilities
** Each key has a mnemonic name, to help remember what it does (list below)
** verb,num,obj,key words form a vocabulary +quick edit phrases for "vi" edit magic.
** the more "fluent" you get with these "vim" phrases, the faster you can get things done.
.
### Here is a vi/vim keyword summary, for Upper+lower case features:
(a)fter(A)pp-END (b)ack(B)ack.more (c)hange(C)hange>end (d)el(D)el>End
(e)nd-word(E)nd.more (F)indX (g)go(#G)Go-line/EOF (h)ang.Left(H)igh.top
(i)nsert.B4(I)Nsert@front (j)ump.dn(J)oin.line (k)ick.UP (l)etter.RT(L)ast.Line.shown
(m)ark-X (M)iddle.Line.shown (n)ext.search(N)ext.back (o)pen.low(O)pen.up
(p)aste.dn(P)aste.up (r)replace.one(R)eplace.many (s)ub-X.char(S)ubstitute.Line
(tX)jump-TO-x (Tx)back-TO-x (u)ndo (U)NDO.Line.mult (w)ord.fwd (W)ord.big
(x)X-del-1 (X)
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
Super solid video. One of the best vim + tmux videos I've seen. Thanks
Very good tutorial... the way of explaining is awesome... it is like a friend sitting beside me and explaining. Thank you so much for sharing this video.
left down up right
Try Neovim, you can run asynchronous terminals in it, so you don't need tmux anymore. You can run terminals in Neovim windows just like any other buffer.
Of course, the best use of that feature is to run emacs in nvim in emacs.
Not using tmux would be insane
This has a nice podcast vibe to it, although this video is 4 years old it would be really interesting if you made more videos where you just showcase something interesting and discuss/explain it with/to your mates
The whole thing you're trying to do @29:40 can be accomplished with only a few keystrokes. Place the cursor on the line you're trying to run the macro on and do:
qqyyplllq
That macro does exactly what you want it to do and doesn't require messing with markers or any other such silliness.
Thank you. I had to search for this comment. That part of the video was hard to watch.
The :earlier 2 min part blew my mind.
Thanks for teaching me(and others) Vim.
This video is very good, i learn so much. Improving my work efficiency. Thanks~
what is your terminal music manager? I see T Swift is hanging around on the bottom right for a lot of the talk in your terminal.
Great video, by the way.
I'm just using Spotify or Apple Music, but I have an AppleScript running and printing the current song in the tmux bar. github.com/nicknisi/dotfiles/blob/1f14af4ef9a2e15886409d02d039b9ef2e6b43db/applescripts/tunes.scpt
Ok reading this comment means I have to watch the rest of the video haha!
Thanks for this, learned so much about tmux and a nice refresher on some interesting vim!
4:30 its left, down, up, right
I picked up a ton of helpful tricks from this talk. Thank you so much!
This video is Gold! thanks for sharing... Can you share your colored slick status line code? thanks again!
John Mark Perocho Are you referring to within vim? That's the airline plugin: github.com/bling/vim-airline. In tmux, I have set up custom styles: github.com/nicknisi/dotfiles/blob/master/tmux/theme.sh
Wow thanks for the link!!!
Hi Nick, I have seen the github but there are no instructions on how to set it up. I am new to these concepts, so could you please let me know. Also when i tried to download the tmux on my OS X Sierra, its says build failed. Same with the macvim.
Error:
url: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "readline--patch"
Download failed: gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
late to the party but I'm glad to be doing tons of what he is using, but still everything I didn't know... Wow!
56:08 tmux allows for a read-only session via the -r flag since 1.6 (released in Jan 2012).
Great tip for disabling arrow keys in your .vimrc, I also have to do that! 4:32
Vim vs WebStorm:
"Everything should be made as simple as possible, but not simpler." -Albert Einstein
"Stop using quotes" - Albert Einstein
The best presentation about vim
awesome presentation dude u r amazing:)
Almost every tmux tutorial shows to unbind and use instead. I really don't understand why. It looks for me that everybody is just repeating this without thinking. is used in Vim to increment numbers. I would really really miss that! is fine for me. Also most Vim users use as alternative , so mapping this to also makes not much sense to me. You type much more inside Vim, than controlling tmux, think about it. Maybe the mapping makes sense if you use the "jk" sequence in Vim to leave insert mode. Nice video.
+Hans Dampf I also use because it works fine. is often seen in the recommendations because a lot of people are moving to tmux from GNU Screen which uses as its prefix.
+Hans Dampf I use because they are closer to type than
I say leave ctrl-b for tmux because on occasion I have ssh'ed to another host from within tmux and then used screen on the remote host as a simple way to preserve a session in case of disconnecting.
the vim section was very informative to me, thanks nick.
Ran with this and created my own dotfiles repo. Hard to accept the fact that I'll never have problems with a new computer.
Hey, this is the best thing on youtube. Best video ever. you should do a version for linux, cuz ATM, i dont ahve a mac OS X machine. Or you could make a seriesthat would walk us through doing this, to our vim, cuz you have like the best dotfiles. Again, Great job
Sigh, I'mma head into vim now, see you guys on the other side.
20:15 holy shit, didnt know that one !
for the macro...it's just a for loop with a replace command......
pasting default lines: yy20p
create the iterator (that doesn't pollute the text): :let a=1
create a macro "q" that replace "0" with the iterator: qq:exec ":s/0/".a."/g"
that increments the iterator and down 1 line: :let a+=1jq
now do this for 20 lines: 20@q
your solution would need to yank and paste from a random register, like with r: "ryw
It's a bit late for this video, but I am curious about something.
You have a vim binding/plugin for "Move left one video, and if we're already at the most left, create a new window". What would this be?
Leaning VIM is the only right decision I made in my life.
The vim part was GREAT! The tmux was a good intro to what it can do. It did not really show much of how you actually do it.
Good to know I'm not the only one messing my macros 3/4 of the time
thanks for a lot. the tutorial is GOLD!
i have gave up using vim.but your video help me break the while(not using vim)
You're basically running Vimos at this stage ^^
h j k l is left down up right. You had: left up down right
Absolutely amazing video!
Hi Nick, what tool do you use for your slides and presentation?.
Thanks for the nice video.
Hassan Khalid thank you! the slide tool is called Deckset www.decksetapp.com/
Wow, this is the same guy who's dotfiles come at the top whenever I type 'best tmux and vim dotfiles'
lul
31:18 "I've only been using Vim for 3 years".
Only? Vim is intimidating....
Kazathul Imo, if you're actually trying, you can make Vim pretty usable within 2 weeks. Last year I started learning Vim and it took about 2 weeks for me to stop using my previous editor ( which was Notepad++). From that point on, you'll only get better and better at using it.
Much like programming, learning to use Vim takes a bit of time and persistence to get good. And there's a high skill ceiling, so you'll always have room to improve.
This intro is the BEST.
Cool video. I could not found command d+i+ elsewhere and this is extraordinarily useful for code editing. I prefer ctrl+[ instead of Esc for I don't have to move left hand that much.
Absolutely amazing ! Keep up the good work.
what about :%s/... ? (search and replace with regex awesomeness)
+Duncan Mc Dougall %s and g are so sweet.
It's just changed everything till now
Hey there Nick.
Really nice presentation with tons of useful tips. One non-techie question tho. Are You using one of built-in zsh themes or a custom one?
Great intro to vim and tmux. I use vim but just got into tmux and found this helpful!
I got a question regarding you indent guide. Which plugin are you using? There are a few of them out there that I am evaluating but none of them looks like yours. Trying to settle on one :)
Great video! Learnt a lot from this.
I want to ask which vim colour theme are you using??
Thank you. I leant a lot from your great presentation
4:23 i need that as my wallpaper
Lol, it's wrong. up and down is switched.
hey nick, your menu bar has so many items which are so useful.. could you point to what u are using there?
Great presentation and content too. Thanks.
Taylor Swift, Shake it off song... I would try to be mean, but it is actually a good song and this is a free world.
Great video!
He uses keycastr to display the keys being hit. I was able to install it like this:
*brew cask install keycastr*
Hi, nick, what is your plugin ,when you press keyboard and it displayed in the screen at the same time?
7:47 KeyCast
Really nice talk. Thanks for this.
you can practice vim basic commands much better through vimium extension. you can get it installed either on Firefox or Chrome.
@25:58 I'd probably do substitution with macro in that situation. I kind of have motion sickness. For following
{ id: 0, name: 'foo 0', description: 'description 0'},
my q macro would be
yyp t, "kyiw ^A yiw :s/^Rk/^R0/g ^M
In this situation
yyp -> copy pastes current line to the bottom at moves cursor to starting.
t, -> moves cursor until , meaning 0(first integer)
"kyiw -> copies what's under that in k register
^A -> increment value
yiw -> yank to default vim register
:s/^Rk/^R0/g -> substitution , ^R -> pastes from register , so ^Rk means paste from k register, ^R0 means paste from 0 register(which is where yanked texts are stored)
^M -> enter
Purely macro(and motion) based answer would be ->
yypt,^Af';h^A3;h^A
I've been using VIM for almost three years but hell... there is still new things worth to watch even in part where you talk about the basics! Great talk! My question is: what's the plugin/method for displaying tabs before each line? I am using spaces and I couldn't find any working plugin to show these spaces (could not imagine why).
+József Gubicza :set list stackoverflow.com/questions/1675688/make-vim-show-all-white-spaces-as-a-character
Now i understand why HHKB keyboard layout is like the way it is. It was by design
That was awesome! Thanks a lot for this! It's made my work with tmux more effective)
You are my inspiration, awesome demo
This is just admirable..
05:22 typo. Left down up right