Auteur Sujet: The Basic Terminal  (Lu 20900 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne patrick013

  • Membre Senior
  • ****
  • Messages: 252
Re : Re : Re : The Basic Terminal
« Réponse #15 le: 26 mars 2013 à 22:14:27 »
You could set that as an alias. Add this as the last line in ~/.bashrc.

alias df="df -T -BM"
You can try it out first by entering the same line in a terminal emulator, then entering just df.

I see.   Thanks.

edit: or in /etc/bashrc looks good for all users.
« Modifié: 26 mars 2013 à 22:17:05 par patrick013 »

Hors ligne patrick013

  • Membre Senior
  • ****
  • Messages: 252
Re : Re : The Basic Terminal
« Réponse #16 le: 26 mars 2013 à 22:19:12 »
Midnight Commander is a very useful tool. I use it before remastering.

Sure, the text editor is just a little basic.

konaexpress

  • Invité
Re : The Basic Terminal
« Réponse #17 le: 27 mars 2013 à 02:44:21 »
Yea, how I love to use pico and MC. I don't need no stupid mouse, I can tab my way to the bottom after 25 stopes......... :o ;D

djohnston

  • Invité
Re : The Basic Terminal
« Réponse #18 le: 27 mars 2013 à 04:01:32 »
I don't know if you guys are referring to MC's text editor or the system's default text editor. If you accept MC's default settings, you get the system's default text editor. If you want to use MC's simple text editor, you have to change MC's default settings. With a Midnight Commander window open, click on Options > Configuration. In the right panel (Other options), check Use internal edit. Save the settings.

I don't like using vi or emacs. I tend to get lost in both. Nano is the CLI editor I use, when available. MC's internal editor is just as easy to use, in my opinion.

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : Re : The Basic Terminal
« Réponse #19 le: 27 mars 2013 à 10:49:15 »
I don't need no stupid mouse, I can tab my way to the bottom after 25 stopes......... :o ;D

To add to what djohnston just said, you don't need to have stops : you can use the "page down / page up" keys of your keyboard, and the "beginning of line / end of line" keys on the same keyboard of your's. Perhaps have you not used them so far ? (I have seen many people using a computer since some time who didn't notice these one keyboard keys so I think maybe you haven't either?)

I don't use vi or emacs either, but mcedit or vim (the enhanced version of vi which is much easier, with elflord color configured in the /etc/vimrc file... because it is nicer and easier to read)

« Modifié: 27 mars 2013 à 10:51:28 par mélodie »
Good leaders being scarce, following yourself is allowed.

Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 391
    • Scorpio_Openbox
Re : Re : The Basic Terminal
« Réponse #20 le: 27 mars 2013 à 13:30:52 »
I don't know if you guys are referring to MC's text editor or the system's default text editor. If you accept MC's default settings, you get the system's default text editor. If you want to use MC's simple text editor, you have to change MC's default settings. With a Midnight Commander window open, click on Options > Configuration. In the right panel (Other options), check Use internal edit. Save the settings.

I tried that and if anything the MC editor is easier to use than nano!  It all revolves around the "F" keys.  I'm still toying with the whole MC thing; have been for a couple of years - slowly getting my brain around it all!
What can go wrong !!!

konaexpress

  • Invité
Re : The Basic Terminal
« Réponse #21 le: 27 mars 2013 à 16:03:54 »
I understand that some people can fly around using only the key board but I am just not wired that way.

Case in point:  The BBS software that I am working on in Python, I hate trying to remember what key goes to what menu item. In this menu, the user types what is on the menu. Mail is "mail" and files is "files" on the key board. K.I.S.S is the way to go,  don't have a help file that is so stupid long that it flys by on the screen and other things like that.

Hors ligne patrick013

  • Membre Senior
  • ****
  • Messages: 252
Re : The Basic Terminal
« Réponse #22 le: 27 mars 2013 à 23:25:38 »
The default mc editor doesn't create text files, just edits
existing ones.

Need a blank text file to use to do that, otherwise it's OK.

Mine keeps using the built-in editor.

Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 391
    • Scorpio_Openbox
Re : Re : The Basic Terminal
« Réponse #23 le: 27 mars 2013 à 23:38:54 »
The default mc editor doesn't create text files, just edits
existing ones.

Need a blank text file to use to do that, otherwise it's OK.

Mine keeps using the built-in editor.

Thanks for that - I'd been wondering about how to create a file!


EDIT - of course the command "touch" allows the creation of a file, a bit like the "mkdir" command.
« Modifié: 27 mars 2013 à 23:51:54 par Taco.22 »
What can go wrong !!!

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : The Basic Terminal
« Réponse #24 le: 28 mars 2013 à 02:03:16 »
I do disagree on this.

See here after:

$ cd /tmp/$ mcedit test.txt
/adding some text, then hit F2 to save, then F10 to quit, then:

$ cat test.txt
Hello World!

> Hello!

I can do it, so should you ?

Maybe were you talking about the editor when you are inside mc ?

I just tried I can do it too. Open mc (in /tmp for instance), get the selection on top, on "..", hit F2 then go up to '@' "Do something on the current file", once there you can type a command line, type "mcedit text2.txt", don't mind about the warning and edit your file. Once done, hit F2 to save, then F10 to quit: you have a new file.



« Modifié: 28 mars 2013 à 02:07:21 par mélodie »
Good leaders being scarce, following yourself is allowed.

Hors ligne patrick013

  • Membre Senior
  • ****
  • Messages: 252
Re : The Basic Terminal
« Réponse #25 le: 28 mars 2013 à 05:34:44 »
Well now I've got mcedit and alias' working.
Even setup sudo for the terminal.

djohnston

  • Invité
Re : Re : The Basic Terminal
« Réponse #26 le: 28 mars 2013 à 07:07:08 »
Well now I've got mcedit and alias' working.
Even setup sudo for the terminal.

Now you're cooking!

Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 391
    • Scorpio_Openbox
Re : The Basic Terminal
« Réponse #27 le: 28 mars 2013 à 09:44:43 »
Yep, "mcedit name_of_file" creates a file, and F10 saves it.  Cool.  But I have a query - how do I get to the top menus of left, file, command etc by keyboard?  I've tried a number of things but I'm stumped.
What can go wrong !!!

Hors ligne mimas

  • Général du Roi
  • Membre Complet
  • ***
  • Messages: 114
  • Jamais content
    • G+
Re : The Basic Terminal
« Réponse #28 le: 28 mars 2013 à 12:11:52 »
Simple, you can't. Mcedit is not mc, this is another program. It has only a one menu, the bar at the bottom.
« Modifié: 28 mars 2013 à 12:14:10 par mimas »
When any government, or any church for that matter, undertakes to say to its subjects, "This you may not read, this you must not see, this you are forbidden to know," the end result is tyranny and oppression, no matter how holy the motives.

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : The Basic Terminal
« Réponse #29 le: 28 mars 2013 à 12:46:50 »
Hi,

Taco, if you mean "in mc" and not "in mcedit" as mimas supposed, then you need to press F9, then you reach the menus. Then, you can use the Enter key to display the submenus, and then the arrows for navigation between main menus (right and left keys) and also arrows to reach the submenus (up and down arrows).

PS: mimas I am sorry to tell you that you are wrong, however checking has brought me to discover it: F9 also allows accessing to top menus in mcedit, which are not the same in mcedit as in mc, but related to text editing. I'll go back there explore more. Wao !

PS2: in mcedit it is possible to send an email to someone. It needs sendmail to be installed and configured...

PS3: and there is also a large choice for encoding, syntax highlighting for many kinds of coding... and lots more than I will ever be able to learn!





« Modifié: 28 mars 2013 à 12:58:36 par mélodie »
Good leaders being scarce, following yourself is allowed.