Тёмный

*Literally* TIME TRAVELING in Vim (and other tips) 

Luke Smith
Подписаться 208 тыс.
Просмотров 37 тыс.
50% 1

Опубликовано:

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 137   
@SimGunther
@SimGunther 4 года назад
"The VIM-inator" where Vim Deisel and Arnold Emaczenegger time travel to stop the creation of Micronet sounds like a cool movie right there
@itachi2011100
@itachi2011100 4 года назад
I think that Coronavirus has changed your idea of what's cool.
@SimGunther
@SimGunther 4 года назад
@@itachi2011100 Probably the "coolest" thing we're getting as far as movies go in this "year of the coof"
@DJ_Cthulhu
@DJ_Cthulhu 4 года назад
So basically, vim is logging everything you do. The Google must love that 🤔
@kittenwizard4703
@kittenwizard4703 2 года назад
Vim, the ultimate glow in the dark program
@michakozio7460
@michakozio7460 4 года назад
Little-known keys are 'g+' and 'g-'. They move you through vim's undo-tree forwards or backwards. With them you can move quite smoothly through the undo-tree branches without plugins. ( 'U' and 'CTRL+R' move you in linear history like most editors do )
@Vulto166
@Vulto166 4 года назад
It's good to see you posting videos more times than past month.
@MrMangkokoo
@MrMangkokoo 4 года назад
i would literally stop watching porn if you keep uploading stuffs at this pace
@superscatboy
@superscatboy 4 года назад
Use a tiling window manager and watch both at the same time.
@edjrage7745
@edjrage7745 3 года назад
You shouldn't watch porn anyway, it's bloat
@PandaBazookaWarz
@PandaBazookaWarz 4 года назад
Thanks for teaching us how to time travel, Vim Diesel.
@randomuser5237
@randomuser5237 4 года назад
If you did not save the changes by writing to the file, you can just use `:earlier 1f` to go back to the state when it was written. To go to a specific changes first use `:undolist` command to see the list of changes and corresponding times and then use `:undo` with a count to jump to a change or g+ and g- normal mode command to travel through history or :earlier and :later commands with times or count.
@kekistanimythology5833
@kekistanimythology5833 4 года назад
you can also yank and paste from an earlier version of the document into the later version. Can come in handy, especially when writing prose. Does still work after you saved (:w) the file, but not after you closed it, though you might find the text in a swap file.
@allegoricalstatue
@allegoricalstatue 4 года назад
ohh I like this idea.
@pcache
@pcache 4 года назад
I feel so freaking enlightened by the ":norm" command on a few selected lines... What I would normally do is either write a macro to operate on each line, or do one edit and repeatedly press "j." to apply the same change to subsequent lines, but ":norm" is so elegant! Thanks
@axelforsman1642
@axelforsman1642 4 года назад
The Vim undo tree stores the full lines in question for every change, even if a change only removed one character. Literally bloat! Gone are the days when one could get by on 4kb of RAM and well written software.
@damienw4958
@damienw4958 4 года назад
Just use shuf
@user-hj1dc2wp7v
@user-hj1dc2wp7v 4 года назад
@@Houshalter ed is really fast, I used to use it to copy entire binary files through ssh before I discovered scp. It's just as fast, if not faster.
@biigsmokee
@biigsmokee 3 года назад
@@user-hj1dc2wp7v bro just use sftp / rsync
@alexandrosvasileiou9635
@alexandrosvasileiou9635 4 года назад
Please keep up these Vim videos! It's probably the best way to expand someone's vim knowledge without producing information overload!
@ksmith7122
@ksmith7122 4 года назад
g- and g+ are much simpler and easiear to use than `:earliear` and `:later`. When you undo (u) and can't find a missing branch with undo, don't you get very frustrated and say to yourself "where is that history, and why dosent undo track it?" The branch you can't find is there, and it is tracked, but `u` won't find it becasue `u` does not track undo / re-do branches. There are simple equivalent commands that do track all changes including your branches, u --> g - , also known as `:earliear` ctrl+r --> g+ , also known as `:later` If you can't find what you're looking for with u and ctrl+r go backwards and forwards again with g- and g+ and you will find it. 10g- will take you back 10 changes, including any branches, this is the same as `:earliear 10` 10g+ will take you forward 10 changes, including any branches, this is the same as `:later 10` g- and g+ is a much easiear notation than :earliear and :later and without the need of the `:` command line. Here is a very short tutorial that gives a very simple worked example demonstrating 'tracked branches', it explains all & takes only 5 mins vim.fandom.com/wiki/Using_undo_branches
@pt8306
@pt8306 Год назад
This is really useful for programming. Lets say you don't need a set of functions anymore, so you delete them. Then later you realise that "oh, I actually needed that 1 complicated line from one of the functions" (this happens all the time), you ca just travel back in time to the start of the document, copy the line, then zip back again to where you were. No git checkout nonesense!
@MestreAlbino1
@MestreAlbino1 4 года назад
I have a friend who is Emacs Team while I'm Vim Team, so every so often we talk about features in or another editor comparing them, now I can use "time traveler card" haha, thanks His latest Emacs' feature that I envy is "region undo".
@elclippo4182
@elclippo4182 4 года назад
1:00 talks about newline, types carriage return
@alessandroceloria
@alessandroceloria 4 года назад
That's actually how it works in vim, if you put it literally writes for whatever reason
@chrisbebek3192
@chrisbebek3192 4 года назад
Didn't even need a flux capacitor. Impressive.
@jonnykopp
@jonnykopp 4 года назад
So fast, so furious
@HushedDeath
@HushedDeath 4 года назад
Thanks for the content, sir. A lazy ass "Cisco network guy" like myself appreciates the tips and tricks. This actually helps quite a bit.
@itachi2011100
@itachi2011100 4 года назад
later 1y hope that the pandemic is done with by then otherwise, earlier 10y
@PabloAndresDealbera
@PabloAndresDealbera 4 года назад
Underrated comment.
@armynyus9123
@armynyus9123 4 года назад
@@PabloAndresDealbera Except that the pandemic never was.
@vim1729
@vim1729 4 года назад
Yaha bhi indian uhhh
@armynyus9123
@armynyus9123 4 года назад
@@vim1729 Kind message from RU-vid: Your browser is in focus - to get back to vim normal mode, just move your pointing device to the left.
@0babul0
@0babul0 4 года назад
Similar to norm, I think you can ctrl+V to select the lines (cursor is highlighted only at the first character), and press I, then type stuff normally in insert mode, and when you exit and move the cursor, all changes will be edited, like when using :norm.
@user-rd3jw7pv7i
@user-rd3jw7pv7i 2 года назад
Yep! But if you're in a fortunate situation when your line is in between something, say a curly braces, then using vi{ and then the norm is very helpful and time efficient :D But to each task their own
@Massolese
@Massolese 4 года назад
Our beloved Vim Diesel can now be a JoJo boss villain
@maxcohn3228
@maxcohn3228 4 года назад
Vim Diesel is the best moniker I've ever heard
@superscatboy
@superscatboy 4 года назад
Instructions unclear, stuck in 1981.
4 года назад
Can you travel to the future with Vim? From the present where the thesis is not yet written, to the future where the thesis is written. That'd be a neat feature. :D
@crusaderACR
@crusaderACR Год назад
Maybe in the next update of Vim!
@miketrame4090
@miketrame4090 4 года назад
Thought this was an undo tree video, I was pleasantly surprised to be wrong!
@JimDragonBass
@JimDragonBass 4 года назад
Hey luke! Could you make a video on how LARBS works, its general structure and maybe even how to personalize it? I watched your "linux in the wild" talk and you mentioned that this is also something that LARBS encourages.
@alessandroceloria
@alessandroceloria 4 года назад
Nice useful trick, usually when I made too much catastrophic changes to a file I would just sob and :q! lol
@jamesmaxwell381
@jamesmaxwell381 4 года назад
I see some academic references. Do you use any special note-taking methods like Zettelkasten? What is your academic workflow like for research and reading papers?
@mylinuxbox4946
@mylinuxbox4946 4 года назад
Like always cool video with showcase of VIM usage!
@cowoverthere5485
@cowoverthere5485 4 года назад
Use this newfound power responsibly, like perhaps killing off the -terminator- emacs daddy
@joaopedrodeamorimpaula8965
@joaopedrodeamorimpaula8965 4 года назад
emacs is a hydra (well actually it has a hydra github.com/abo-abo/hydra) if you try to kill it two more forks will appear
@Eletronicafg
@Eletronicafg 4 года назад
Seems to be the apropriate time for me to (ed)ucate you on how to use the standard text editor.
@holymegadave
@holymegadave 4 года назад
I can go into command mode and i can say "run the normie command" and what the normie command does is just re-runs a sequences of normie mode buttons... key presses for normal people who just want things to run.
@FishKungfu
@FishKungfu 4 года назад
That's really cool!
@tokiomutex4148
@tokiomutex4148 4 года назад
Timetravel! I see this as an absolute win.
@ba-a-a
@ba-a-a 4 года назад
Thank you, Vim Diesel!
@RamakrishnaAppicharla
@RamakrishnaAppicharla 4 года назад
Extremely good... Can you please make a video on underlying mechanism of this?
@TheNicofu
@TheNicofu 4 года назад
my workflow now: :later 6h :wq done.
@epc1
@epc1 4 года назад
A bit off topic but could you make a video review of the book "land of lisp" ?
@HansPeter-qg2vc
@HansPeter-qg2vc 4 года назад
Still hoping that I thus far only was too stupid to find the equivalent function in Emacs. Not gonna switch because of time travel but I gotta admit it's pretty damn cool.
@8u773r
@8u773r 4 года назад
Because vim is ten times larger than ex-vi that comes with GNU, and you said to use simpler options when available, wouldn't one use vi instead?
@gardenapple
@gardenapple 4 года назад
Vi does not support plugins and many other things, as far as I know. Vim/nvim is basically the new standard.
@deltasalz8138
@deltasalz8138 4 года назад
awesome stuff
@user-rd3jw7pv7i
@user-rd3jw7pv7i 2 года назад
Vim is literally the best IDE out there
@arnoudspammer
@arnoudspammer 4 года назад
Mbbil/undotree anyone? For me much more convenient than to remember how far back you wanted to go for an approximate answer.
@amenforthy2213
@amenforthy2213 4 года назад
hey, i just wanna thank you for the idea of remapping caps to escape it's a great idea it made my life much easier but when i use your script (remaps) it works for like 5 min then i no longer able to use caps as escape all the other stuff in the script work (mappin the menu button to right super ...) is there any workaround or solution ? btw i'm using arch
@otten5666
@otten5666 4 года назад
Best move is to map CAPS to ESC if pressed and released but map it to CTRL if another button is pressed as well (ex. CAPS + C = CTRL + C).
@jamesmaxwell381
@jamesmaxwell381 4 года назад
You can use `ctrl+[` for returning back to normal mode in vim.
@johnstef223
@johnstef223 4 года назад
if you are using larbs you can run the command 'remaps' or 'remap' (i dont remember exactly) to re-remaps the keys
@NghiaPham-ct9dp
@NghiaPham-ct9dp 4 года назад
According to the arch wiki some DE overrides your xkb option
@slendi9623
@slendi9623 4 года назад
replace /bin/sh with dash
@misterx8934
@misterx8934 4 года назад
And.... how can I travel back to the future, Mr. VIM Diesel?
@RedFenceAnime
@RedFenceAnime 4 года назад
You do lose the ability to use later if you edit the file in it's earlier state.
@ramiveiberman3182
@ramiveiberman3182 3 года назад
hey Luke, I saw that you use nvim in one video. Do you have video explaining why and how to config it?
@user-od3dw8uk1k
@user-od3dw8uk1k 3 года назад
Just move ~/.vimrc to ~/.config/nvim/init.vim
@crusaderACR
@crusaderACR Год назад
It's basically the same but newer and faster xd You dont need to relearn anything, unlike the transition of Vi to Vim, which did require getting used to some major changes :)
@MartinsTalbergs
@MartinsTalbergs 4 года назад
any chad using vim’s native undotree (without plugins like Mundo) ?
@superspectator123
@superspectator123 4 года назад
Or with Gim fugitive plugin: the Gread command. Then you revert everything back to the last commit.
@AlexAegisOfficial
@AlexAegisOfficial 4 года назад
It was like any other day.. whispers: ...this june... ... but he did not know whispers: ... 2020 .... ...that this day, his life will change forever! V I M D I E S E L: Back to the future 5: The movie IN THEATERS * screen fades, silence * vim diesel: Who am I * dramatic music *
@sasakanjuh7660
@sasakanjuh7660 4 года назад
Ohh, Vim Diesel is back!!
@forgiveness_denied
@forgiveness_denied 4 года назад
what is the brand for the computer chair?
@slendi9623
@slendi9623 4 года назад
o new video
@sayanghosh6996
@sayanghosh6996 4 года назад
you use for newline? what about ?
@xGOKOPx
@xGOKOPx 4 года назад
Right, this is weird. Windows pleb uses (imagine using two characters to code a newline lol) and old MacOSes used , but every unix-like system there is uses
@sayanghosh6996
@sayanghosh6996 4 года назад
@@xGOKOPx yeah. altho i think you mean \
@xGOKOPx
@xGOKOPx 4 года назад
@@sayanghosh6996 Damn you're right, I'm gonna correct that
@abdullahal-ahmati5030
@abdullahal-ahmati5030 4 года назад
:O :O :O It'd be really nice if you just open a file and type "later 5 hours" and get 5 hours of work done :O
@grahamjoss4643
@grahamjoss4643 3 года назад
Fun trick
@nicolasa.bermellferrer8025
@nicolasa.bermellferrer8025 4 года назад
Can someone tell me if using neovim is worth? If I dont already know how to use vim.
@crusaderACR
@crusaderACR Год назад
It's Vim but better, lighter, faster, and somehow still gas more features. Use a search engine and look up the differences. But really, if you really ought to ask or if you're just learning... don't sweat that detail. Basically the same thing when it's down to it.
@MagicalCritical
@MagicalCritical 4 года назад
Danny DeVi
@musicamonarchy3062
@musicamonarchy3062 4 года назад
:earlier 300y - ted
@pichass9337
@pichass9337 4 года назад
These fuckin upload times man
@Zesk06
@Zesk06 4 года назад
Moarrrrrr
@Slendernator
@Slendernator 4 года назад
Emacs
@n0kodoko143
@n0kodoko143 4 года назад
:earlier 5:32
@josephgoebbels1605
@josephgoebbels1605 4 года назад
If vim can literally time travel, then why can't it help poor children in Uganda?
@yash1152
@yash1152 5 месяцев назад
0:19 umh, so, since when are u using neovim; and continuing to call it "vim"??
@Chatbot121
@Chatbot121 4 года назад
Time travel in vscode via CTRL+Z
@jamest9128
@jamest9128 4 года назад
Can you do a video on how to patch dwm?
@flambo1500
@flambo1500 4 года назад
1, open config.h with your favorite text editor 2, patch 3, done
@user-jc6pf8hl1p
@user-jc6pf8hl1p 4 года назад
can you please make video about working with git inside vim?
@MartinsTalbergs
@MartinsTalbergs 4 года назад
It is: au FocusGain * checktime! Then use git from cli only - a breeze.
@actual_0xatul
@actual_0xatul 4 года назад
You should try doom emacs.
@5HT2A292
@5HT2A292 4 года назад
Epic vim boomer destroys soyzoomers by discovering Ctrl+Z
@Amike
@Amike 4 года назад
Why the fuck have I been using atom
@rockyzhang24
@rockyzhang24 4 года назад
Hello Vim Diesel :)
@rothbardfreedom
@rothbardfreedom 4 года назад
Git
@auronkardek
@auronkardek 4 года назад
I just :q!
@pipoper101
@pipoper101 4 года назад
If Luke thinks this is cool, just wait for the day he discovers kakoune, lul.
@servo5156
@servo5156 4 года назад
day 2 of asking for latin videos
@0babul0
@0babul0 4 года назад
vip -> :norm get rekt
@342wru89fsdfdssdf54e
@342wru89fsdfdssdf54e 4 года назад
imagine using anything other than Emacs
@aayushnp5430
@aayushnp5430 4 года назад
first
@wacesferpit
@wacesferpit 4 года назад
Vim is bloat, real minimalists manually change each byte of a file
@jjtt
@jjtt 4 года назад
>not using butterflies to change the eddy currents in the upper atmosphere to deflect cosmic rays in order to flip bits one by one
@user-rt1et3zw1d
@user-rt1et3zw1d 4 года назад
Да кому нужен твой вим, расскажи лучше когда у тебя девушка уже появится. Сидишь за своим компьютером.
@dany3370
@dany3370 4 года назад
vs code is better anyway
@rharrington8669
@rharrington8669 4 года назад
Ahh yes, chrome based text editor
@jlebrech
@jlebrech 4 года назад
it's slow as fuck, moving to vim
@dany3370
@dany3370 4 года назад
@@rharrington8669 i love chrome man
@ishanagarwal475
@ishanagarwal475 4 года назад
Depends on the person I use both because perspective is important.
@auronkardek
@auronkardek 4 года назад
Yes fuck linux nerds I just use windows powershell on wine with Ubuntu
Далее
Using Bash and the Terminal to understand files
14:09
Vim Will Actually Change Your Life.
9:33
Просмотров 78 тыс.
Why Vim Doesn't Need the Mouse
11:34
Просмотров 85 тыс.
Bash commands to not look dumb at the Interview...
12:16
A Clickable, Scriptable Status bar: dwmblocks
10:07
Просмотров 98 тыс.
Vim Tips You Probably Never Heard of
12:11
Просмотров 118 тыс.
A Vid in which Vim Saves Me Hours & Hundreds of Clicks
10:23
After Vimtutor: Some basic vim editing tips!
9:06
Просмотров 74 тыс.
I Will Be Throwing Away My Computers.
11:56
Просмотров 97 тыс.
Vim As You Editor - Advanced Motions P1
9:44
Просмотров 251 тыс.