Understanding Vi and Vim (Vi IMproved) in 10 Minutes

Understanding Vi and Vim (Vi IMproved) in 10 Minutes

Gary Explains

5 лет назад

23,304 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@helge000
@helge000 - 25.07.2019 01:59

Great! My suggestions:
- ssh port port forwarding (ie, ssh -L 3306:localhost:3306 root@db)
- find
- OhMyZsh

Ответить
@fslurrehman
@fslurrehman - 25.07.2019 03:19

What about selecting text, copying it, switching to another file and pasting it?

Also how to highlight code for C, python and markdown in vi/vim?

Ответить
@GiancarloCarccamo
@GiancarloCarccamo - 25.07.2019 04:40

Great video, like always

Ответить
@richardblack5710
@richardblack5710 - 25.07.2019 05:00

VI, variables & switches that are case sensitive are the main reasons I never used Unix back in the day. Give me Digital Equipment Corp's EDT & TPU any day. Even Notepad makes more sense than VI. When I need to edit things in Linux, I use Nano.

Ответить
@ferrarione4708
@ferrarione4708 - 25.07.2019 05:02

How to turn off or on regex in vim search?

Ответить
@wtf-og
@wtf-og - 25.07.2019 10:29

thank you 💯🔥

Ответить
@honza_kriz_bass
@honza_kriz_bass - 25.07.2019 11:57

Finally! 😃

Awesome video (as always 😉) - I hope you’ll do something like “advanced Vim” soon! 😎

Ответить
@Standbackforscience
@Standbackforscience - 25.07.2019 13:59

I use nano, because I have a girlfriend, a life and things to get done.

Ответить
@disterben
@disterben - 25.07.2019 14:16

Vim is the best.
Plugins I use:
vimplug
Airline
Gitgutter
Delimitmate
Multiple cursors
Ale

Ответить
@Luxcium
@Luxcium - 25.07.2019 15:13

Ho my god this was compressive will you be doing (have you done) all one needs to know about linux/Unix commands (the stuff no one talks about like the CTRL+ command etc.)

Ответить
@lebenasa
@lebenasa - 25.07.2019 19:56

I can't even remember why I learned vim in the first place...but it's a really addictive typing experience. I also use vim browser plugins that's really useful for power user.

I still use mouse btw. Too much useless myth around vim. Make it your own and get comfy!

Ответить
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do - 25.07.2019 22:59

the default mode which Vim starts in is the normal mode not the command mode. The command mode is the mode you use when you hit ":'" in normal mode.

Ответить
@MrFurriephillips
@MrFurriephillips - 26.07.2019 04:13

Tell 'em about the "vimtutor" command; following that short tutorial, set me up for an almost 20 year career in FreeBSD & Linux SysAdmining.

Ответить
@mazocco
@mazocco - 26.07.2019 08:35

Why the hell is this so unecessarily complicated and counterintuitive? That made it so much easy for Windows and Mac to become so successful. Just download some IDE or even a text editor. For f* sake.

Ответить
@subsystemfailure8387
@subsystemfailure8387 - 26.07.2019 13:01

it is the ONE thing you need to know about when dealing with any *nix :D Love it. I hate it, too :D

Ответить
@vorrnth8734
@vorrnth8734 - 26.07.2019 13:06

The first mode after starting ist the "normal" mode. Command mode is what you start with the colon.

Ответить
@Nikki-os2df
@Nikki-os2df - 27.07.2019 17:57

Scp is better than Filezilla.

Ответить
@jamesdinsmore9022
@jamesdinsmore9022 - 28.07.2019 01:33

Thank god for nano; you should not have to be a member of a secret society to edit a file in Linux. I do like this material.

Ответить
@uwezimmermann5427
@uwezimmermann5427 - 28.07.2019 13:24

with text editors around which actually by default make use of the keys on a modern keyboard, like nano, joe, etc I never found a single case where I would want to use vi. Also things get weird with vi if you are using a non-US keyboard layout, where e.g. 0 and $ are at complete opposite ends of the keyboard.

Ответить
@michaelnadlerki7qib728
@michaelnadlerki7qib728 - 28.07.2019 19:42

Very nice introduction. I've used vi since the late 70s. My fingers instinctively type the commands.


Much like your excellent explanation about Unix/Linux in a different video, I think it helps to give some of VI's history, when talking about the commands starting with colon. This is "ex mode" -- ex was an enhancement to 'ed', the first command-line text editor. 'ed' & 'ex' operate on files, one line at a time. The big advance with 'vi' is that you can edit the file, one character at a time ('vi'sually). But 'vi' developers didn't want to re-invent many of the powerful 'ex' commands, like substitute (:s). So they added the ':' command that takes you into 'ex mode'. I think this brief history makes it easier for new users to understand colon commands.


Some of folks who complain about arcane commands in vi forget its history. Before vi, there were NO visual editors. At the time, the input device was an 80x25 CRT with standard typewriter keyboard. The vi inventors consciously decided to assign the most common command-mode commands to where a touch-typist would easily find them. The motion commands (h, j, k, l) are perfect for the right hand. Other than those 4 keys, the command key is the first letter of the operation (a = append, b/f = back/forward, etc. -- well, almost always the first: x = exit). 'z' command was put in as a joke: when you are done with your work, you can go to sleep, type 'zz'.


Ubiquity & compatibility are two other reasons to learn vi. IDEs are great, but require a ton of system resources (processor power, disk space, graphics drivers, etc.). Vi needs very little power. It's used in tiny, embedded environments or in places where there's no decent graphical monitors. An IDE would be overkill, or not be able to run in these environments.

Ответить
@bigbootygal6080
@bigbootygal6080 - 28.07.2019 22:57

comment 104... ma privacy aside... i really enjoyed ur video. it help shed some light to the nuance working of vi that i didn't know. PLEASE DO A PART 2 TILL 5 MAX!!! AND MAYBE A REGULAR EXPRESSION TUTORIAL. since as enthusists it may be more of something referable in 5 min

Ответить
@venkatsrkyt
@venkatsrkyt - 29.07.2019 15:09

There are much more powerful tools of using vim, but this one does suffice for starters.

Ответить
@franzj729
@franzj729 - 30.07.2019 04:59

I even use it on windows

Ответить
@enricorov
@enricorov - 30.07.2019 11:28

Nice. Please do a follow up on a more advanced stuff: I think people like myself know their way around the basic shortcuts and usage, but kind of lack the experience with the program itself, so could you show us how you do it? Like, 'I think these commands are useful for this thing that you always do when you're in this situation' so the command sticks with me long enough to notice the use case you suggested and I make use of it. Also, customization, alternative commands, split view, you get the idea.

I sure would appreciate a video on these topics, and I think many would too. Keep up the good work!

Ответить
@insidetrip101
@insidetrip101 - 30.07.2019 14:05

I think what could be quite interesting could be "explaining" how exactly things like vi have developed, their impact on modern software today (and why something like vim is still a relevant important tool to know), and its predecessors like ed (which would help explain the brilliance of vim).


Vim is a topic that is easy to find why people love it, but there are tons of tools in gnu core utils that people just don't even know is there. Education about what these are, where they came from, and why they're still important would be a really nice video series.

Ответить
@PhonetoysTv
@PhonetoysTv - 01.08.2019 02:12

sir G, please do speedtest snapdragon 855 vs 855 plus. thank u

Ответить
@shaggyaxe
@shaggyaxe - 01.08.2019 03:46

I started using vi in 1987. Then vim in the mid 90s. And I'm still learning new things about it.

Ответить
@srikanthav
@srikanthav - 01.08.2019 09:39

Good stuff! Please make a video about using | and > operators in command line along with the unix philosophy of simple, chained commands

Ответить
@kortaffel
@kortaffel - 01.08.2019 20:11

good job

Ответить
@arcticpilotshow4440
@arcticpilotshow4440 - 04.08.2019 14:02

Hello Gary, congrats with 100K+ subscriptions.
I am currently copy/paste lots of data between storage drives, running windows 10. The transfer speed is about 6.5MB/s in average.
Many people are claiming that windows 10 is doing lousy job when transferring data between drives but there are to many "expert" on the internet with solution how to fix this. Maybe this is normal or maybe I should use Linux on usb to copy/paste data. Can you explain?

Ответить
@lohphat
@lohphat - 08.08.2019 09:28

“Vee Eye” never “Vai”.

_lawn(off void)

Ответить
@teque315
@teque315 - 08.08.2019 22:14

Pls do more Linux command line tutorials...

Ответить
@bahathir_
@bahathir_ - 09.08.2019 01:31

Great introduction to vi.


Even though I started using GNU Emacs on Sun 3/60 workstation manyy years ago, and still using it until today, still, vi is relevant.


