issue182:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue182:c_c [2022/06/28 07:08] – d52fr | issue182:c_c [2022/06/30 15:35] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**So, working on a crappy Mac laptop keyboard has me re-learning shortcuts I have not used in donkey’s years. I am sure there are newbies out there who don’t use them either, as nice keyboards have spoiled us. I also prefer terminal emulators with mouse support. For me, these are just quality-of-life improvements to Linux in general. It’s the little things that have me pining for Linux while working on my work Mac laptop. Let me explain myself. I am in no way saying that my Mac’s keyboard is bad quality, in fact it is a hundred times better than the brand new Lenovo keyboard I am typing on now, where I basically have to jump off the back of the couch to type a letter and not let it miss, making touch typing impossible. It is the flow I am talking about. If I want to make my browser full screen, I hit F11 and continue. It is clearly marked and situated perfectly above my ring finger on my left hand. Not so with the Mac, I have to take my hand off the mouse as F11 now requires 2 hands as well as squinting to see where it will be on the touch bar. The same goes for the terminal. It feels like such a step backwards. I am all for one button presses.** | **So, working on a crappy Mac laptop keyboard has me re-learning shortcuts I have not used in donkey’s years. I am sure there are newbies out there who don’t use them either, as nice keyboards have spoiled us. I also prefer terminal emulators with mouse support. For me, these are just quality-of-life improvements to Linux in general. It’s the little things that have me pining for Linux while working on my work Mac laptop. Let me explain myself. I am in no way saying that my Mac’s keyboard is bad quality, in fact it is a hundred times better than the brand new Lenovo keyboard I am typing on now, where I basically have to jump off the back of the couch to type a letter and not let it miss, making touch typing impossible. It is the flow I am talking about. If I want to make my browser full screen, I hit F11 and continue. It is clearly marked and situated perfectly above my ring finger on my left hand. Not so with the Mac, I have to take my hand off the mouse as F11 now requires 2 hands as well as squinting to see where it will be on the touch bar. The same goes for the terminal. It feels like such a step backwards. I am all for one button presses.** | ||
- | Le fait de travailler sur un clavier d' | + | Le fait de travailler sur un clavier d' |
Ligne 8: | Ligne 8: | ||
As you can see in the image (below), I made a boo-boo. Of course I can hit the home key or use the arrow keys to fix my mistake. My Mac work laptop does not have a ‘home’ key. This is a short command, some of the python scripts that we run are long, with lots of parameters to plug into it, making the arrow keys tedious to say the least. Here you can use the CTRL+a and CTRl+e key combinations to simulate home and end on your keyboard. Go ahead, type something long in your terminal, it does not have to be sensible, a bunch of z’s (zzzzzzz) will do fine to illustrate the example. Use your arrow keys to move your cursor. It may be a block, or an underline, it does not matter. Now press CTRL+e (end) then press CTRL+a (home) and observe your cursor. ** | As you can see in the image (below), I made a boo-boo. Of course I can hit the home key or use the arrow keys to fix my mistake. My Mac work laptop does not have a ‘home’ key. This is a short command, some of the python scripts that we run are long, with lots of parameters to plug into it, making the arrow keys tedious to say the least. Here you can use the CTRL+a and CTRl+e key combinations to simulate home and end on your keyboard. Go ahead, type something long in your terminal, it does not have to be sensible, a bunch of z’s (zzzzzzz) will do fine to illustrate the example. Use your arrow keys to move your cursor. It may be a block, or an underline, it does not matter. Now press CTRL+e (end) then press CTRL+a (home) and observe your cursor. ** | ||
- | Prenons quelques exemples des plus courants, et nous pourrons parler de leur extension plus tard. | + | Prenons quelques exemples des plus courants et nous pourrons parler de leur extension plus tard. |
Comme vous pouvez le voir sur l' | Comme vous pouvez le voir sur l' | ||
Ligne 15: | Ligne 15: | ||
**The next one I will show you needs a little bit more focus from your side. CTRL+z in your terminal may end up the same as CTRL+c and end your typing, so, to ‘undo’ something, you need to type CTRL+_ . This is an underscore, as if you type a minus, your text in your terminal emulator will shrink. (CTRL++ and CTRL+- are usually zoom commands) add a few x’s after your z’s that you typed, bonus points if you used CTRL+e to go to the end to type. Now press CTRL+_ to see them pop out of existence. Now I want you to go to the start again, without using the mouse, the home button or CTRL+a, and then to the end again without using the mouse, CTRL+e or the end button. Say what now? No, I’m not messing with you, unless I am.... Luckily for you, I am not. This is a function controlled by CTRL+xx, so try it now. You may wonder why CTRL+f and CTRL+b are not used for forward and backward instead, but it is because those are taken too, they will take you ahead and backwards one word at a time. Quickly type: “The quick brown fox” and navigate with CTRL+b and CTRL+f. Don’t just read it, do it please, we need to get that “muscle memory” thing going. This helps when you need to plug in parameters into a copied script you may have just pasted that has different values. ** | **The next one I will show you needs a little bit more focus from your side. CTRL+z in your terminal may end up the same as CTRL+c and end your typing, so, to ‘undo’ something, you need to type CTRL+_ . This is an underscore, as if you type a minus, your text in your terminal emulator will shrink. (CTRL++ and CTRL+- are usually zoom commands) add a few x’s after your z’s that you typed, bonus points if you used CTRL+e to go to the end to type. Now press CTRL+_ to see them pop out of existence. Now I want you to go to the start again, without using the mouse, the home button or CTRL+a, and then to the end again without using the mouse, CTRL+e or the end button. Say what now? No, I’m not messing with you, unless I am.... Luckily for you, I am not. This is a function controlled by CTRL+xx, so try it now. You may wonder why CTRL+f and CTRL+b are not used for forward and backward instead, but it is because those are taken too, they will take you ahead and backwards one word at a time. Quickly type: “The quick brown fox” and navigate with CTRL+b and CTRL+f. Don’t just read it, do it please, we need to get that “muscle memory” thing going. This helps when you need to plug in parameters into a copied script you may have just pasted that has different values. ** | ||
- | La prochaine, que je vais vous montrer, nécessite un peu plus d' | + | La prochaine que je vais vous montrer, nécessite un peu plus d' |
**Example: | **Example: | ||
Ligne 35: | Ligne 35: | ||
Essayez de le faire avec les touches fléchées uniquement au début et voyez combien de temps cela vous prend. Maintenant, répétez-le en utilisant ce que je vous ai appris jusqu' | Essayez de le faire avec les touches fléchées uniquement au début et voyez combien de temps cela vous prend. Maintenant, répétez-le en utilisant ce que je vous ai appris jusqu' | ||
- | Rien de ce que nous avons fait n'est révolutionnaire, je vous donnerai une liste des combinaisons de touches que vous pouvez essayer par vous-même. Mais il est indispensable de l'essayer, sinon vous l'oublierez en passant à la page suivante. Vous pouvez également penser que vous ne l'utiliserez plus jamais dans votre vie, mais cela peut arriver. Si vous travaillez dans une salle de serveurs et qu'ils ont un de ces mini claviers de 30 touches qui vous rappellent un ZX Spectrum, qui se glisse dans le rack, vous me remercierez. | + | Rien de ce que nous avons fait n'est révolutionnaire |
Ligne 48: | Ligne 48: | ||
Did I make a mistake? Let me know at misc@fullcirclemagazine.org** | Did I make a mistake? Let me know at misc@fullcirclemagazine.org** | ||
- | Vous pouvez les trouver en tapant : | + | Vous pouvez les trouver |
bind -p | bind -p | ||
Ligne 58: | Ligne 58: | ||
Ai-je fait une erreur ? Faites-moi signe à misc@fullcirclemagazine.org | Ai-je fait une erreur ? Faites-moi signe à misc@fullcirclemagazine.org | ||
- | // p 22, encart en haut à droite, lignes noires : | + | // p 22, encart en haut à droite, lignes noires :// |
**Here is a quick cheat sheet:** | **Here is a quick cheat sheet:** |
issue182/c_c.1656392885.txt.gz · Dernière modification : 2022/06/28 07:08 de d52fr