teacher Posted September 28, 2003 Share Posted September 28, 2003 (edited) I put it in red for you below:# .bashrc# User specific aliases and functions PS1="[\u:\w]$ "# Source global definitionsif [ -f /etc/bashrc ]; then . /etc/bashrcfi Edited September 28, 2003 by teacher Quote Link to comment Share on other sites More sharing options...
LLfan Posted September 28, 2003 Author Share Posted September 28, 2003 Well thank you for sticking with me! That worked.I would like to find out why my Esc+ZZ isn't working but I don't have the patience left today--some other day. Quote Link to comment Share on other sites More sharing options...
teacher Posted September 28, 2003 Share Posted September 28, 2003 Yes. When you are fresh and alert on another day go back in and try the test file again. Remember that if it closes out after you do the Escape and then the ZZ then it worked. It takes you back out of vi and then all you have to do is Control D twice to take you out of the console. We will check to make sure after the escape it no longer shows insert at the bottom and then that it changes at the bottom after each capital Z.Did you see where I had left out the " at the end of the line and had to edit it? Did you get it right? Does your prompt say what you want it to say now? Tomorrow we will go back and look at lessons in vi! Quote Link to comment Share on other sites More sharing options...
LLfan Posted September 28, 2003 Author Share Posted September 28, 2003 It is perfect =)Yes, another day we will tackle the escape. Quote Link to comment Share on other sites More sharing options...
linuxdude32 Posted September 28, 2003 Share Posted September 28, 2003 I don't know whether this will make any difference but when I save files in vi, I hit <ESC> and then type::wqI had never heard of using ZZ before but I tried it, too, and it works. Nice to know more than one way to do something! I wonder though if ZZ is an extension to vi that only exists in vim. Vi is normally link to vim in modern distros.In any case, it can't hurt to try <ESC>:wq and see what happens. Quote Link to comment Share on other sites More sharing options...
Bruno Posted September 28, 2003 Share Posted September 28, 2003 Hi Jason,Indeed :wq or even :wq! are the other ways to save and close vi . . . . I just find ZZ so much easier and quicker . . . . We will have to make a beginners guide/excersise for vi, because I´m not a real fan of editing in kwrite and the new members should have a good way to learn.Hi MikeMan, what an adventure ! . . . is your prompt now:[mike:~]$or do you still have ¨root¨ in there ? I´m asking this because your prompt did look very strange to start with, the hostname was very unusual and you did have some funny ¨start¨ problems for your home directory a few theads ago . . . so there might be a deeper problem with your system.I will put together a better vi-excercise during the day. Vi is very important for editing, this time you came away lightly because it was a file with ¨user-permissions¨ and it contained only a few short lines . . . using this technique on larger files with root-permissions will run you into problems for sure in the long run.I´ll get back to you ! Bruno Quote Link to comment Share on other sites More sharing options...
Owyn Posted September 28, 2003 Share Posted September 28, 2003 I will put together a better vi-excercise during the day. Vi is very important for editing, this time you came away lightly because it was a file with ¨user-permissions¨ and it contained only a few short lines . . . using this technique on larger files with root-permissions will run you into problems for sure in the long run. Rute pointed me to "vimtutor". A worthwhile exercise. Teachs by doing.I found this to be a usefull help for Vim.Still not sure what my development editor will be but decided early that Vim was the portable editor. No matter which distribution I was using, I would have vi/vim. Quote Link to comment Share on other sites More sharing options...
teacher Posted September 28, 2003 Share Posted September 28, 2003 OwynGreat links. I tend to forget that Rute is anything other than a paperback book. It is my main resource book. Great tutorial. MikeThere is your homework assignment. Go for it! Quote Link to comment Share on other sites More sharing options...
Bruno Posted September 28, 2003 Share Posted September 28, 2003 Rute pointed me to "vimtutor". A worthwhile exercise. Teachs by doing.I found this to be a usefull help for Vim.Still not sure what my development editor will be but decided early that Vim was the portable editor. No matter which distribution I was using, I would have vi/vim.Owyn, I could not agree with you more !! Thanks for posting these links . . . Could you do me the pleasure to post an exact copy of this post in the thread I will post myself a little later called ¨Vi-exercise¨ ?? Vi is indeed a magical editor, with all kind of extra´s. I like the syntax highlighting and intuitive editing for scripts. Have a look here how you tweak your vi with line-numbering and other nice and absolutely needed extra´s. Vi rulez ! Bruno Quote Link to comment Share on other sites More sharing options...
LLfan Posted September 28, 2003 Author Share Posted September 28, 2003 [mike:~]$ is what it is when I start my terminal--and I can log into root same as usual. Will check out the links. Thanks all. Quote Link to comment Share on other sites More sharing options...
teacher Posted September 28, 2003 Share Posted September 28, 2003 Glad it worked for you. Now. Go over to the Vi Tutorial thread and do your homework. We need to get you comfortable in vi! Quote Link to comment Share on other sites More sharing options...
Owyn Posted September 28, 2003 Share Posted September 28, 2003 Could you do me the pleasure to post an exact copy of this post in the thread I will post myself a little later called ¨Vi-exercise¨ ??Done Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.