I started using Vim about 4 years ago. I exited today. Thank you, MIT.
@CarlosMafla3 жыл бұрын
I've been using Vim for more than 10 years and I agree with the lecturer it takes a lifetime to master
@fsouza2 жыл бұрын
I'm watching this video on emacs and laughing
@shchen162 жыл бұрын
lmao
@ghosthunter095011 ай бұрын
@@fsouza bro is living inside emacs. his entire OS is just a bootloader for emacs.
@ericzhang14004 ай бұрын
why you exited?
@mnnptl3 жыл бұрын
Me : **Standing alone at a corner in a party** Also Me : "They don't know I use vim"
@jiyometrik3 жыл бұрын
*neovim*
@CarlosMafla3 жыл бұрын
For web development...
@71sephiroth2 жыл бұрын
Story of my life...
@Arkanj3l4 жыл бұрын
Learning vim on a chalkboard, the madman
@leongurung6364 жыл бұрын
You did not watch full video.
@azmigaming12363 жыл бұрын
well, actually he used vim on the laptop started on 9:34
@glengonsalves95473 жыл бұрын
@@azmigaming1236 just type vimtutor on your terminal
@JabYoFace8 ай бұрын
I actually learned SQL and programming without a pc in school
@deadmoroz144 жыл бұрын
Imagine having an editor so intuitive, that you have to watch a lecture in order to use it. Woah!
@brenchille4 жыл бұрын
deadmoroz14 I don’t like using it but it is nice to have for quick edits from time to time.
@deadmoroz144 жыл бұрын
@@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.
@Neonb884 жыл бұрын
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
@kenjirore14004 жыл бұрын
@@Neonb88Just go through vimtutor
@LeMeccerino4 жыл бұрын
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?
@lanavasilieva1174 жыл бұрын
so they are sharing the sacred knowledge on how to exit vim... heretics
@vertigo69824 жыл бұрын
kids these days dont know how easy they have it...
@earvingallardo13914 жыл бұрын
cynical
@pauldwalker4 жыл бұрын
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!
@jnecaise4 жыл бұрын
How am I supposed to get my random seeds if the new users know how to exit?
@djhart254 жыл бұрын
lolll I took far too long switching from nano to vim simply because my brain couldn't remember this
@RamonGonzalez-f2b10 ай бұрын
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.
@tvguideondemand4 жыл бұрын
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.
@treeislife4 жыл бұрын
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_ever4 жыл бұрын
How's your pinky? Do you suffer from any permanent long term effects?
@BantuTu4 жыл бұрын
What do you use now?
@cat-.- Жыл бұрын
Lol my cs prof also a emacs advocate. He went to virginia tech
@l0_0l454 жыл бұрын
*An entire lecture on VIM! You offended the entire Church Of EMACS!*
@zingg72034 жыл бұрын
Vim Church congrats
@blackhatson134 жыл бұрын
Need more than one lecture for Emacs 😂
@ivansakal12244 жыл бұрын
org mode goes brrrrrrr
@avibrarbrar4 жыл бұрын
😂😂😂
@MrBetaJacques4 жыл бұрын
dudes screw emacs. I will start a bloodfeud with anyone who doesnt love vim
@dmsalomon4 жыл бұрын
Easily the best intro to vim I have ever seen
@BantuTu4 жыл бұрын
43:50 a prime example of how the most useful things are usually cloaked in an air of nonchalance, even in documentation.
@bed74964 жыл бұрын
repeats the last what again?
@BantuTu4 жыл бұрын
@@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 .
@bed74963 жыл бұрын
@@BantuTu much thanks :D
@bew4 жыл бұрын
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.
@Adolf1Extra4 жыл бұрын
dwi is two commands, insert being the last, so indeed dot only repeats that
@arkrusade4 жыл бұрын
@@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
@TwistedRetard4 жыл бұрын
@@arkrusade you are correct if you use diw (delete inner word) command but the comments here are talking about dwi (delete word insert).
@arkrusade4 жыл бұрын
@@TwistedRetard ah you're right. Mb
@jsteins2 ай бұрын
@@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_Jeehannes4 жыл бұрын
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.
@pugboi80174 жыл бұрын
John Degen you’re not a programmer? Then what do you use vim for
@younlok10814 жыл бұрын
@@pugboi8017 editing files ??
@GOA_Pictures4 жыл бұрын
@@pugboi8017 same question
@vertigo69824 жыл бұрын
@@pugboi8017 He could be a network admin where their life is conf files.
@heroe14863 жыл бұрын
@@pugboi8017 devops or anything involving lots of typing like journalism or writer
@lucianodsb4 жыл бұрын
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.
@Trazynn4 жыл бұрын
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.
@abhishekgururani69934 жыл бұрын
Thanks Anish, I got started with vim by watching your tutorials...this video was very useful.
@whiskeytuesday4 жыл бұрын
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 Жыл бұрын
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?
@ianpan01024 жыл бұрын
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-hb9bd4 жыл бұрын
@ianpan870102 I recognize that logo from somewhere. What is it?
@onkarkalpavriksha86763 жыл бұрын
I started using vim binding in vscode a month ago. Now it feels unnatural typing without vim. VIM is truly a piece of ART!
@lenpalmeri62284 жыл бұрын
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 !
@vertigo69824 жыл бұрын
and now?
@djebbaranon58924 жыл бұрын
80!? Ahha omg u you are legend
@eyesgotshowyo78004 жыл бұрын
How old are you ?
@hamedgholami261 Жыл бұрын
This guy is a really good teacher. Thanks man, really.
@mahipalsingh93612 жыл бұрын
No matter for how long you use Vim there is something that you can always learn
@kirk08314 жыл бұрын
OMG, it is so helpful. Thank you for making this video to help me learn vim.
@trunc84 жыл бұрын
I wish the lecture didn't end XD. Amazing work there!
@StephenMarkTurner3 жыл бұрын
Back in the late 90s, the combo of vim plus an identifier lookup (like ctags) worked pretty well.
@giant39094 жыл бұрын
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.
@humm5354 жыл бұрын
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.
@TehGettinq4 жыл бұрын
That defeats the purpose of staying in your terminal. Just use nvim + tmux and take a few hours to configure your nvim properly.
@heroe14863 жыл бұрын
@@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 )
@Yotanido4 жыл бұрын
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.abdalla2 ай бұрын
is there a free open source software to use vim keybindings for the entire macOS?
@ItzGanked2 жыл бұрын
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?
@fhajji4 жыл бұрын
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 Жыл бұрын
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-66232 жыл бұрын
How could I work on Jupyter Notebooks in a command line fashion ?
@優さん-n7m2 жыл бұрын
I still do not fully understand if I should consider picking up Vim. I am a hardware engineer and mostly write VHDL.
@mishasawangwan66524 жыл бұрын
it’s true: if you know vim well enough, you can edit at the speed at which you think.
@TrilokD4 жыл бұрын
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. ¯\_(ツ)_/¯
@KieranDevvs4 жыл бұрын
@@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.
@TrilokD4 жыл бұрын
@@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.
@KieranDevvs4 жыл бұрын
@@TrilokD I was being sarcastic, re-read the comment.
@TrilokD4 жыл бұрын
@@KieranDevvs 👍
@MichaelS-em8id4 жыл бұрын
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.
@bepd4 жыл бұрын
vscode has a built-in terminal you can jump to with ctrl+`
@artemkashkou2744 жыл бұрын
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
@TehGettinq4 жыл бұрын
@@bepd a better option is to simply use tmux.
@daleowens76954 жыл бұрын
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.
@coo4634 жыл бұрын
@@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.
@chudq4 жыл бұрын
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.
@coo4634 жыл бұрын
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.
@Skiamakhos2 жыл бұрын
What's the difference between words and WORDS forward though?
@Kqzz4 жыл бұрын
I actually need to learn vim so bad now. I never knew how slow I was using vscode.
@badassnamed80074 жыл бұрын
37:33 I still don't get it, how to shift from .md to (.py and shell)
@sebkoller4 жыл бұрын
He uses tmux, a terminal multiplexer
@badassnamed80074 жыл бұрын
@@sebkoller thanks, dude
@RushilKasetty4 жыл бұрын
Ah, this class looks great. We have a class like this at my university, it's called Computer Science Pragmatics.
@Beetless4 жыл бұрын
chairizard
@zombiesalad27223 жыл бұрын
@@Beetless B
@bhavinmoriya92163 жыл бұрын
could I set up auto complete?
@rareloto3 жыл бұрын
i never knew vim was this powerful switching to vim is going to be exciting
@atidyshirt3 жыл бұрын
Would like to hear an update on this
@I_SEE_RED2 жыл бұрын
Update?
@Kokurorokuko9 ай бұрын
he's dead
@orlevitas29444 жыл бұрын
Great lecture! Could you please give a link to the to the survey in stackoverflow on VIM (3:49)
@swapnilg.59964 жыл бұрын
it is available in the course notes : missing.csail.mit.edu/2020/editors/
@alandmunk3h4 жыл бұрын
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.
@DutchFakeTuber4 жыл бұрын
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 Жыл бұрын
@@DutchFakeTuber Is it bad practice to use arrow keys even in insert mode?
@sirakzeray45434 жыл бұрын
This course has been great
@orlevitas29444 жыл бұрын
Great lecture! what software you used to show the key stroke on screen?
@marcorieser4 жыл бұрын
Looks like KeyCastr
@tanveeralam32614 жыл бұрын
How to navigate through tab in vim?
@gokukakarot63234 жыл бұрын
Surprise, youtube forward and rewind keybindings are j and l and k for pause
@pauloalmeida21262 жыл бұрын
That dude doing "programmer's sit up" exercise at 47:22 😂 Jokes aside, that was a phenomenal preso!
@zaheeruddinfaiz70643 жыл бұрын
Dear lecturers, can we get Missing Semester 2021? Thanks
@abhijeetsingh29334 жыл бұрын
how to save vimrc ? question 2 of exercise
@auricom2424 жыл бұрын
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.
@heroe14863 жыл бұрын
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
@ashishlal59113 жыл бұрын
47:23 The chad in the front row is having the time of his life.
@ziakhalid59043 жыл бұрын
Thanks a lot, it helped me a lot learning Vim.
@jsteins2 ай бұрын
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
@jackofnotrades154 жыл бұрын
Great content. Thanks for the upload. Hope this channel continues...😅
@nitc92424 жыл бұрын
Wish my cs professor taught like this.
@abhisheksah4 жыл бұрын
Donald J. Trump they teach like my school teacher
@CaptainAardvaark4 жыл бұрын
Welcome to the learning cliff! And a lifetime of configuring your own personal ultimate config.
@alexmijo2 жыл бұрын
So I guess I won't use Vim, since I can't really touch type lol
@daleowens76954 жыл бұрын
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.
@daleowens76954 жыл бұрын
Not technically related, but hopefully some newbee would find this helpful; Vim help works with "tags" eg ctrl-] and ctrl-t
@daleowens76954 жыл бұрын
AND..... All VIM beginners should begin with $vimtutor
@daleowens76954 жыл бұрын
Reducing the key repeat on hold timeout and increasing the key repeat rate is highly recommended to get faster scrolling.
@its11104 жыл бұрын
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.
@heroe14863 жыл бұрын
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
@jeetadityachatterjee69954 жыл бұрын
You use different programs to write essays and code? This was brought to you by the Emacs gang
@not_ever4 жыл бұрын
No I use vim for both...
@marksmod4 жыл бұрын
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 )
@TehGettinq4 жыл бұрын
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.
@astropgn4 жыл бұрын
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 .
@TehGettinq4 жыл бұрын
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.
@astropgn4 жыл бұрын
@@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 Жыл бұрын
@@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 Жыл бұрын
@@Qladstone yep, can do.
@leonardopikachu3434 жыл бұрын
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?
@rhaeyx10764 жыл бұрын
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.
@Duiker364 жыл бұрын
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.
@leonardopikachu3434 жыл бұрын
Michael Chui that makes a lot of sense. appreciate your reply, big time!
@daleowens76954 жыл бұрын
@@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.
@coo4634 жыл бұрын
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.
@rudhisundar4 жыл бұрын
Thanks, I still learned some more tricks! H, L, M: those are great! And also for "o" command.
@pauldwalker4 жыл бұрын
after 30 years, I am still learning vi/vim tricks.
@androidemulator60344 жыл бұрын
how to show the key presses like yours
@MissingSemester4 жыл бұрын
Anish is using KeyCastr (github.com/keycastr/keycastr)
@MrDrewluna4 жыл бұрын
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
@willd0g4 жыл бұрын
Geeez I would have never picked up programming then haha
@SirLightfire4 жыл бұрын
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
@jeannepindar56723 жыл бұрын
Notepad++ can also select blocks like that, using alt-left mousebutton
@ajayrajan88824 жыл бұрын
To save and quit simultaneously you can ESC - > :wq
@queijocoalhofps4 жыл бұрын
Shift+zz is more easy
@XGD5layer4 жыл бұрын
:x works too
@jayanths12214 жыл бұрын
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-ji2qh4 жыл бұрын
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.
@LesterFD4 жыл бұрын
When you log into server systems with ssh, there is no vs code installed ..
@byakka4 жыл бұрын
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.
@antoniodosreisfeitosaneto75534 жыл бұрын
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.
@heroe14863 жыл бұрын
Watch the video
@smithwill99524 жыл бұрын
Like blackboard and chalk. Sound like my old school. NO Powerpoint, feeling comfortable!
@vertigo69824 жыл бұрын
I was hoping for a filmstrip with guys from the 80s with neckbeards.
@tomifg4 жыл бұрын
How satisfying is that clean chalckboard
@dodochi793 жыл бұрын
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.
@cageybee7774 жыл бұрын
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.
@Aqueelzalla4 жыл бұрын
I had the exact same experience... tried couple of times but couldn't get autocompletion work...
@glzr_io4 жыл бұрын
Use the vim extension for VS Code and you get the best of both worlds
@GwenHrothgar4 жыл бұрын
Or don't use autocomplete and practice memorizing and typing faster.
@TehGettinq4 жыл бұрын
@@GwenHrothgar thats retarded and leads to errors. Its a bad idea. Typing faster isnt an issue.
@rumble19254 жыл бұрын
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.
@jonnym49234 жыл бұрын
accidentally using vim commands while the youtube window is active... youtube \_(-_-)_/
@vertigo69824 жыл бұрын
you know there's a vim extension for the browser... :D
@anderjgs13 жыл бұрын
Great content, nice explanations,thanks.
@alfred.clement4 жыл бұрын
there needs to be a lecture on how to exit vim
@bubbyroosh40384 жыл бұрын
@@almasfizashaikh6159 You're right, it's just a meme in the community though.
@npt.a.70134 жыл бұрын
ZZ
@your_name964 жыл бұрын
@@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 :)
@TehGettinq4 жыл бұрын
@@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.
@Yotanido4 жыл бұрын
@@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_abhrant4 жыл бұрын
Why vim and why not vscode or sublime ?
@aishahale55044 жыл бұрын
Cause its fast also you can use a vim plugin in vs code, if you are just starting.
@achimwasp3 жыл бұрын
VS Code with Vim extension is a good compromise.
@TheMrGoodkind4 жыл бұрын
Is there a succinct cheat sheet of all of this?
@trejohnson76774 жыл бұрын
Adam Goodkind vimtutor lolol. the wiki.
@FrancisBehnen4 жыл бұрын
vim.fandom.com/wiki/
@generosonunezarias3694 жыл бұрын
i.imgur.com/YLInLlY.png
@RaymondLHW4 жыл бұрын
Useful video. I'm recommending to my teenage students ..... though I guess not many of them are interested lol
@LHAnthony4 жыл бұрын
Some might eventually start using it. it took me YEARS of infrequent use to start using it more frequently
@dobriyzhuk96614 жыл бұрын
What vim plugins he used? Looks very nice
@MissingSemester4 жыл бұрын
Full list here: github.com/anishathalye/dotfiles/tree/master/vim/pack/vendor/start
@daleowens76954 жыл бұрын
@@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.
@mingnuili50953 жыл бұрын
很棒 很有帮助 谢谢你们
@KiraTheUnleashed4 жыл бұрын
Do you use vim for java development as well ?
@ashrasmun14 жыл бұрын
that sounds like masochism tbh, doesn't eclipse have vim plugin?
@humm5354 жыл бұрын
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.
@humm5354 жыл бұрын
@@БарометрАтмосферный 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-gc9ul4 жыл бұрын
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.
@danimoosakhan4 жыл бұрын
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
@adriansrfr4 жыл бұрын
How are c and d analogs?
@ankushm3t4 жыл бұрын
c - change d - delete Change does delete and puts in insert mode. Both modify text in conjunction with movement you provide.
@mohamedaminebenmabrouk4 жыл бұрын
Great Lecture . Thanks ^^
@yihanxiao1754 жыл бұрын
Simply great!
@canale_mio_bonaa3 жыл бұрын
Very informative. Thanks a lot.
@DotYT4 жыл бұрын
i always close my terminal and lose work bc i have no idea how to exit vim lol
@prakash.vishwakarma2 жыл бұрын
Fantastic vdieo!
@abdoulayebalde21394 жыл бұрын
Very nice lecture ☺
@archibaldchain12044 жыл бұрын
Is this course for first-year cs students?
@netbotcl5864 жыл бұрын
yes, it is pretty suitable
@TheTurtleOfGods4 жыл бұрын
no it's for your mom on youtube
@EliteTester3 жыл бұрын
lmao he had anti-arrow key keybinds in insert mode
@daya4554 жыл бұрын
Great class. Thanks.
@SanjitKumar-kh1hj4 жыл бұрын
The guy sounds super polite
@Nyocurio4 жыл бұрын
Learning text editors from a blackboard. These students have a bright career in front of them.
@Praveenkumar-vg3pn4 жыл бұрын
nice explanations . thanks!
@GlobalYoung72 жыл бұрын
Thank you 🙏
@martinprochazka37144 жыл бұрын
Came here for my daily dose of Nano users' tears, left with my mind blown upon discovering "dot" command.