Questions tagged [cua-mode]

Emacs Cua-mode allows one to use ‘C-v’, ‘C-c’, and ‘C-x’ to paste, copy, and cut the region.

From EmacsWiki: Cua Mode:

Cua-mode allows one to use ‘C-v’, ‘C-c’, and ‘C-x’ to paste, copy, and cut the region. Since this conflicts with very important keybindings in Emacs, these CUA bindings are only active when the mark is active. The package does a whole lot more, too: ‘C-z’ to undo, Shift-movement to select, and it includes support for rectangular regions (‘C-RET’ and arrow keys instead of using the C-x r …’ keys) and registers (instead of using the register commands), and it uses’ and `S-’ to indent and outdent the region. As you can see, it is very powerful!

16 questions
35
votes
9 answers

How select a rectangle in emacs

In Notepad++, you can press Alt-LeftMouseClick-Drag to select a rectangular region. How do I do this in emacs (windows) ? I tried the methods in http://www.emacswiki.org/emacs/RectangleCommands but my selection happens as a regular region instead of…
user3740959
  • 455
  • 1
  • 4
  • 6
5
votes
2 answers

Emacs: Is there a better PgDn/PgUp behaviour with cua-mode?

I'd like the PgUp and PgDn keys to just move the contents of the shown file upwards or downwards, but the cursor (point in Emacs Lingo) should stay where it is (on the screen). Unfortunately the default Emacs behaviour is different. The default…
pesche
  • 3,054
  • 4
  • 34
  • 35
4
votes
1 answer

Understanding Emacs CUA mode for shift click selection

I'm new to Emacs and figuring out how to enable shift-click selection. On the EmacsWiki page for CUA Mode, the following code snippet outlines how to do this: ;; shift + click select region (define-key global-map (kbd "") 'ignore) ;…
Justin Wong
  • 1,455
  • 3
  • 18
  • 25
3
votes
3 answers

Emacs: Disable shift-selection in CUA-mode

I managed to disable the built-in shift-selection via (set-variable 'shift-select-mode nil). And I like the C-Ret-column-selection of CUA-mode. But CUA automatically enables shift-selection (but seemingly not via the variable…
phimuemue
  • 34,669
  • 9
  • 84
  • 115
2
votes
1 answer

Emacs: How to redefine Ctrl-Enter when CUA-mode is enabled?

If cua-mode is enabled, redefining Ctrl-Enter does not works as expected and always runs cua-set-rectangle-mark function. In the code below you can see that I also defined Alt-Enter to my function, just for testing, and it runs fine. But I wish to…
Márcio Moreira
  • 477
  • 4
  • 16
2
votes
0 answers

How to undo while in cua-mode using rectangle selection?

A short example: While writing text I mistype an "f" (Screenshot 1) and want to undo it using C-z. The result is a missing rectangle selection and the last line having still an "f" (Screenshot 2). abcdf abcd abcdf --> abcd abcdf …
bu5
  • 21
  • 3
2
votes
1 answer

How do you rebind a key set by CUA mode in Emacs?

In my .emacs I have: (cua-mode 1) I would like to use Alt-V for next-buffer, but CUA mode sets it to delete-selection-repeat-replace-region. I've tried this: (global-unset-key (kbd "M-v")) (global-set-key (kbd "M-v") 'next-buffer) This doesn't…
Curyous
  • 8,716
  • 15
  • 58
  • 83
2
votes
1 answer

Prevent mouse-selected text from being put into Emacs paste buffer?

In emacs, there is a feature where if I select text with a mouse, then without pressing ctrl-c I can paste into emacs with ctrl-v if I have cua mode turned on. I want to turn off this feature while keeping the cua mode on. I mean I want to…
smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
1
vote
1 answer

Change Speed Before Ctrl+C with Region Selected activates The Copy Command Instead of Allowing Other Commands On Region

Is there a way to change the speed before the copy command executes when pressing Ctrl+C with CUA bindings set. If you press it fast enough you can execute commands on the region and the copy command is ignored. This setting is quite fast and I…
J Spen
  • 2,614
  • 4
  • 26
  • 41
1
vote
1 answer

emacs CUA-mode OK in X but not working console

I have been struggling to get emacs CUA-mode working in the console where it works fine in X (in an xterm using emacs -nw). The main features I want are shift-movement selection and ^C,^V,^X but any more would be helpful. So far I am using a local…
Richard
  • 11
  • 1
0
votes
1 answer

Interaction between transient-mark-mode and cua-mode?

I'm writing some custom functions to move the point in specific ways, and I'm running into issues to manage the mark & region properly. For illustration purposes, here are a few lines of codes which don't do much really, they merely bind the [home]…
DaveC
  • 115
  • 8
0
votes
1 answer

Emacs 24.5 , CUA mode. Not paste text in the minibuffer

In Windows 7 / Emacs 24.5 Copy text e.g. "example" in the kill-ring M-x C-y (yank) Success show text "example" in the minibuffer But if turn on CUA-mode, the text "example" not yank (paste) by 'C-v' in the minibuffer.
Alexei
  • 14,350
  • 37
  • 121
  • 240
0
votes
1 answer

Turn rectangle mark mode off in org mode in emacs

How do I disable cua's rectangle mark mode when using org mode in emacs? Ctrl + Enter is used by both modes and I'd prefer to just lose cua's functionality when I'm in org mode since I don't usually need to select a rectangle when editing an org…
Bentles
  • 13
  • 3
0
votes
1 answer

Emacs: Calling cua-mode cua-set-rectangle-mark from within custom function

Currently I use cua-mode for its column/rectangle facilities like so (I don't used it for copy/pasting): M-x cua-mode ; Enable cua-mode ; Call cua-set-rectangle-mark Then when I'm done with my rectangle: C-g ; Call…
vab2048
  • 1,065
  • 8
  • 21
0
votes
1 answer

How to execute custom emacs keybindings when CUA MODE is enabled?

C-v originally in emacs moves one screenful, but when in cua mode, it yanks text. So, how do I move one screenful again in cua mode?
XVirtusX
  • 679
  • 3
  • 11
  • 30
1
2