Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › okay seting up a server on older desktop and can't figure out the save command
New Posts  All Forums:Forum Nav:

okay seting up a server on older desktop and can't figure out the save command

post #1 of 8
Thread Starter 
so i am using vi to edit some settings and can't figure out how to save the changes any ideas when using the vi text editor in ubuntu server?

(complete noob when it comes to linux so be VERY basic)


EDIT; NeverMind, i figured it out capitol zz not lowercase.
Edited by zdude - 4/16/12 at 6:38pm
post #2 of 8
:wq ( writes to file then quits )
:x ( exits while saving with or without changes )
:ZZ ( exits saving changes if any )

All viable options, there's a million vi cheat sheets out there you could easily print out and keep near you tongue.gif
post #3 of 8
Idk, I used to use vi but then I now use nano. It really is a bit nicer.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #4 of 8
It's hard to beat vi/vi(m) once you learn the commands and take advantage of the extra plugins you can get for it tongue.gif
post #5 of 8
Hmm, I guess I've never used it's plugins.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #6 of 8
Quote:
Originally Posted by Shrak View Post

It's hard to beat vi/vi(m) once you learn the commands and take advantage of the extra plugins you can get for it tongue.gif

wat dude? emacs rule.




Seriously though, I hate emacs and pretty meh about nano too. Nano is a great beginner editor, but once you wrap your head around vi/m, everything else just seems slow and imprecise.

I did actually put a cheatsheet on here somewhere though, I'll try and dig it out
post #7 of 8
here we go:
i insert
r overtype (replace) single character
R overtype a line
A append to end of line
YP copy and paste a whole line
o insert new blank line below cursor

D delete anything after cursor
dd delete a whole line
[number]D delete the next [number] lines
dG delete everything after cursor point

e jump to end of next word
b jump to beginning of previous word
[number]G jump to line [number] (eg 1G -> jump to first line)
G jump to end of file

:w write output
:q! quite without save
:n next file (great if you want to open a bunch of files for bulk edit: eg vi *.conf)
:wq / :wn write then quit / next file
:%s/[search]/[replace]/g search and replace every instance


originally posted here: http://www.overclock.net/t/1215720/linux-learning-idea/20#post_16579825
post #8 of 8
Quote:
Originally Posted by Plan9 View Post

wat dude? emacs rule.
Seriously though, I hate emacs and pretty meh about nano too. Nano is a great beginner editor, but once you wrap your head around vi/m, everything else just seems slow and imprecise.
I did actually put a cheatsheet on here somewhere though, I'll try and dig it out

emacs makes my head explode madsmiley.png
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › okay seting up a server on older desktop and can't figure out the save command