Lecture 3: Editors (vim) (2020)

  Рет қаралды 394,720

Missing Semester

Missing Semester

Күн бұрын

Пікірлер: 388
@mayankmishra3875
@mayankmishra3875 3 жыл бұрын
I started using Vim about 4 years ago. I exited today. Thank you, MIT.
@CarlosMafla
@CarlosMafla 3 жыл бұрын
I've been using Vim for more than 10 years and I agree with the lecturer it takes a lifetime to master
@fsouza
@fsouza 2 жыл бұрын
I'm watching this video on emacs and laughing
@shchen16
@shchen16 2 жыл бұрын
lmao
@ghosthunter0950
@ghosthunter0950 11 ай бұрын
@@fsouza bro is living inside emacs. his entire OS is just a bootloader for emacs.
@ericzhang1400
@ericzhang1400 4 ай бұрын
why you exited?
@mnnptl
@mnnptl 3 жыл бұрын
Me : **Standing alone at a corner in a party** Also Me : "They don't know I use vim"
@jiyometrik
@jiyometrik 3 жыл бұрын
*neovim*
@CarlosMafla
@CarlosMafla 3 жыл бұрын
For web development...
@71sephiroth
@71sephiroth 2 жыл бұрын
Story of my life...
@Arkanj3l
@Arkanj3l 4 жыл бұрын
Learning vim on a chalkboard, the madman
@leongurung636
@leongurung636 4 жыл бұрын
You did not watch full video.
@azmigaming1236
@azmigaming1236 3 жыл бұрын
well, actually he used vim on the laptop started on 9:34
@glengonsalves9547
@glengonsalves9547 3 жыл бұрын
@@azmigaming1236 just type vimtutor on your terminal
@JabYoFace
@JabYoFace 8 ай бұрын
I actually learned SQL and programming without a pc in school
@deadmoroz14
@deadmoroz14 4 жыл бұрын
Imagine having an editor so intuitive, that you have to watch a lecture in order to use it. Woah!
@brenchille
@brenchille 4 жыл бұрын
deadmoroz14 I don’t like using it but it is nice to have for quick edits from time to time.
@deadmoroz14
@deadmoroz14 4 жыл бұрын
@@brenchille As a noob I am, I prefer nano. This is what really works for quick edits. Vim could be the most powerful editor ever, but its UX and learning curve still frightens me off.
@Neonb88
@Neonb88 4 жыл бұрын
Imagine studying something useful that's also difficult enough that you have to watch a lecture in order to be productive in it as a career. That couldn't possibly be a good life choice
@kenjirore1400
@kenjirore1400 4 жыл бұрын
@@Neonb88Just go through vimtutor
@LeMeccerino
@LeMeccerino 4 жыл бұрын
Oh no I have to spend an hour in vimtutor to start using extremely productive software. Oh the horror I wonder how gimp will ever recover?
@lanavasilieva117
@lanavasilieva117 4 жыл бұрын
so they are sharing the sacred knowledge on how to exit vim... heretics
@vertigo6982
@vertigo6982 4 жыл бұрын
kids these days dont know how easy they have it...
@earvingallardo1391
@earvingallardo1391 4 жыл бұрын
cynical
@pauldwalker
@pauldwalker 4 жыл бұрын
when I first tried exiting vi, many many many years ago, I got yelled at by the system admins because of all the stopped (^Z) processes on the server taking up all the system memory. good times! good times!
@jnecaise
@jnecaise 4 жыл бұрын
How am I supposed to get my random seeds if the new users know how to exit?
@djhart25
@djhart25 4 жыл бұрын
lolll I took far too long switching from nano to vim simply because my brain couldn't remember this
@RamonGonzalez-f2b
@RamonGonzalez-f2b 10 ай бұрын
Not my business but there's this lady that always comes late whenever I watch any of these lectures. Thanks for listening .. let me focus.
@tvguideondemand
@tvguideondemand 4 жыл бұрын
Change in character is one command I've been wanting for a while! So happy this exists. I've been learning Vim on and off for the last week and that was one I didn't know about. I'm glad I watched this.
@treeislife
@treeislife 4 жыл бұрын
In the early 90s, I went to Northeastern U., just across the river from MIT. I took a similar class like this one. The lecturer was also a TA, however, I was taught to use Emacs and brainwashed to think that Emacs was the only thing (and Lisp) a programmer would need. I was too young to know about the Cold War between Vi and Emacs churches.
@not_ever
@not_ever 4 жыл бұрын
How's your pinky? Do you suffer from any permanent long term effects?
@BantuTu
@BantuTu 4 жыл бұрын
What do you use now?
@cat-.-
@cat-.- Жыл бұрын
Lol my cs prof also a emacs advocate. He went to virginia tech
@l0_0l45
@l0_0l45 4 жыл бұрын
*An entire lecture on VIM! You offended the entire Church Of EMACS!*
@zingg7203
@zingg7203 4 жыл бұрын
Vim Church congrats
@blackhatson13
@blackhatson13 4 жыл бұрын
Need more than one lecture for Emacs 😂
@ivansakal1224
@ivansakal1224 4 жыл бұрын
org mode goes brrrrrrr
@avibrarbrar
@avibrarbrar 4 жыл бұрын
😂😂😂
@MrBetaJacques
@MrBetaJacques 4 жыл бұрын
dudes screw emacs. I will start a bloodfeud with anyone who doesnt love vim
@dmsalomon
@dmsalomon 4 жыл бұрын
Easily the best intro to vim I have ever seen
@BantuTu
@BantuTu 4 жыл бұрын
43:50 a prime example of how the most useful things are usually cloaked in an air of nonchalance, even in documentation.
@bed7496
@bed7496 4 жыл бұрын
repeats the last what again?
@BantuTu
@BantuTu 4 жыл бұрын
@@bed7496 the dot . normal command repeats the last change. The last change is anything you do to change text in the current buffer. Eg, Inside vim on a new line: ^[iChange^M^[.... ^M - Enter ^[ - Escape :help .
@bed7496
@bed7496 3 жыл бұрын
@@BantuTu much thanks :D
@bew
@bew 4 жыл бұрын
dwi and cw have another difference: cw is a single change, and repeating it with dot (.) will repeat the deletion and the inserted change. While with dwi, the repetition will only repeat the inserted text.
@Adolf1Extra
@Adolf1Extra 4 жыл бұрын
dwi is two commands, insert being the last, so indeed dot only repeats that
@arkrusade
@arkrusade 4 жыл бұрын
@@Adolf1Extra No. dwi is a delete command, not an insert command. i in this case follows a text object w, meaning word. Thus, this i means inner, not insert
@TwistedRetard
@TwistedRetard 4 жыл бұрын
@@arkrusade you are correct if you use diw (delete inner word) command but the comments here are talking about dwi (delete word insert).
@arkrusade
@arkrusade 4 жыл бұрын
@@TwistedRetard ah you're right. Mb
@jsteins
@jsteins 2 ай бұрын
​@@arkrusadebew's comment is correct. dwi = delete word, then insert (2 steps) cw = change word (1 step) diw = delete in word (not insert) ciw = change in word (includes insert) daw = delete around word caw = change around word (/w ins) When these things are done as ONE step, then using "." to repeat will work better.
@JohnDegen_aka_Jeehannes
@JohnDegen_aka_Jeehannes 4 жыл бұрын
A really good intro to my favourite editor! I'm not a programmer, but I've used Vim for some 20 years. This is a comprehensive first dive.
@pugboi8017
@pugboi8017 4 жыл бұрын
John Degen you’re not a programmer? Then what do you use vim for
@younlok1081
@younlok1081 4 жыл бұрын
@@pugboi8017 editing files ??
@GOA_Pictures
@GOA_Pictures 4 жыл бұрын
@@pugboi8017 same question
@vertigo6982
@vertigo6982 4 жыл бұрын
@@pugboi8017 He could be a network admin where their life is conf files.
@heroe1486
@heroe1486 3 жыл бұрын
@@pugboi8017 devops or anything involving lots of typing like journalism or writer
@lucianodsb
@lucianodsb 4 жыл бұрын
vim is that text editor you still learn new stuff over the years and improve, even organically by deducting stuff. Macros, the dot command, :!% command and finally :norm are the ones that got me convinced to use it for everything.
@Trazynn
@Trazynn 4 жыл бұрын
Oh boy, this reminds me of Starcraft players having to learn the 'Core' hotkey layout. They learned the game using keys that corresponded to the first letter of the unit ('M' = Marine) until someone figured out that you could just group them all on the left side of the keyboard ('A' =Marine) for faster controls.
@abhishekgururani6993
@abhishekgururani6993 4 жыл бұрын
Thanks Anish, I got started with vim by watching your tutorials...this video was very useful.
@whiskeytuesday
@whiskeytuesday 4 жыл бұрын
Ctrl-[ is mapped to escape by default in vim, which means no annoying rebinding of esc on your os (leaving capslock free to be mapped to ctrl, as G-d intended.)
@damian_madmansnest
@damian_madmansnest Жыл бұрын
The whole point of rebinding Caps Lock to Esc is that you have a quick way to escape to normal mode which you do often in vim. C-[ is hell of a convenient combination to press often. And i wonder what on earth do you need to remap Caps lock to Ctrl for? Emacs?
@ianpan0102
@ianpan0102 4 жыл бұрын
Even after I jump-shipped to Emacs, I still use the vi-emulation (a.k.a. evil-mode) because tbh, vi-style bindings has just become an intuition for editing code and text.
@Hgj-hb9bd
@Hgj-hb9bd 4 жыл бұрын
@ianpan870102 I recognize that logo from somewhere. What is it?
@onkarkalpavriksha8676
@onkarkalpavriksha8676 3 жыл бұрын
I started using vim binding in vscode a month ago. Now it feels unnatural typing without vim. VIM is truly a piece of ART!
@lenpalmeri6228
@lenpalmeri6228 4 жыл бұрын
I used vi alot in the 80's and 90's. Once you get the hang of it, you can move very fast through code. Viva la vi !
@vertigo6982
@vertigo6982 4 жыл бұрын
and now?
@djebbaranon5892
@djebbaranon5892 4 жыл бұрын
80!? Ahha omg u you are legend
@eyesgotshowyo7800
@eyesgotshowyo7800 4 жыл бұрын
How old are you ?
@hamedgholami261
@hamedgholami261 Жыл бұрын
This guy is a really good teacher. Thanks man, really.
@mahipalsingh9361
@mahipalsingh9361 2 жыл бұрын
No matter for how long you use Vim there is something that you can always learn
@kirk0831
@kirk0831 4 жыл бұрын
OMG, it is so helpful. Thank you for making this video to help me learn vim.
@trunc8
@trunc8 4 жыл бұрын
I wish the lecture didn't end XD. Amazing work there!
@StephenMarkTurner
@StephenMarkTurner 3 жыл бұрын
Back in the late 90s, the combo of vim plus an identifier lookup (like ctags) worked pretty well.
@giant3909
@giant3909 4 жыл бұрын
Vim emulation with bindings in favorite IDEs is a really good thing. It's the best of both worlds, you have all the powerful abilities of Vim and the great tools of you IDE. I've been running like that for 2 years and it's great. I also recommend using vimium for chrome and firefox. It has a lot of powerful vim commands and makes your navigation smoother.
@humm535
@humm535 4 жыл бұрын
It gives you the bad parts of your IDE (namely the IDE itself) and close to nothing of Vim except some keybindings and modal editing.
@БарометрАтмосферный
@БарометрАтмосферный 4 жыл бұрын
There're most of languages have autocompletion in Vim (that means "power" from Latin). I use Vim for R and .netcore development. U must to trying "Vimium C" fork from one chinese man with many extended functions such as dark mode for Vomni, close tabs / cleaning history from Vomnibar, same Vimium navigation in PDF. But in Chrome not read headers of Tabs sleeping by TabSuspender.
@TehGettinq
@TehGettinq 4 жыл бұрын
That defeats the purpose of staying in your terminal. Just use nvim + tmux and take a few hours to configure your nvim properly.
@heroe1486
@heroe1486 3 жыл бұрын
@@TehGettinq Or just use a tiling window manager if you aim to have a keyboard driven experience and ditch tmux ( unless you need sessions and other non tiling related stuff )
@Yotanido
@Yotanido 4 жыл бұрын
Instead of rebinding caps lock, you can also use C-[ instead of ESC. C-c works, too... sort of. There are some caveats with C-c and I wouldn't recommend using it. It breaks some plugins and might require some additional configuration to behave more similar to ESC.
@ahmed.ea.abdalla
@ahmed.ea.abdalla 2 ай бұрын
is there a free open source software to use vim keybindings for the entire macOS?
@ItzGanked
@ItzGanked 2 жыл бұрын
should I force myself to go through the pain of getting the muscle memory of all these commands or tailoring it to my needs or just be left curve vs code user?
@fhajji
@fhajji 4 жыл бұрын
I've learned vi's precursor ed in the Old Days(tm), when Curses terminals weren't common yet. vi, nvi, and then vim, were huge improvements in terms of user-friendliness. But even today, I still use ed (or vim in ex mode, just start vim with its alternate name ex) when dealing with extremely low-bandwidth or high-latency connections. Configuring those remote machines with ed/ex is extremely snappy, compared to anything fully visual like vim. Oh, and of course sed(1) rules as well. This may seem like a very exotic use of vim, but hey, thank $DEITY that ed/ex mode is still around. Great to see a vim lecture on KZbin in 2020.
@severgun
@severgun Жыл бұрын
vim have normal mode not because "this is whole new world and programing language", but just more pragmatic reason. There is not enough hotkeys(reasonably ergonomic hotkeys) if you keep letters to work as text input. That is why you need to have modes.
@doplydo-6623
@doplydo-6623 2 жыл бұрын
How could I work on Jupyter Notebooks in a command line fashion ?
@優さん-n7m
@優さん-n7m 2 жыл бұрын
I still do not fully understand if I should consider picking up Vim. I am a hardware engineer and mostly write VHDL.
@mishasawangwan6652
@mishasawangwan6652 4 жыл бұрын
it’s true: if you know vim well enough, you can edit at the speed at which you think.
@TrilokD
@TrilokD 4 жыл бұрын
Actually you can edit at the speed at how fast you think but your typing speed just has to compliment it, so, I can do it. ¯\_(ツ)_/¯
@KieranDevvs
@KieranDevvs 4 жыл бұрын
@@TrilokD By that logic, you don't need Vim, as long as your typing speed is fast enough, MS Notepad can achieve the same thing.
@TrilokD
@TrilokD 4 жыл бұрын
@@KieranDevvs No mouse ( less joint aches ) and portability are the two main reasons I use vim and to be practical, MS Notepad? Really? Okay, I don't use notepad because it lacks FEW of the features or facilities that Vim provide me.
@KieranDevvs
@KieranDevvs 4 жыл бұрын
@@TrilokD I was being sarcastic, re-read the comment.
@TrilokD
@TrilokD 4 жыл бұрын
@@KieranDevvs 👍
@MichaelS-em8id
@MichaelS-em8id 4 жыл бұрын
i think vim is absolutely insane for efficiency after watching, i always found it cumbersome switching windows to go from terminal to vs code. i think i'll actually go through the growing pains of learning the basic commands to navigate through my code.
@bepd
@bepd 4 жыл бұрын
vscode has a built-in terminal you can jump to with ctrl+`
@artemkashkou274
@artemkashkou274 4 жыл бұрын
It's not insane! If we look just at the side of coding apps then IDEs (from jetbrains for example) can give u a pretty good efficiency. Sometimes people learn vim + fast typing then they think that they are superefficient but the same time everything they do is just playing the fucking piano on a keyboard
@TehGettinq
@TehGettinq 4 жыл бұрын
@@bepd a better option is to simply use tmux.
@daleowens7695
@daleowens7695 4 жыл бұрын
Command mode also gives you shell access, eg :!ls. Adding the '!' to anything in command mode causes VIM to shell out. I get a lot of mileage from '!' and ctrl-z and fg when going back and forth of VIM and the shell.
@coo463
@coo463 4 жыл бұрын
@@bepd to do this in vim use :term But there are other options that also work like using a manager like tmux or as somebody said bellow using ctrl-z and fg. Or opening anther tab. Each method is nice in its own way.
@chudq
@chudq 4 жыл бұрын
Not sure in the last part of python code, 42:38, the line numbers are not in sequential order? and 11 is off to the edge of left side.
@coo463
@coo463 4 жыл бұрын
He also has relative line numbering on. It can be useful for moving around. Only the line he is on shows the actual line number the others count up and down from that.
@Skiamakhos
@Skiamakhos 2 жыл бұрын
What's the difference between words and WORDS forward though?
@Kqzz
@Kqzz 4 жыл бұрын
I actually need to learn vim so bad now. I never knew how slow I was using vscode.
@badassnamed8007
@badassnamed8007 4 жыл бұрын
37:33 I still don't get it, how to shift from .md to (.py and shell)
@sebkoller
@sebkoller 4 жыл бұрын
He uses tmux, a terminal multiplexer
@badassnamed8007
@badassnamed8007 4 жыл бұрын
@@sebkoller thanks, dude
@RushilKasetty
@RushilKasetty 4 жыл бұрын
Ah, this class looks great. We have a class like this at my university, it's called Computer Science Pragmatics.
@Beetless
@Beetless 4 жыл бұрын
chairizard
@zombiesalad2722
@zombiesalad2722 3 жыл бұрын
@@Beetless B
@bhavinmoriya9216
@bhavinmoriya9216 3 жыл бұрын
could I set up auto complete?
@rareloto
@rareloto 3 жыл бұрын
i never knew vim was this powerful switching to vim is going to be exciting
@atidyshirt
@atidyshirt 3 жыл бұрын
Would like to hear an update on this
@I_SEE_RED
@I_SEE_RED 2 жыл бұрын
Update?
@Kokurorokuko
@Kokurorokuko 9 ай бұрын
he's dead
@orlevitas2944
@orlevitas2944 4 жыл бұрын
Great lecture! Could you please give a link to the to the survey in stackoverflow on VIM (3:49)
@swapnilg.5996
@swapnilg.5996 4 жыл бұрын
it is available in the course notes : missing.csail.mit.edu/2020/editors/
@alandmunk3h
@alandmunk3h 4 жыл бұрын
How do I move the cursor to the left when in insert mode, if I have used the advised ~/.vimrc which disables the cursor keys.
@DutchFakeTuber
@DutchFakeTuber 4 жыл бұрын
At the bottom of the ~/.vimrc file you can find the lines that start with inoremap. Simply remove these lines (or mark them as comments) and you should be good to go! In normal mode however, the blocking of the arrow keys still persists.
@Marshblocker
@Marshblocker Жыл бұрын
@@DutchFakeTuber Is it bad practice to use arrow keys even in insert mode?
@sirakzeray4543
@sirakzeray4543 4 жыл бұрын
This course has been great
@orlevitas2944
@orlevitas2944 4 жыл бұрын
Great lecture! what software you used to show the key stroke on screen?
@marcorieser
@marcorieser 4 жыл бұрын
Looks like KeyCastr
@tanveeralam3261
@tanveeralam3261 4 жыл бұрын
How to navigate through tab in vim?
@gokukakarot6323
@gokukakarot6323 4 жыл бұрын
Surprise, youtube forward and rewind keybindings are j and l and k for pause
@pauloalmeida2126
@pauloalmeida2126 2 жыл бұрын
That dude doing "programmer's sit up" exercise at 47:22 😂 Jokes aside, that was a phenomenal preso!
@zaheeruddinfaiz7064
@zaheeruddinfaiz7064 3 жыл бұрын
Dear lecturers, can we get Missing Semester 2021? Thanks
@abhijeetsingh2933
@abhijeetsingh2933 4 жыл бұрын
how to save vimrc ? question 2 of exercise
@auricom242
@auricom242 4 жыл бұрын
I'm rolling on the floor because of that one guy taking notes on docs/word about a vim lecture. And no, i'm not laughing at him, i laugh at the irony.
@heroe1486
@heroe1486 3 жыл бұрын
And most of them are certainly on a Mac or Windows using floating windows manager while learning how to get fast with the keyboard using vim, total nonsense, or how to do a marathon while eating McDonald's
@ashishlal5911
@ashishlal5911 3 жыл бұрын
47:23 The chad in the front row is having the time of his life.
@ziakhalid5904
@ziakhalid5904 3 жыл бұрын
Thanks a lot, it helped me a lot learning Vim.
@jsteins
@jsteins 2 ай бұрын
vi & vim effectively turn nearly every key on your keyboad into a Function key, with either a Verb or Noun keyword meaning. (Shifted keys act differently too) As you become more fluent using the verbs, nouns and multipliers together, you can learn to "speak" sentences of instructions to vim, and your editing will become more fluid. Verbs: ( * = verb needs noun for size) a=append, A=append@EOL c=change*, C=Change to EOL d=delete*, dd=del-line, D=Delete to EOL i=insert, I=Insert@BOL J=join line below to this one o=open line below, O=Open line above p=paste text, P=Paste before/above cursor y=yank(copy text)*, yy=yank line Noun+Move (text objects for verb to affect): b=beginning of word, B=Back to space e=end of word, E=End to space f*=find char on line, F=Find char backward gg=top of file, G=EOF, 75G=Goto line 75 h=hop left 1char, H=Highest visible line j=jump down a line k=kick UP one line l=letter to right. L=Lowest visible line m× = mark loc in file by letter, M=Mid line n=next search, N=Next match(back) r× =replace 1 char with ×,R=Rep many char t× =move TO char ×, T× =mv back To × u=undo change, U=undo all changes on line v=visual, V=vis by lines, ^V= vis by block w=word fwd, W=long Word to spaces x=del 1 char (or #mult), X=del char
@jackofnotrades15
@jackofnotrades15 4 жыл бұрын
Great content. Thanks for the upload. Hope this channel continues...😅
@nitc9242
@nitc9242 4 жыл бұрын
Wish my cs professor taught like this.
@abhisheksah
@abhisheksah 4 жыл бұрын
Donald J. Trump they teach like my school teacher
@CaptainAardvaark
@CaptainAardvaark 4 жыл бұрын
Welcome to the learning cliff! And a lifetime of configuring your own personal ultimate config.
@alexmijo
@alexmijo 2 жыл бұрын
So I guess I won't use Vim, since I can't really touch type lol
@daleowens7695
@daleowens7695 4 жыл бұрын
Even if you decide not to use VIM, learning the navigation keybindings are still pretty useful. I suppose more accurately I could say ex-normal mode is what I'm talking about here. Off the top of my head the less, man pages, git log output programs support VIM navigation bindings including search, eg. '/' or '?'. I'm sure I'm leaving out dozens of programs. Pretty much most Linux tui programs support VIM style navigation.
@daleowens7695
@daleowens7695 4 жыл бұрын
Not technically related, but hopefully some newbee would find this helpful; Vim help works with "tags" eg ctrl-] and ctrl-t
@daleowens7695
@daleowens7695 4 жыл бұрын
AND..... All VIM beginners should begin with $vimtutor
@daleowens7695
@daleowens7695 4 жыл бұрын
Reducing the key repeat on hold timeout and increasing the key repeat rate is highly recommended to get faster scrolling.
@its1110
@its1110 4 жыл бұрын
Yep, Emacs does more. But how often do you need those bits. Vi(m) is just a superb middle-of-the-road. Better than middle-of-the-road. I don't even use half of what it can do and it is grand.
@heroe1486
@heroe1486 3 жыл бұрын
Emacs isn't a text editor, it's a full distribution that can even kinda replace your window manager on Linux, that's like comparing a car seat to an entire car
@jeetadityachatterjee6995
@jeetadityachatterjee6995 4 жыл бұрын
You use different programs to write essays and code? This was brought to you by the Emacs gang
@not_ever
@not_ever 4 жыл бұрын
No I use vim for both...
@marksmod
@marksmod 4 жыл бұрын
does someone know if one can map caps-lock+key (for example caps-lock+"f") to Escape, without X11 keyboard shenanigans (see sidenote at bottom of post)? That is, directly in vim or emacs? [sidenote] (you can set caps-lock to mod4 and then map the mod4 level to certain keys, but for who knows why not to escape and other special characters. I use a programmable keyboard, a vortex keyboard, to map Caps-lock+"a" to mod4+ctrl, leaving all other keybindings still intact, so for example if you bind mod4+l to left-arrow key, and then press mod4+"a"+"l" at the same time (not a chord) then it would be synonymous to pressing ctrl+"left key", which is, in my opinion often times faster than allot of the vim or emacs chords. I also bind mod4+"x" and mod4+"c" to "end" and "home" keys. Oh, and things like Shift+mod4+"a"+"l" are also possible which would be synonymous to Shift+ctrl+"left arrow". This alone enhances "edit mode" for me considerably, though it doesn't quite suffice for moving very quickly between parts in a single document, language dependent )
@TehGettinq
@TehGettinq 4 жыл бұрын
Idk if that will help you, but on ubuntu in the settings theres a one click option to literally remap escape to caps lock. Its not a vim thing in this case but a distro thing, they put it by default because they know that the escape key is far. Btw for vim you can use ctrl [ (thats the same as escape and thats the most "vim thing" to do to) but i find having caps lock as escape is nicer, also useful outside of vim.
@astropgn
@astropgn 4 жыл бұрын
I am of the opinion that the editor matter less than what he conveyed at the beginning of this lecture. One thing is to try to write code in programs that have very few features. Another thing is to compare full feature editing tools tuned to the sole purpose of writing code. Yeah, efficient people who uses VIM do it very efficiently... so as efficient people writing in visual studio or their favorite IDE. I didn't buy the argument that at 20 hours will get the same speed and then forward you will see improvement. We see improvements on every tool we have expertise. The one argument in favor of vim, in my opinion, is to be able to efficiently work when you cannot control the environment. If you write a lot of code remotely on the cloud, for example, or if you have to access someone else's computer but they don't have the software you use. Otherwise, you can get the same level of optimization with any other editor. Whenever I see someone saying that it is inherently more efficient and practical to use vi, I think it is just confirmation bias .
@TehGettinq
@TehGettinq 4 жыл бұрын
You will definitely edit text way faster in vim/nvim than in any other editor/ide. Its not even close to being comparable. Does it matter? probably not really.
@astropgn
@astropgn 4 жыл бұрын
​@@TehGettinq I don't think it is an easy statement to accept. First, people can get very proficient with their set of tools. Blind people using assistive aids can navigate through their phones as fast as non blind people for example. So it could be, at least theoretically, that very proficient vim users do as well as an equivalent non vim user that are also experienced users of their set of tools. Hard to know for sure, but also hard to deny it as well. It is hard even to test this. Yeah, one can show a workflow where vim is incredibly faster than any other method... But nitpicking a couple or dozen of cases while ignoring the entire universe of cases the industry demands does not prove anything. Another way to think about it is that the market tends towards efficiency of resources. If vim was really that much better at delivering productivity, the market would tend to make non vim editors obsolete (no company uses punch cards anymore). This does not happen. What we see is a spectrum of tools used by a spectrum of users. This makes me believe two things: First, many of these tools could each one be better at specific set of tasks, but none being better overall, and second, the cost of learning and getting experience with a specific tool might damage productivity as a whole, which makes the industry tends towards an equilibrium between users that use vim and users that don't. This would explain the distribution and there would be no reason to argue in favor of one or another like that. In either case there is no indication of superiority.
@Qladstone
@Qladstone Жыл бұрын
​@@TehGettinqYou may be able to edit text faster, but can you do full-scale refactoring with IDE scan for usages, instant creation of getter/setter methods, step-debugging with live evaluation of arbitrary expressions at any line you want, instant scroll of all usages of a method/variable/class, alongside many powerful features of a commercial grade IDE like Intellij IDEA? Maybe you could configure all of those things, but surely not in 20 hours. More like 200 hours of trial and error and frustration probably, and still not get the desired effect. Not to mention you can do pretty much everything in IntelliJ IDEA with keyboard shortcuts. I pretty much never have to touch my mouse when using IntelliJ IDEA.
@TehGettinq
@TehGettinq Жыл бұрын
@@Qladstone yep, can do.
@leonardopikachu343
@leonardopikachu343 4 жыл бұрын
Alright, i still don’t understand why this will make me more efficient editing code, compared to, say, sublime.... or compared to using a mouse..... i get it if you are in a Linux system and vim is the only editor available... but if you are using a Mac or windows machine, why vim?
@rhaeyx1076
@rhaeyx1076 4 жыл бұрын
In my experience, using vim with touch typing would increase your efficiency by a lot. It takes time to get used to it though. But as you spend more time programming, you get kind of annoyed when you need to reach for your mouse or the arrow keys to select something a few lines above, because with vim you can just switch to visual mode and use the hjkl keys to navigate which are keys that are already near your fingers.
@Duiker36
@Duiker36 4 жыл бұрын
Tbh, the differential isn't worth it. Vi users tout the "code as fast as you think" bit as a selling point, but the truth is that most programmers need to learn to think and type slower, not faster. The real value of Vi (or Emacs or Nano) is that virtually every standard server will have it. Pushing mouse inputs through an ssh tunnel to the other side of the world is inefficient at best, and the weight of a graphical interface makes it non-ideal. And even that is less and less of an issue, because editing a file on a server probably suggests you're doing something wrong, and as the industry's standards have improved, the need is just rarer and rarer. I personally use vim because that used to be a real concern (a company I used to work at preferred us all work off development environments located on company servers, so you'd have to ssh in to do anything to begin with), and now it's just a habit. The real takeaway that I feel this class didn't advocate strongly enough for is this: pick your tool, and learn it well. If it's vim, great. If it's vscode or intellij, great. Learn its quirks, how it thinks, why it makes what choices it does, how to get it to do all sorts of stuff. And also learn its limitations. Vim will always be terrible with a visual programming language, for example. But the point is that, if a tool is in your toolbox, be good at the tool. But pick one. It doesn't have to be the best. It just has to be _your_ best.
@leonardopikachu343
@leonardopikachu343 4 жыл бұрын
Michael Chui that makes a lot of sense. appreciate your reply, big time!
@daleowens7695
@daleowens7695 4 жыл бұрын
@@Duiker36 Most Linux distros I've encountered don't have emacs installed by default. I could be wrong, but I seem to recall needing to install it whenever I've wanted to use it.
@coo463
@coo463 4 жыл бұрын
As you learn more, there are things that are far more efficient in vim, Sorting code, putting variable s into columns, removing duplicate lines, recording macros and say a couple keystrokes to repeat that macro a thousand times. Plus most text editors don't have a dictionary built in, the ability to add a thesaurus, there are allot of things that other editors just don't do well, or at all. But it depends on how somebody uses it, if they use it like a regular text editor and don't learn the features, there probably won't be much benefit.
@rudhisundar
@rudhisundar 4 жыл бұрын
Thanks, I still learned some more tricks! H, L, M: those are great! And also for "o" command.
@pauldwalker
@pauldwalker 4 жыл бұрын
after 30 years, I am still learning vi/vim tricks.
@androidemulator6034
@androidemulator6034 4 жыл бұрын
how to show the key presses like yours
@MissingSemester
@MissingSemester 4 жыл бұрын
Anish is using KeyCastr (github.com/keycastr/keycastr)
@MrDrewluna
@MrDrewluna 4 жыл бұрын
if only my professor taught me this thing, i would have gotten to cs much earlier. my professor taught us html using .txt file , just changing the ext. name
@willd0g
@willd0g 4 жыл бұрын
Geeez I would have never picked up programming then haha
@SirLightfire
@SirLightfire 4 жыл бұрын
32:19, "And that can select rectangular blocks of text. So I bet this is something your old editor couldn't do" Actually, vscode has that (in two variants). Holding down the middle mouse button allows for rectangular block select, and `ctrl + shift + alt + arrow key` is a multicursor select (not sure that's a default keybinding). Multicursor select is really useful, because you can edit multiple lines at once. I find it really useful for editing parameters to repeated function calls, or lining up code vertically
@jeannepindar5672
@jeannepindar5672 3 жыл бұрын
Notepad++ can also select blocks like that, using alt-left mousebutton
@ajayrajan8882
@ajayrajan8882 4 жыл бұрын
To save and quit simultaneously you can ESC - > :wq
@queijocoalhofps
@queijocoalhofps 4 жыл бұрын
Shift+zz is more easy
@XGD5layer
@XGD5layer 4 жыл бұрын
:x works too
@jayanths1221
@jayanths1221 4 жыл бұрын
Honest question, is there any reason one would want to use Vim over a more intuitive and less complicated text editor like VS Code?
@RohitSharma-ji2qh
@RohitSharma-ji2qh 4 жыл бұрын
Sometimes, you work on big projects when there are 100's of gateways, services running on several servers. All you have Linux terminals to change the shell scripts on those servers. That's where vim comes to rescue.
@LesterFD
@LesterFD 4 жыл бұрын
When you log into server systems with ssh, there is no vs code installed ..
@byakka
@byakka 4 жыл бұрын
Yes. Vim minimizes the time between realizing what you have to change in the text and having it done. When you ‘get’ vim you start looking at your edits as precise tactical actions. You become confident knowing that the changes you’ve made are exactly what you had in mind. Next time you mash the same keys a few times to put your cursor where it needs to be or reach for the mouse to select precisely the portion of the text you need to overwrite know that vim would almost certainly give you a more efficient approach of making the same change.
@antoniodosreisfeitosaneto7553
@antoniodosreisfeitosaneto7553 4 жыл бұрын
VS Code has vi emulators. One reason I believe is the plain existence of the default "normal" mode of vi: the browsing mode being the default. I use vi, VS Code, Visual Studio and Intellij Idea for many reasons. Sometimes in the same day. And today is normal to have many --- really many --- files open at the same time and the way all these modern editors do is that if you press a key it goes into your file. Period. File is changed. And many times a file gets changed by mistake, because I just typed in the wrong window. Sometimes it goes up to git repositories :). And there is no easy way to protect a file. It is easy when you are just reviewing a file for some reason, a demo, a conference maybe, and the file gets changed by mistake. Programmers not always want to change a file. Other thing a miss in the other editors is the Z commands, for precise cursor positioning. When looking up for a string just to key in /string the cursor goes to the point. Then z- and the line is the last on screen, Z. it goes to the middle, Z enter and the text scrolls so the line is the first on screen.
@heroe1486
@heroe1486 3 жыл бұрын
Watch the video
@smithwill9952
@smithwill9952 4 жыл бұрын
Like blackboard and chalk. Sound like my old school. NO Powerpoint, feeling comfortable!
@vertigo6982
@vertigo6982 4 жыл бұрын
I was hoping for a filmstrip with guys from the 80s with neckbeards.
@tomifg
@tomifg 4 жыл бұрын
How satisfying is that clean chalckboard
@dodochi79
@dodochi79 3 жыл бұрын
My god, until now, this is the holy video let me run speed at x1.0, even slower. Respect! BTW, anyone know how to record key stroke on video above on Linux (except Keymon & screenkey) ? Thank you very much.
@cageybee777
@cageybee777 4 жыл бұрын
So, here is the deal: I like the idea about learning vim and all that it has to offer, but for an intermediate or beginning programmer it is probably not as useful. One major thing that other editors like VS Code or Atom offer is code autocompletion. And I know what you're going to say: this too is available in vim. Yes, I know, but I just spent way too much time trying to install that and still ended up without this feature because I got stuck with the stupid installation instructions for Vundle and pathogen when I tried to install jedi-vim. Why is it so complicated? In Atom or VS Code it's already there, especially if you have Kite. This is my 3rd or 4th attempt at vim and I keep getting discouraged. I might give it another shot sometime later if I'll need to write a book or something.
@Aqueelzalla
@Aqueelzalla 4 жыл бұрын
I had the exact same experience... tried couple of times but couldn't get autocompletion work...
@glzr_io
@glzr_io 4 жыл бұрын
Use the vim extension for VS Code and you get the best of both worlds
@GwenHrothgar
@GwenHrothgar 4 жыл бұрын
Or don't use autocomplete and practice memorizing and typing faster.
@TehGettinq
@TehGettinq 4 жыл бұрын
@@GwenHrothgar thats retarded and leads to errors. Its a bad idea. Typing faster isnt an issue.
@rumble1925
@rumble1925 4 жыл бұрын
It's not that useful honestly. I work with guys that use vim emulation, and they constantly mess up which mode they are in and mess up chunks of code. They never use the vi language features in any way that is more complex than what you'd do in a normal text editor. Vim is super powerful... but for writing code it's overkill. I'm way faster in VS Code because I don't need to keep track of anything in my head, I just edit the code as it is on screen.
@jonnym4923
@jonnym4923 4 жыл бұрын
accidentally using vim commands while the youtube window is active... youtube \_(-_-)_/
@vertigo6982
@vertigo6982 4 жыл бұрын
you know there's a vim extension for the browser... :D
@anderjgs1
@anderjgs1 3 жыл бұрын
Great content, nice explanations,thanks.
@alfred.clement
@alfred.clement 4 жыл бұрын
there needs to be a lecture on how to exit vim
@bubbyroosh4038
@bubbyroosh4038 4 жыл бұрын
@@almasfizashaikh6159 You're right, it's just a meme in the community though.
@npt.a.7013
@npt.a.7013 4 жыл бұрын
ZZ
@your_name96
@your_name96 4 жыл бұрын
@@almasfizashaikh6159 ya :q is the standard methods of exiting vim, there are two other methods which I know are :wq and :q! or :qa!. :wq saves the file and quits the Vim window (:wa lets u save and keep working), :q! and :qa! are not recommended though :)
@TehGettinq
@TehGettinq 4 жыл бұрын
@@your_name96 :q! is recommended and very useful. it means you can exit the file without saving changes. Aka edit the file and ignore changes.
@Yotanido
@Yotanido 4 жыл бұрын
@@your_name96 There's also :x, which does the same as :wq. (Well... :x only saves the file if it was actually changed, while :wq does a write even if it is unchanged. This will only be relevant in very niche cases, though)
@dailyDesi_abhrant
@dailyDesi_abhrant 4 жыл бұрын
Why vim and why not vscode or sublime ?
@aishahale5504
@aishahale5504 4 жыл бұрын
Cause its fast also you can use a vim plugin in vs code, if you are just starting.
@achimwasp
@achimwasp 3 жыл бұрын
VS Code with Vim extension is a good compromise.
@TheMrGoodkind
@TheMrGoodkind 4 жыл бұрын
Is there a succinct cheat sheet of all of this?
@trejohnson7677
@trejohnson7677 4 жыл бұрын
Adam Goodkind vimtutor lolol. the wiki.
@FrancisBehnen
@FrancisBehnen 4 жыл бұрын
vim.fandom.com/wiki/
@generosonunezarias369
@generosonunezarias369 4 жыл бұрын
i.imgur.com/YLInLlY.png
@RaymondLHW
@RaymondLHW 4 жыл бұрын
Useful video. I'm recommending to my teenage students ..... though I guess not many of them are interested lol
@LHAnthony
@LHAnthony 4 жыл бұрын
Some might eventually start using it. it took me YEARS of infrequent use to start using it more frequently
@dobriyzhuk9661
@dobriyzhuk9661 4 жыл бұрын
What vim plugins he used? Looks very nice
@MissingSemester
@MissingSemester 4 жыл бұрын
Full list here: github.com/anishathalye/dotfiles/tree/master/vim/pack/vendor/start
@daleowens7695
@daleowens7695 4 жыл бұрын
@@MissingSemester This is an interesting design. I will definitely go through this. What is dotbot. Is it just some custom python and shell that puts stuff where it needs to go? Is it something you've rolled through the years? Pretty interesting at first blush.
@mingnuili5095
@mingnuili5095 3 жыл бұрын
很棒 很有帮助 谢谢你们
@KiraTheUnleashed
@KiraTheUnleashed 4 жыл бұрын
Do you use vim for java development as well ?
@ashrasmun1
@ashrasmun1 4 жыл бұрын
that sounds like masochism tbh, doesn't eclipse have vim plugin?
@humm535
@humm535 4 жыл бұрын
Java sucks, but yes, Vim for everything!
@БарометрАтмосферный
@БарометрАтмосферный 4 жыл бұрын
It's ironically to dev on Java, the fattest language/VM, with the most minimalistic text editor.
@humm535
@humm535 4 жыл бұрын
@@БарометрАтмосферный Vim is by far not the most minimalist text editor; Vim is a very big one. Smaller text editors are, for example, ed(1), ex(1) and sam(1). Vim has stuff like many built-in features and plugins, including tabs&splits, a built-in terminal emulator, syntax highlighting, GDB integration, sessions, an own scripting language, etc.
@Al-gc9ul
@Al-gc9ul 4 жыл бұрын
I use Vim for everything except Java and Scala. For those, nothing beats Jetbrains Intellij IDEA. It also comes with Vim bindings, though I find them not that productive.
@danimoosakhan
@danimoosakhan 4 жыл бұрын
gg - move the cursor all the way to top G - move the cursor all the way to bottom L - move the cursor to last line of the screen M - move the cursor to middle line of the screen H - move the cursor to top of the screen : - move to specified line ^e - scroll up one line ^y - scroll down one line ^u - scroll up ^d - scroll down dd - deletes a line dw - deletes a word x - deletes a char p - paste u - undo 0 - beginning of line $ - end of line ^ - first char of line g_ - last char of line w - moves the cursor forward 1 word b - moves the cursor backward 1 word i - insert mode ESC - Normal mode : - command mode :q - quit a file :q! - force quit :w - writes the changes :wq - write and quit :w [filename] - write to specified file
@adriansrfr
@adriansrfr 4 жыл бұрын
How are c and d analogs?
@ankushm3t
@ankushm3t 4 жыл бұрын
c - change d - delete Change does delete and puts in insert mode. Both modify text in conjunction with movement you provide.
@mohamedaminebenmabrouk
@mohamedaminebenmabrouk 4 жыл бұрын
Great Lecture . Thanks ^^
@yihanxiao175
@yihanxiao175 4 жыл бұрын
Simply great!
@canale_mio_bonaa
@canale_mio_bonaa 3 жыл бұрын
Very informative. Thanks a lot.
@DotYT
@DotYT 4 жыл бұрын
i always close my terminal and lose work bc i have no idea how to exit vim lol
@prakash.vishwakarma
@prakash.vishwakarma 2 жыл бұрын
Fantastic vdieo!
@abdoulayebalde2139
@abdoulayebalde2139 4 жыл бұрын
Very nice lecture ☺
@archibaldchain1204
@archibaldchain1204 4 жыл бұрын
Is this course for first-year cs students?
@netbotcl586
@netbotcl586 4 жыл бұрын
yes, it is pretty suitable
@TheTurtleOfGods
@TheTurtleOfGods 4 жыл бұрын
no it's for your mom on youtube
@EliteTester
@EliteTester 3 жыл бұрын
lmao he had anti-arrow key keybinds in insert mode
@daya455
@daya455 4 жыл бұрын
Great class. Thanks.
@SanjitKumar-kh1hj
@SanjitKumar-kh1hj 4 жыл бұрын
The guy sounds super polite
@Nyocurio
@Nyocurio 4 жыл бұрын
Learning text editors from a blackboard. These students have a bright career in front of them.
@Praveenkumar-vg3pn
@Praveenkumar-vg3pn 4 жыл бұрын
nice explanations . thanks!
@GlobalYoung7
@GlobalYoung7 2 жыл бұрын
Thank you 🙏
@martinprochazka3714
@martinprochazka3714 4 жыл бұрын
Came here for my daily dose of Nano users' tears, left with my mind blown upon discovering "dot" command.
@ShaileshDagar
@ShaileshDagar Жыл бұрын
A fun lecture.
Lecture 4: Data Wrangling (2020)
50:04
Missing Semester
Рет қаралды 167 М.
Lecture 6: Version Control (git) (2020)
1:25:00
Missing Semester
Рет қаралды 688 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Mastering the Vim Language
36:20
thoughtbot
Рет қаралды 619 М.
Lecture 1: Course Overview + The Shell (2020)
48:17
Missing Semester
Рет қаралды 768 М.
Lecture 2: Shell Tools and Scripting (2020)
48:56
Missing Semester
Рет қаралды 310 М.
This VIM trick BLEW MY MIND
6:37
typecraft
Рет қаралды 64 М.
Why I Cant Stand IDE's After Using VIM | Prime Reacts
17:51
ThePrimeTime
Рет қаралды 406 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 158 М.
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 913 М.
Learning Vim in a Week
23:51
thoughtbot
Рет қаралды 467 М.
Simple Code, High Performance
2:50:14
Molly Rocket
Рет қаралды 273 М.
My Favorite Vim Tricks
14:39
MAKC
Рет қаралды 186 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН