YouTube home Comedy Week on YouTube
Upload

Vim for Editing Files in Linux

elithecomputerguy elithecomputerguy·432 videos
113,428
37,541
Like     Dislike 36

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like elithecomputerguy's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike elithecomputerguy's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add elithecomputerguy's video to your playlist.

Uploaded on Jan 26, 2011

Info

Level: Beginner
Presenter: Eli the Computer Guy
Date Created: September 14, 2010
Length of Class: 35 Minutes
Tracks

Linux
Prerequisites

Introduction to Linux
Installing Linux
Basic Linux Tasks
Purpose of Class

This class teaches students how to edit configuration files in Linux using the text editor VIM.
Topics Covered

Starting VIM
Editing Files
Searching in Files
Opening, Saving and Exiting Files
Class Notes

Introduction
No .txt -- no file association
Starting VIM
Sudo vim XXX (opens a file, or creates file)
Sudo -- sometimes you need, sometimes not... if you use it it will always work...
To change ownership of a file (Sometimes needed to edit .ini and configuration files)- Sudo chown user file
Editing and Navigating
a = insert, esc = exit insert
:/ = find (use wildcards)
:/? = Find backward
n = next
Exiting and Saving
:q = quit
:q! = quit no save
:wq = save and quit
:e = open file
:w = save as
Final Thoughts...
Very complicated... Lots of options... these are good enough to start with....
Resources

Vim Website: http://www.vim.org/
Vim Manual: http://vimdoc.sourceforge.net/vimum.html

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Uploader Comments (elithecomputerguy)

  • Cleber Jose de Rossi

    I prefer VI, I think it is easier!But VIM has more features.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Cleber Jose de Rossi's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Cleber Jose de Rossi's comment.
  • elithecomputerguy

    I've found it's really a personal preference type of thing. I learned VIM first and liked it so that's what I use... VI is good too...

    · 7

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate elithecomputerguy's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate elithecomputerguy's comment.
    in reply to Cleber Jose de Rossi (Show the comment)

Top Comments

  • rasix86

    Holy crap.. some seriously bad suggestions in the 1st 10 minutes already... open all files as sudo? you cant be serious. and even worse: change ownership of files? this can in worst case break your system....

    · 35

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate rasix86's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate rasix86's comment.

All Comments (122)

Sign in now to post a comment!
  • Paul Pavalone

    I've been having an overheating problem with my Ubuntu...i.e. the computer shuts down when it hits it's critical trip point of 106 degrees. I've changed the permissions and ownership of the files correctly but I am still unable to modify or delete the thermal zone trip point files...Any suggestions? And no, I am not concerned about burning out my cpu.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Paul Pavalone's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Paul Pavalone's comment.
  • Deshinffxi

    True but as he said right at the beginning: you won't know what the ownership is until after you've done any edits and want to save the file. It's better to just get used to writing "sudo vim" than "vim" and realising after a massive edit "oh I don't have permission"

    You don't NEED to do it but it's erring on the side of caution

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Deshinffxi's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Deshinffxi's comment.
    in reply to Vincent Vetsch (Show the comment)
  • rasix86

    I wonder what all those admins out there, that dont have sudo installed, do in such cases... seriously, that statement is plain wrong

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate rasix86's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate rasix86's comment.
    in reply to ideasman42 (Show the comment)
  • ideasman42

    If your editing config files as an admin, you very well may have to use sudo, I think he just misses context while explaining.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ideasman42's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ideasman42's comment.
    in reply to rasix86 (Show the comment)
  • Vincent Vetsch

    Use sudo or su sparingly. Use it based on the file ownership.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Vincent Vetsch's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Vincent Vetsch's comment.
  • TheKarabouzouklis

    he said you can't edit all files if you don't use sudo which is true

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate TheKarabouzouklis's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate TheKarabouzouklis's comment.
    in reply to nbensa (Show the comment)
  • Ricardo Band

    These videos aren't great. He teaches wrong and very insecure things. People shouldn't listen to him and he should stop doing this crap or try learning how things are right before telling wrong stuff.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Ricardo Band's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Ricardo Band's comment.
    in reply to HardSiesta (Show the comment)
  • nbensa

    6:23 WHAT? Did you say "you CAN'T run vim without sudo"?? Enough, I was going to watch the whole video, but this is a blatant bullshit. You're spreading lies. You better stop teaching because you are doing it WRONG.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate nbensa's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate nbensa's comment.
  • Loading comment...
Loading...
Advertisement
Loading...
Working...
Sign in to add this to Watch Later