Some of GUI editor users are not used to edit files on Unix or Unix like environment may not able to 'feel' the power of i, or the powerful GNU Emacs. How many modern GUI editors able to play games, compose emails, read newsgroups, IRC, web browsing in editor? I never have to leave from GNU Emacs to do all those things.. :).



For quick edditing, I am using GNU Emacs' clones, such as mg or zile. or.. sed.


Thank you, and looking forward for your future videos..

Ответить
@xSil3nt27
@xSil3nt27 - 09.08.2019 08:06

Seems dumb.. just use a regular text editor

Ответить
@pwnieluver863
@pwnieluver863 - 20.08.2019 10:44

I think I'll just stick with nano and leafpad

Ответить
@xybersurfer
@xybersurfer - 01.09.2019 17:47

this video was ok because it could help me open large files. but i'm not that interested in learning archaic linux commands, even though i'm familiar with a few basic ones. i just don't consider it enlightening

Ответить
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR - 28.09.2019 22:21

Vi is quite good package but a bit complicated package to use, I sincerely hope you have a copy of that source code file that you altered or you will be up the creak without a paddle so to speak.

Ответить
@snapslarsson
@snapslarsson - 15.10.2019 02:30

How do you record your raspberry pi screen?

Ответить
@Calm_Energy
@Calm_Energy - 29.01.2020 17:15

I know emacs ppl will disagree, but I like the idea of NOT needing to push ctrl or meta so often, just jumping between modes seem sane. Also, I'm just an opportunist, I learn whatever editor the people I'm working with use, for ease of pair programming :)

Ответить
@abelincolnparth
@abelincolnparth - 17.02.2020 09:43

Hoping to learn how to copy and paste, maybe it does not do that.

Ответить
@dsedchenko
@dsedchenko - 21.02.2020 18:31

:!kill -9 $PPID

Ответить
@cam00001
@cam00001 - 18.03.2020 04:38

Thanks for that. I have a friend at "ARGON Labs" that discusses that kinda stuff with me and I'm a plumber/home handy man kinda programmer. Now I understand more on what he was referring to. Maybe I'll look more into that if and when I have the chance to get deeper into something like Python. Oh, and yeah I really am a Home handy person with over 20 years in computer systems. Your explanation was wonderful.

Ответить
@jamesittraining3206
@jamesittraining3206 - 03.01.2021 21:08

Please could someone explain why you would not just use nano? As a Linux noob I'd be interested to know.

Ответить
@genkiferal7178
@genkiferal7178 - 22.05.2021 22:30

techtard here, so forgive the stupid questions, please:
if i only access my own PCs (even remotely) and can use ssh -X to access GUI or, without GUI, I can use the outdated nano or its cute new replacement (?) micro, then why do I need Vi? I have seen the powerful benefits and the insane amount of learning of Vim. But, Vi?? In what scenery would I need Vi?

Ответить
@zoiebell-el350
@zoiebell-el350 - 16.11.2021 08:54

so touching for an excellent video

Ответить
@tamthanh-hn8nz
@tamthanh-hn8nz - 04.12.2021 02:04

Some segments in the video are stamped not adjacent to each other

Ответить
@Bahrta_sai
@Bahrta_sai - 19.07.2022 21:54

I'm using Linux on Chromebook & when I try to use the 'x' to delete, it deletes characters several letters to the right instead of the character under the cursor. Generally it's 4 characters to the right, but that seems to change occasionally. Gvim works as expected. If there any way to fix it?

Ответить
@user-qp7tz5kr5f
@user-qp7tz5kr5f - 07.06.2023 03:44

in command mode:
j = Down
k = Up
l = Right
q! = exit out of VI without saving
:x = save and exit
____________________________________
i = Insert mode (to type in the file)
ESC = command mode
u = Undo (first time)
ctrl + r = Undo (all times after first time)
. = Will repeat last command
dd = delete 2 lines
3dd = Deletes 3 lines
x = deletes lines one at a time
o = new line
a = appends at the end of the line
0 = moves cursor to beginning of line
$ = moves cursor to end of line
/ = search for something in command mode
n = find next instance
nnG = go to line nn
N = find instance before
:%s/str/rep = replace string


You're welcome

Ответить
@rawbeartoe_AK
@rawbeartoe_AK - 08.08.2023 20:25

If you have vim installed you can run vimtutor.

Ответить