text
stringlengths
0
2.02k
[330.62 --> 338.02] of control shift control alt control alt shift and vim has basically none of that and that for me is the
[338.02 --> 342.48] most important difference between vim and other editors it's input efficiency in terms of keystrokes
[342.48 --> 348.64] and a really easy way to sort of see a summary of that is in vim i almost never hit control
[348.64 --> 353.46] i never hit alt if there are keystrokes that require alt i don't even know them and i rarely
[353.46 --> 360.52] hit shift so most of my editing is normal mode which is the mode that vim boots up in and just
[360.52 --> 366.40] hitting the letter keys to do things in punctuation and that is very different from any kind of remotely
[366.40 --> 372.02] quote-unquote mainstream editor did you know that going into it or did you did someone say vim's great
[372.02 --> 378.16] for rsi or how did you know that uh i had a bit of a scare is what caused me to take that path and
[378.16 --> 382.32] it turned out i think honestly i probably just overused a muscle or something it was sore which
[382.32 --> 386.78] is a common yeah way to think you have rsi when you don't um so that went away but you know having
[386.78 --> 392.42] had that scare i thought if that was if that was my rsi coming in permanently it would change my life
[392.42 --> 397.06] right i mean it's it's a major thing so i decided to do something about it and vim is what i did
[397.06 --> 402.02] julia has been using vim for so long that she couldn't even remember what initially drew her in
[402.02 --> 407.60] suz was also well aware of the editor for a while but she only dove in somewhat recently i've always
[407.60 --> 414.50] sort of messed around with rented linux vps's and when it's your own box you tend to do all the dodgy
[414.50 --> 420.50] stuff you know like you do all the cowgirl stuff on the servo like you modify your nginx config live
[420.50 --> 425.32] and things like that and usually that's done in a shell session so really the most practical
[425.32 --> 430.52] options that you have are something like nano or emax or vim or vi and it's installed out of the box
[430.52 --> 436.10] on so many linux machines and so it's just always there and so usually i would pick it up if i needed
[436.10 --> 440.80] to use it and it was usually within that that context of just like messing around in linux without
[440.80 --> 446.80] some kind of display drivers or gui to be honest nothing about the experience itself made me want to
[446.80 --> 452.32] pick it up you know i i knew how to go into insert mode and get out of insert mode and sometimes
[452.32 --> 456.94] depending on the machine you could actually get away with using the arrow keys instead of j and k and
[456.94 --> 461.98] things like that i'd been curious and felt that it was valuable to learn properly and i knew other
[461.98 --> 466.92] developers and colleagues who used it but i just never really felt motivated enough at the time which
[466.92 --> 471.64] is why i really only picked it up four years ago suz said something interesting there that i heard from
[471.64 --> 478.06] others as well she said it's installed out of the box on so many linux machines it's just always there
[478.06 --> 482.74] that is definitely a strength and it turns out it's one of the things that suz loves the most
[482.74 --> 487.94] about vim because of the ubiquity you end up in the scene from jurassic park where it's like this is
[487.94 --> 491.68] i know this and so you know if you have to do something really quickly on a raspberry pi or
[491.68 --> 495.20] something you're just like oh i i know this i can just do this really quickly and women it's great
[495.20 --> 499.76] and so that's the dream what i also like about it is that because it is on everything it can be as
[499.76 --> 505.02] simple or customized as you like the biggest sort of personal virtue for me about it is that
[505.02 --> 511.20] i have a really bad short-term memory find it very difficult to hold a buffer in my head of like
[511.20 --> 515.32] what code i need to write next sometimes i have to pseudocode things out just so i remember the
[515.32 --> 519.50] steps of like what i'm doing if it's complex and even just changing your mind about something and
[519.50 --> 524.02] rewriting it getting the code out of my brain and onto the screen in front of me like as fast as
[524.02 --> 529.36] possible actually really helps me not be so overloaded and it's actually far less exhausting for me
[529.36 --> 537.58] and because vim is designed to train your muscle memory to do very efficient you know shortcuts to
[537.58 --> 542.64] make changes in your code it is it is very targeted towards that as compared to kind of clicking around
[542.64 --> 547.32] with a mouse or just having like maybe some a smaller amount of shortcuts it's designed in a way to just
[547.32 --> 552.76] help you achieve that much faster and i'm not really one of those productivity porn people but when
[552.76 --> 559.04] you pitch it in the case of just finding coding far less frustrating it's been hugely valuable for me in that
[559.36 --> 564.54] i guess one of the things i love most about it is the the grammar the um slightly funky way of doing
[564.54 --> 570.14] things where like in most text editors you you select some text usually by like clicking with the
[570.14 --> 575.66] mouse or double clicking or whatever and then having selected the text you then run some operation on it
[575.66 --> 580.22] whether that's just deleting it or wrapping it with something or whatever whereas in vim it's kind of
[580.22 --> 584.02] the other way around you start by saying i'm going to delete something and then you say what you're going
[584.02 --> 588.60] to delete so it's a little bit back to front and it very much feels like a grammar it's like
[588.60 --> 594.34] you know you have in in spoken languages you have ways that you can assemble you know the verbs and
[594.34 --> 600.26] the nouns and so on and with vim you have these operators and these motions and i just love the
[600.26 --> 605.18] fact that there's sort of an infinite space of combinations i love the fact that you can install
[605.18 --> 610.58] install plugins that add new operators or that add new motions or new text objects and i always feel
[610.58 --> 614.70] like that's kind of like we've got our fixed grammar and it's just like we're adding vocabulary
[614.70 --> 620.74] further expanding the space of operations that can be performed vim is complicated there's a lot of
[620.74 --> 626.84] stuff in there but the thing that makes vim vim is normal mode the letter keys do things without
[626.84 --> 632.80] modifiers it's such a simple thing but everything that is sort of special about vim for me stems
[632.80 --> 638.94] directly from that when you first open up a file with vim typing on your keyboard won't insert any
[638.94 --> 644.30] characters that's because you're in normal mode like gary was talking about normal mode is for doing
[644.30 --> 650.72] non-character insertion things moving your cursor copying and pasting lines manipulating text that's
[650.72 --> 655.34] already there normal stuff like that if you want to insert characters you have to switch to insert
[655.34 --> 661.38] mode this causes confusion to new vim users because it's backwards from what's expected it can make you
[661.38 --> 666.38] feel dumb because here you are in a text editor and you can't even get the thing to edit any text
[666.38 --> 671.20] but it is one of those things that makes vim vim and once you grok it it actually makes a lot of
[671.20 --> 676.54] sense drew struggled with this concept like most of us do but he came up with a great analogy for vim's
[676.54 --> 680.82] different modes that may help you make more sense of it the point where it starts to make sense really
[680.82 --> 687.60] is when you accept the modal nature of vim and for me i feel like the point where it started making
[687.60 --> 694.46] sense was kind of where i started to see those trips into insert mode and back out again as being well i draw
[694.46 --> 699.96] an analogy with the way a painter works i like to compare normal mode which is the default mode in
[699.96 --> 704.44] vim as being just like a painter with you know their paintbrush not touching the canvas whereas
[704.44 --> 709.84] in insert mode it's like your paintbrush is touching the canvas and if you think of every little trip into
[709.84 --> 714.76] insert mode as being like a brush stroke then that sort of modal nature starts to really make sense
[714.76 --> 720.42] and a couple of things that made that make sense to me was one realizing the way the undo command works
[720.42 --> 725.96] you know if you make a trip into insert mode you type some text you pop back into normal mode that's
[725.96 --> 732.38] one little undoable chunk of of work whereas in most text editors where you're generally in something
[732.38 --> 739.56] like insert mode you can type like one word or you can type a sentence and then you can hit the undo key
[739.56 --> 746.88] and how much text it's going to raise is a little bit of a you don't quite know it's like fuzzy yeah it's
[746.88 --> 751.28] fuzzy there's it's a little bit like having some sort of auto save feature that says okay every time
[751.28 --> 755.74] you've paused for more than two seconds we're going to auto save a similar sort of idea where if you've
[755.74 --> 760.72] paused for a certain amount of time maybe we'll put in a little undo stop or wherever you call it and
[760.72 --> 765.16] some text editors don't do that at all you just hit undo and it'll undo everything since i don't know
[765.16 --> 769.28] you moved your cursor or something like that and at that point where i sort of realized okay i'm kind of
[769.28 --> 773.76] thinking about this as like little chunks of undoable changes and it really started to feel like brush
[773.76 --> 778.36] strokes and it started to feel like the idea of being in insert mode by default just felt wrong
[778.36 --> 782.42] it's like well of course the painter doesn't have their paintbrush touching the canvas all the time
[782.42 --> 787.58] that's just weird so having that sort of um being able to think in modes just made everything feel
[787.58 --> 792.24] natural and from there i mean at that point you've still got a lot of vim to learn but at least your
[792.24 --> 798.26] sort of patterns of thought are aligned with vim's ways of making you do things normal mode and insert
[798.26 --> 804.24] mode aren't the only modes in town vim's visual mode is great for selecting multiple characters
[804.24 --> 811.00] lines or blocks of text and then performing some operation on that selection i love visual mode i use
[811.00 --> 816.32] it all the time and so does julia yeah i love visual mode one of my favorite things about visual mode
[816.32 --> 821.24] is do you know how you can go into visual mode and then do like colon exclamation mark and then type
[821.24 --> 827.40] unix command and it'll pipe the stuff you selected into that command and then replace it with the
[827.40 --> 833.36] output of the command no i didn't know that i think that sounds spectacular it's spectacular so
[833.36 --> 837.10] sometimes i'll have like a list that i want to sort and so i'll just select it all and do like
[837.10 --> 842.70] colon exclamation mark sort and then it'll sort it in my editor i don't need to go anywhere i i was
[842.70 --> 846.68] making some like shell scripts i wanted them to have like fancy headings so like i wrote a python
[846.68 --> 852.10] script to generate the headings and then i piped it into the script in vim i don't know i don't use that
[852.10 --> 856.78] so often but every time i use it i'm so happy i've never done that i mean i definitely knew about the
[856.78 --> 861.42] execution of like a shell script you know from the command prompt but i didn't know you could