How do I minimize the use of same-hand keyboard fingering? [closed] - emacs

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have been trying to rid myself of the bad habit of key-chording in Emacs using only one hand. That is, for C-x I want to use my right pinky to hit the right-Ctrl and a left-hand finger to hit x. My question is how do I type efficiently in all caps? For example, when I type an environment variable such as RAILS_ENV=test it's very tedious to switch between left and right hands holding Shift every time the key falls on the opposite side of the keyboard. It would seem that this is an ideal case for using CapsLk, but I've long remapped that key to Ctrl because of the scarcity of its use and potential for accidental triggering.
I found this related question but it deals more with enforcing the habit than the question of how to actually type efficiently using the opposite hand to hit modifier keys.

As the question appears to be targeted towards bash command lines, you can use Control-A Meta-U to capitalize the first word of the line, useful for typing
env_var=value some_command ...
prior to converting it to
ENV_VAR=value some_command ...

Instead of making CAPS LOCK an additional CTRL, you could simply swap CAPS LOCK and LEFT CTRL.

Related

emacs: control where emacs starts from ~/.emacs [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
Running emacs 28 On win10:
I'd like to see code for ~/.emacs that makes emacs start in ~/ unless otherwise
directed from the command line.
For instance: If I start emacs by pressing the start menu, and then typing e m a c s
I want to be sure it starts in my home directory unless I type
e m a c s

MatLab, missing ->> in command line [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I use MATLAB R2012b, and for some reason occasionally when I put "bad stuff" in the command line, it executes, but then the --> arrow thing besides the $$f_x$$ symbol disappears and I can't do anything in the command line.
For instance if I write an if statement with nothing else, it erases that arrow thing.
That's because you're starting a loop. It's waiting for you to type the code to go within the loop, and it is terminated when you type end to end the loop. For example:
if(x==0)
y = y + 1;
end
When you see this it typically means that you did not finish a command yet. This most commonly occurs with statements like for or if.
Example:
if 1
Now you are inside the if statement, and not simply at the basic prompt. Therefore you will not see anything happen. This can be tested by continuing with:
1+1 %Normally outputs 2
Obviously nothing happens. You now have two choices. Either you realize that the if was there by mistake, and you cancel with CTRL+C. In this case you will not see any output. Of course you can also choose to finish the statement:
end

Unformatting LaTeX code with Emacs & AUCTeX [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Emacs + AUCTeX provides all sort of commands for formatting text, but I can't find a way to "unformat" a snippet of code (unless undoing the change right after having run a formatting command).
For example, suppose you have the following snippet with LaTeX formatting
foo \whatever{bar} quux
I'd like to remove the \whatever{} wrapper by selecting the relevant text, or by placing the cursor at its beginning/end, and using a key combination to get
foo bar quux

emacs forward and back keys [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Am i unusual or are the emacs forward and back keys the wrong way round?
I constantly hit C-b for forward and C-f for backward because b is forward of f and f is back of b as laid out on the (qwerty) keyboard (at least thats my logic)
C-n and C-p cause no such problems as they are intuitively the right way round, e.g. p is 'up' from n
likewise with C-a and C-e
its nice to have the letter mean something, e.g. f for forward and b for back but my brain prefers actual position over the right initial
does anyone else have this issue?
as an aside how do dvorak users cope?
should i swap the key bindings round or does that way madness lie?
(possibly part of the problem is I have only just started weaning myself of the arrow keys using no-easy-keys.el)
If you are willing to move away from the defaults, you may want to check out Xah Lee's ErgoEmacs bindings.
http://ergoemacs.org/emacs/ergonomic_emacs_keybinding.html
Let me answer quickly before the famed SO content nazis delet your question as too open-ended. Emacs keybinding on standard 104 key PC keyboard is a disaster. I personally never confused C-f and C-b, but I did get strained pinkies from pressing Ctrl all the time until I redefined Caps Lock as Ctrl. Since then, by miracle, Emacs became the most comfortable piece of software on my machine. But back to your original question, I think I never had problems confusing C-b because it's simply hard to reach. Nevertheless, as much as I love Emacs, I must admit that vi rocks for using h, j, k, l keys for, respectively, back, down, up, and forward. I've heard there was a plugin named 'vile' for Emacs, but I never tried it. That might be of help to you.

When using Emacs do you rebind caps-lock to CTRL? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
This question is, as indicated, for those who use Emacs.
When you do, do you rebind the caps-lock key to CTRL, or do you use the "normal" ctrl key?
I've recently learned some Emacs commands and was using the Visual Studio 2008 emacs commands for a while, and of course I used a caps-rebind tool, but I'm curious how many other people do.
On a side note, the emacs bindings for VS are severely incomplete :(
I have no use for Caps Lock under any circumstances, whether I'm using Emacs or any other program. In the rare case that I need to type several capital letters at once, I can easily hold down Shift with my left pinkie and type almost as fast as normal with my remaining fingers. If I ever needed to produce a large amount of all-caps text using Emacs, I'd just type it all in lower case, select it, and upcase it all at once with C-x C-u, aka upcase-region.
So yes, I do make Caps Lock an additional Control key. I don't just swap them, I eliminate Caps Lock entirely.
I'm not an emacs user, but I use Unix heavily with programs such as screen (and, cough, vim) which use control a lot, and I bind my caps lock to control. Caps lock is a useless key that should have never made the typewriter->computer transition.
Yes I do remap CAPSLOCK to control.
I kept one of my old Sun keyboards with control where God intended it until it would not work with the new UltraSparcs. Ever since I have always remapped them, even if it did result in some odd blinking light behavior on some machines.
Absolutely yes, and I'm really happy with it. Caps Lock is simply unuseful and irritating, switching it to a Ctrl will:
Save you from awkward positions
Save you from accidentally activating Caps Lock
I also have useless MSWindows on my keyboard, so now I have three Ctrl keys on the left-hand side: Caps Lock, Ctrl, and LWin.
RWin generates "menu", which runs execute-extended-command (just like M-x). I'd never even tried pressing it until last week, so I don't know how long that's been the case for, but I'm trying to get accustomed to it.
I'm also trying to get used to using the right-hand Ctrl key when the keys to be modified are on the left side of the keyboard, and not in immediate range of (one of) the left Ctrl keys.
I do, both on windows and linux.
A show of hands? I have been using Emacs on and off over the past 5 years or more. Never bothered about the caps lock key. I do not bind it to control key. C-x C-u did the work every time. I can't recall any instance of having hit the caps lock when i was reaching out to 'a' or tab or 'shift'.
My be it it time for me to change the key binding. I get pain in the hands while typing. I'm going to try and see if having caps lock as control helps.
I found that using 'alt' as 'ctrl' and 'win' as 'alt' is better than the well known 'capslock' method.
Google 'lisp keyboard' you'll get a better idea what I'm suggesting and why Emacs has so many 'ctrl' combinations in the first place -- at the time it's invented the keyboard layouts doesn't look like what it is today.
After failed multiple times trying to use 'capslock' as 'ctrl', now I love the 'alt' way.