Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th July 2007, 02:48
schneid schneid is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to schneid Send a message via Skype™ to schneid
Question Differences between "vi" and "nano"...

Hello there.

mostly, when I edit some of the configuration files in a terminal mode, i usually think about the differences of the two; vi and nano.

When I used nano or we can say pico, it just like an editor on a notepad wherein it's easy to used and there is some commands there in the bottom that you can write, exit, etc. I usually used ctrl+o and save in that directory.

While i'm using vi, i dont know how to save it and for me its hard to manipulate. From friendt say that i will used shift+":"+wq in order to save.

Im to confuse but I rather choose nano or pico instead...

Those who are concerned, type it here. I will appreciate it.
Reply With Quote
Sponsored Links
  #2  
Old 17th July 2007, 09:00
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

It depends on what you want to do with it.
vi you will find in nearly every linux distribution by default. Sure the newer ones sometimes switch to "more comfortable" editors. Nevertheless, if you once sit in front of an old box, e.g. with solaris 8 and have to change anything there you would be happy about knowledge on the "old" vi, cause there won't be any nano,pico... by default.

In case the above mentioned "problem" is not applicable for you and you just want the "comfort" of seeing sth. like a controlbar, then I would use nano.

But for me vim is fine.

And here some helpfull commands for vi
Quote:
i -> Insert
A -> Insert at end of line
o -> neue Zeile
dd -> cut line
yy -> Copy kopieren
p -> insert einfügen
0 -> Jumpt to line start
$ -> Jump to end of line
:0 -> Jump to the beginning of the File
:$ -> Jump to the end of the file
x -> delete character
dw -> delete word
Reply With Quote
  #3  
Old 17th July 2007, 09:28
Anteaus Anteaus is offline
Junior Member
 
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I generally install Midnight Commander for commandline work ('apt-get install mc' on a debian/ubuntu box) -it's still not all that ergonomic, but it's a vast improvement on vi.
Reply With Quote
  #4  
Old 18th July 2007, 00:08
schneid schneid is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to schneid Send a message via Skype™ to schneid
Default

Generally, vi is the oldest or default of the linux text editor.

BEN, these commands here, how can I used this???

Quote:
Originally Posted by Ben
i -> Insert
A -> Insert at end of line
o -> neue Zeile
dd -> cut line
yy -> Copy kopieren
p -> insert einfügen
0 -> Jumpt to line start
$ -> Jump to end of line
:0 -> Jump to the beginning of the File
:$ -> Jump to the end of the file
x -> delete character
dw -> delete word
Can you specify it.
Reply With Quote
  #5  
Old 18th July 2007, 18:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

This link might help you: http://www.howtoforge.com/faq/12_15_en.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 18th July 2007, 18:22
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

@schneid: when you edit a file in vi / vim, just type them
Reply With Quote
  #7  
Old 19th July 2007, 00:17
schneid schneid is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to schneid Send a message via Skype™ to schneid
 
Default

Ok I got it. When I use vi/vim as my text editor, I will type those command and it will automatically know what letter I choose. Such as "i", it will tell you that you can now insert or edit the file and press"esc" to cancel insert then press "shift+:+"w"+"q" to write and quit.

That's it. Thank you guys, with out you, until now I dont know how to use that vi/vim thing. :-)

Falko and Ben, your the best.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.