Тёмный

How to move around in Vim (for beginners) - Vim-Fu #1 

The Art of Software
Подписаться 1,2 тыс.
Просмотров 32 тыс.
50% 1

In this video I go through the basics on how to move around a file using Vim. There are many different commands and shortcuts available - here I share the ones that I use most frequently.
#vimeditor #vim #programming

Наука

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

 

4 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 59   
@TheArtofSoftware
@TheArtofSoftware 3 года назад
Once you're comfortable with the tips in this video, check out Vim-Fu #2 - How to edit efficiently in Vim: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SO9Sre5v6NA.html
@ThePrimeagen
@ThePrimeagen 4 года назад
Nice job friend.
@TheArtofSoftware
@TheArtofSoftware 4 года назад
Thanks man, love your channel
@piyushdanej3930
@piyushdanej3930 5 месяцев назад
Blazingly Fast !
@DieDona
@DieDona 2 месяца назад
Brazil mentioned?
@thomasrichards8055
@thomasrichards8055 11 месяцев назад
This got randomly recommended to me by RU-vid. I had no idea you made RU-vid videos - how awesome!
@tobykelly4606
@tobykelly4606 4 года назад
Thank you! I've always been interested in Vim but I've been waiting for the right beginners video. This is it! Subscribed.
@TheArtofSoftware
@TheArtofSoftware 4 года назад
Awesome, glad to know that it's helpful
@isAif47
@isAif47 3 года назад
You can use _ to move to the first non blank character of line, it's easier than 0w. Similarly g_ to move to last non blank character, this is not used much but it can be handy while creating macro for removing trailing space. Using Ctrl+f or ctrl+u can be disorienting when used for first time but it's very useful. Great video btw.
@TheArtofSoftware
@TheArtofSoftware 3 года назад
Awesome - learning new Vim tips all the time!
@AmnesiaPhotography
@AmnesiaPhotography 2 года назад
Great straight forward video!
@emeiri1
@emeiri1 3 года назад
Great tutorial. Thank you.
@cidhighwind8590
@cidhighwind8590 4 месяца назад
Wonderful video!
@HH-ez6qc
@HH-ez6qc Год назад
Fantastic video!
@BenKadel
@BenKadel 4 года назад
Great video dude! Loving the (I wanna say new intro, unless uve had it all the time and I've just missed it haha) Quality Vim-Moving!
@TheArtofSoftware
@TheArtofSoftware 4 года назад
Thanks Ben, looking forward to the collab!
@dzisonline
@dzisonline 4 месяца назад
Gold. Thanks for sharing.
@adamrodriguez7598
@adamrodriguez7598 2 месяца назад
Just what I needed. Some good. Normal mode practice.
@fliplucky8813
@fliplucky8813 2 года назад
Great video. The way you present it is a lot more logical then the " standard" way. Great job!
@TheArtofSoftware
@TheArtofSoftware 2 года назад
Thanks @FlipLucky. What do you mean by the standard way?
@fliplucky8813
@fliplucky8813 2 года назад
@@TheArtofSoftware Well, ive looked at several videos, and most start with: hjkl, then bweE, going to g and gg, and then switch to edit skills etc. your approach to grouping the vertical commands, then the horizontal commands, instead of grouping movement by "skill level" makes it a LOT more beginner friendly. Personally, I found it frustrating that you have to "advance" through vim levels before you learn things like the f and search option, paragraph hopping with {} and moving the document
@TheArtofSoftware
@TheArtofSoftware 2 года назад
Thanks for the reply, that's super useful to know. Glad it helped you
@suriyakumar3434
@suriyakumar3434 5 месяцев назад
Great video
@hwang6122
@hwang6122 10 месяцев назад
Great explanation
@TonySingh7
@TonySingh7 2 года назад
Great vid!
11 месяцев назад
thank you very much!
@thangphan6047
@thangphan6047 2 года назад
Thank you so much
@GlobalYoung7
@GlobalYoung7 2 года назад
Thank you
@gauravparvat5291
@gauravparvat5291 4 года назад
Great tutorial. I wish I had found it earlier this year when I was struggling to learn vim, because of the lack of "absolute beginner friendly" materials; I had to skim through articles, posts, and sometimes documentation. But here we are, I still watch materials I already know, just to have an idea how other people utilize what I am using, if they are more efficient (or cooler) then I'll adapt things their way. One suggestion though, marks should be included in vim navigation category. When used right, can be THE fastest way to navigate back and forth between things. In my head, marks feel like cursor teleporting. Although marks are harder to incorporate into your daily workflow, they're good to know.
@TheArtofSoftware
@TheArtofSoftware 4 года назад
Yes, marks are great and I don't use them often enough. Thanks for the kind words!
@richardvdoost
@richardvdoost 2 года назад
Great explanation 👌 Another shortcut I like for vertical movement is: zz It moves the cursor to the middle of the screen by scrolling the entire doc (leaving the cursor on the same line #)
@TheArtofSoftware
@TheArtofSoftware 2 года назад
Awesome, thanks for the tip!
@rab319
@rab319 2 года назад
A - is what i am looking for to enter that pesky semicolon at the end! thanks!
@rab319
@rab319 2 года назад
from my experience the biggest slow down for me is moving from insert to normal mode.. I always remap my escape key to "hh" coz i use dvorak which is also "jj" for qwerty.
@tonybengue
@tonybengue 2 года назад
I thank you for those tips. When there will be new videos? Your content is great ;)
@TheArtofSoftware
@TheArtofSoftware 2 года назад
Hi Tony, thanks, really trying to get back on it soon!
@joostschuur
@joostschuur 3 года назад
Remapping my arrow keys to nop is a great tip! Just did that!
@TheArtofSoftware
@TheArtofSoftware 3 года назад
Yes, putting the delicious cookies out reach!
@erichaynes
@erichaynes Год назад
7:46 I'm overweight and can't resist the cookies... you just removed like half of my daily exercise.
@TheVikke2
@TheVikke2 3 года назад
w => start of the word e => end of the next word b => backwards to the start of the word 3w => number before command to execute multiple times yy => copy a whole line y => copy selection p => paste Shift + p => paste on top of current line u => undo dd => delete and cut a line cc => delete and cut a line, puts you to insert mode after the command i => engage insert mode and go left a => engage insert mode and go right 0(zero) => move to start of the line Shift + ^ => move to first character on the line Alt + 4 (aka $) => move to end of the line Shift + 5 (aka %) => move to corresponding bracket, toggle brackets f + h (character) => go to first occurrance of a character on a line Shift + F => go to first occurance of a character on a line backwards /searchterm => to type across the file, press Enter to go to the first result ?searchterm => search backwards, press Enter to go to the first result n => go to next search result Shift + n => go backwards in search results v => engage visual mode, selects text Shift + v => visual mode with lines selection < > => in visual mode change the intention . => to repeat latest command Shift + ` => visual mode changes the case of the word v + i + w => visual mode select a word Ctrl + v => visual multi-line select Ctrl + u => move half a page up Ctrl + d => move half a page down Shift + 8 or 9 => move to ( or ) Alt + 7 or 0 => move to { or } Shift + h => move to highest point of viewport Shift + m => move to middle point of viewport Shift + l => move to highest point of viewport :200 => go to line 200 d + t + (character) => delete everything until this character
7 месяцев назад
Thank you very much! This goes straight into my cheatsheet file. :D
@Redyf
@Redyf 9 месяцев назад
Great video, btw what font are you using for vim?
@MM-um7pt
@MM-um7pt 5 месяцев назад
Ubuntu mono
@itsot12
@itsot12 Год назад
How do you prevent it from typing the commands you're inputting? Eg for "gg", how do you make it do the command instead of it typing out gg?
@phatboislym
@phatboislym Год назад
use commands in normal/command mode his ESC or Ctrl-C from insert mode to switch modes to normal
@umareddy6197
@umareddy6197 7 месяцев назад
How can i move my cursor to the last recent position? Ex: I am now at line number 30. I enter 67G. How can I move to line 30 ? And I don't know that at which line i was before.
@khushkewal
@khushkewal 5 месяцев назад
ctrl+o -> Jump to previous location (jump back) ctrl+i -> Jump to next location (jump forward)
@linuxramblingproductions8554
@linuxramblingproductions8554 2 года назад
Tbh just do the vim tutor and learn by usage or nvim tutor if you prefer you will learn with time what works and what doesn’t
@brunomello7499
@brunomello7499 2 года назад
using { and } messes with your jump list, and then when you wanna jump back and forth between your jump list (for example going back from LSP's "go to definition") it becomes a pain in the ass I don't recommend it
@eliasmelesse1715
@eliasmelesse1715 2 года назад
The legendary "Jet Li" is now a coder!!
@sacredgeometry
@sacredgeometry 5 месяцев назад
You really need relative line numbers
@alexdefoc6919
@alexdefoc6919 6 месяцев назад
6:11 where i left off for later.
@windowsrefund
@windowsrefund Год назад
Very nice job. That said, you seem too bright to be mispronouncing "regex". As it is shorthand for "regular expression", you should obviously pronounce is accordingly as you (hopefully) would not ever speak of a "rejular expression". To be honest, I see this as just one of many examples in our very competitive field where people essentially mimic (copy/paste) popular terms and lingo in an effort to seemingly fit in. With that out of the way, I'll just add that using command mode to jump to a given line is better than prefixing G with a number. The reason using command mode is better is due to the fact other operations like move, copy, etc can be used. For example, one can easily move a text object 10 lines up with :-10m
@ru2979
@ru2979 2 месяца назад
🤣🤣vim fu
@vikingthedude
@vikingthedude 11 месяцев назад
Are you chubby emu's programmer cousin
@Topyy
@Topyy 6 месяцев назад
Why do you look so much like chubbyemu 😭
@MM-um7pt
@MM-um7pt 5 месяцев назад
I'm his dad
@toroddlnning6806
@toroddlnning6806 Год назад
word and google docs is far from perfect, but this is not the solution...
@gjermundification
@gjermundification 2 месяца назад
:set nu rnu
Далее
10 Advanced Vim Features (You Probably Didn't Know)
21:47
На фейсконтроле 💂
09:41
Просмотров 327 тыс.
Schoolboy - Часть 2
00:12
Просмотров 4,1 млн
Наташа Кампуш. 3096 дней в плену.
00:58
i tried Vim...
10:06
Просмотров 42 тыс.
Intro to Customizing LazyVim
8:10
Просмотров 13 тыс.
Let Vim Do the Typing
32:07
Просмотров 212 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 47 тыс.
30 Vim commands you NEED TO KNOW (in just 10 minutes)
10:27
30 Beginner Vim Commands in 7 Minutes
7:13
Просмотров 10 тыс.
Vim As Your Editor - Introduction
12:24
Просмотров 854 тыс.
Why Vim Experts Do THIS Instead of Using Tabs...
7:55
Просмотров 127 тыс.
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 7 млн
#samsung #retrophone #nostalgia #x100
0:14
Просмотров 14 млн