real newbie question here.
editing the config.txt file i type "sudo edit config.txt"
that gets me in, from there i am lost, through dumb luck i managed to mash enough keys down to allow me to edit it. now that i have edited it i don't know how to save/exit it. so if some one could point me to the keys/combination to allow me to edit and then to exit, i would be very grateful. also i cant seem to find the | or pipe command on the keyboard it shows up as ~... thanks
edit commands
20 posts
- Posts: 2
- Joined: Sat Jun 23, 2012 11:54 am
nano is an easier to use editor. The important keypresses are listed at bottom of screen. So in future
sudo nano /boot/config.txt
edit - I don't know about.
sudo nano /boot/config.txt
edit - I don't know about.
- Moderator
- Posts: 3227
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
edit is a symlink to run-mailcap. It doesn't do what you want.
If you want you can use editor - which I cannot remember what it is by default (maybe joe).
You can change the default editor by
If you want you can use editor - which I cannot remember what it is by default (maybe joe).
You can change the default editor by
- Code: Select all
sudo update-alternatives –config editor
- Posts: 265
- Joined: Tue Jan 10, 2012 11:05 am
thanks thats much easier, still cant find the key for pipe though.
- Posts: 2
- Joined: Sat Jun 23, 2012 11:54 am
dboucher wrote:still cant find the key for pipe though.
Are you using a standard US keyboard? Your linux configuration seems to be for UK layout. Try <RIGHT-ALT>+~
Gr.
Dirk
- Posts: 341
- Joined: Tue Jun 19, 2012 9:46 pm
- Location: Staffordshire, UK
Another approach, if you really are lost in the world of Unix editors, is to edit it on a Windows machine. Notepad ought to work.
But then, of course, you have to beware of the fact that Windows often makes it hard to do simple ASCII text edits. This is particularly true of people who think of MS Word as the only program you'll ever need...
That, and the fact that Windows editors might put CR-LF at the end of the line, instead of just LF. Now that I think about it, I think Notepad does this (so don't use Notepad), but, I think, Wordpad (which you should always use anyway, in lieu of Notepad) doesn't.
Or you could use GVIM under Windows - which is really the best solution of all...
But then, of course, you have to beware of the fact that Windows often makes it hard to do simple ASCII text edits. This is particularly true of people who think of MS Word as the only program you'll ever need...
That, and the fact that Windows editors might put CR-LF at the end of the line, instead of just LF. Now that I think about it, I think Notepad does this (so don't use Notepad), but, I think, Wordpad (which you should always use anyway, in lieu of Notepad) doesn't.
Or you could use GVIM under Windows - which is really the best solution of all...
- Posts: 1381
- Joined: Sun Jan 15, 2012 1:11 pm
DirkS wrote:dboucher wrote:still cant find the key for pipe though.
Are you using a standard US keyboard? Your linux configuration seems to be for UK layout. Try <RIGHT-ALT>+~
What's that supposed to do? Doesn't get a pipe on the console for me.
The right solution will be to change the keyboard map. There is a recent thread on these forums so I won't repeat the advice there.
- Posts: 265
- Joined: Tue Jan 10, 2012 11:05 am
pipe = "|" character = on UK keyboards that's the one (shifted) just just to the left of Z
Another option for "pipe" is holding <Alt> and typing 124 on the numerical keypad (not the top row numbers) although this doesn't seem to work on my daft laptop with dual purpose keys and the Fn button!
If you're editing Linux files via Windows, I'd recommend using Notepad++
http://notepad-plus-plus.org/
It's very user friendly and respects the format of Linux text files better than Notepad.
It's also very handy for writing Python (and other) code as it understands the structure and will colourise the text accordingly, making it easier to read.
But, as previous posters have suggested, 'nano' is nice and easy to use on the RasPi itself.
http://notepad-plus-plus.org/
It's very user friendly and respects the format of Linux text files better than Notepad.
It's also very handy for writing Python (and other) code as it understands the structure and will colourise the text accordingly, making it easier to read.
But, as previous posters have suggested, 'nano' is nice and easy to use on the RasPi itself.
heh. I don't think I could handle "nano" - I don't like WordPerfect-like editors.
- Posts: 1381
- Joined: Sun Jan 15, 2012 1:11 pm
Joe Schmoe wrote:heh. I don't think I could handle "nano" - I don't like WordPerfect-like editors.
nano isn't anything like WordPerfect. The commands bear some resemblance to WordStar.
But honestly there are 101 different editors for Linux - you should be able to find one to suit you.
- Posts: 265
- Joined: Tue Jan 10, 2012 11:05 am
vi -
use it
abuse it
learn it
it's always there
2 things to remember
esc:wq <- write and exit
esc:q! <- exit don't do anything
;-p
use it
abuse it
learn it
it's always there
2 things to remember
esc:wq <- write and exit
esc:q! <- exit don't do anything
;-p
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
joe is a nice and simple basic editor
ctrl k x - save and exit
ctrl c - exit
Cheers,
Peter
- Code: Select all
sudo apt-get install joe
ctrl k x - save and exit
ctrl c - exit
Cheers,
Peter
joe is a horrendous abomination
A list of editors in debian, and quick-reference for the commands of the two true editors, emacs and vi: http://qref.sourceforge.net/quick/ch-edit.en.html
(I can not find the above in the current version of the debian reference.)
- Code: Select all
sudo apt-get remove joe
A list of editors in debian, and quick-reference for the commands of the two true editors, emacs and vi: http://qref.sourceforge.net/quick/ch-edit.en.html
(I can not find the above in the current version of the debian reference.)
I'm always impressed at how passionate people can get about a text editor! 
Newt_Othis wrote:I'm always impressed at how passionate people can get about a text editor!
As a developer, it is what you spend most of your time in. It had better be good.
It's like your bed; you spend a lot of time there, you want it to be comfortable. And what is comfortable is a very personal decision.
P.S. Yes, I misspoke. I meant Word*, not WordPerfect. Sorry 'bout 'dat.
- Posts: 1381
- Joined: Sun Jan 15, 2012 1:11 pm
Actually it is the abominable joe (no relation) that borrows its keystrokes (in the default, jstar, mode) from wordstar. (A decision that looks increasing weird, especially for beginners, since nobody under thirty has even heard of wordstar. Maybe in its jmacs and jpico modes it is not so ripe for uninstallation.)
nano's commands are based on those of pico, the composer of the old mail client, pine (which lives on as alpine). They are a very small subset of emacs' commands, with a few of the keystrokes repurposed as exit, save, etc. (to avoid multi-character sequences) and then back-named as "write^Out" to make them seem logical.
nano is actually very good for beginners (unlike joe), and it is also fine for casual editing of human text files and for small configuration files like /boot/config.txt. It even has basic syntax highlighting. Where it loses out to the real editors is that is has no advanced features (like regular expressions) at all.
nano's commands are based on those of pico, the composer of the old mail client, pine (which lives on as alpine). They are a very small subset of emacs' commands, with a few of the keystrokes repurposed as exit, save, etc. (to avoid multi-character sequences) and then back-named as "write^Out" to make them seem logical.
nano is actually very good for beginners (unlike joe), and it is also fine for casual editing of human text files and for small configuration files like /boot/config.txt. It even has basic syntax highlighting. Where it loses out to the real editors is that is has no advanced features (like regular expressions) at all.
I'll second the vote for vi. But then, I learned to use vi on an ADM-3A in bsd 2.9 unix on a PDP-11/70....
- Posts: 855
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)