I just installed tmux. But when I'm using emacs in the tmux environment, emacs doesn't recognize Ctrl as it should. Instead it is I believe recognize as Meta CTRL = M + [ ??)
Is there any special binding line to write in the config file of tmux ?
Related
Invoking 'shell' by M-x shell,
and plan to start a tmux session
it report errors
$ tmux
open terminal failed: terminal does not support clear
What's the problem?
If invoking `ansi-term', the operations of yanking and pasting are invalid.
So, shell perform better than ansi-term in routines.
How could activate tmux within a shell
tmux needs a real terminal, and shell doesn't provide that (as implied by the error you get). So you need to use term with tmux.
Or you can use built in functionality of Emacs to have features of tmux. E.g. C-x 2 and C-x 3 will split the frame into windows so you can have multiple terminals in a frame (an Emacs frame is what most applications would call a window). Start an emacs server and emacsclient to have sessions that you can connect to and keep running after you close the frame.
Copy (M-w) and paste (S-<insert>) should work by default. If you want to play with bindings, the key map is called term-raw-map and the commands are kill-ring-save and term-paste.
Also learn the difference between term-line-mode (C-c C-j) and term-char-mode (C-c C-k). Briefly, line mode behaves more like shell, and char mode behaves more like a real terminal, with most Emacs keybindings unavailable. I personally keep term buffers in char mode almost always and add some keybindings to term-raw-map so I can run certain Emacs commands.
This question already has an answer here:
Why does Ctrl+. not work when I bind it to a command in Emacs?
(1 answer)
Closed 9 years ago.
I recently installed jedi from el-get master branch.
jedi binds C-. for jedi:key-goto-definition but it's only working in X mode. It fails to bind when launched with -nw(no X) mode in both Emacs23 and Emacs24.
So, I tested simple binding in scratch buffer and then evaluated by C-x C-e.
(global-set-key (kbd "C-.") 'find-name-dired)
It worked well in X mode, but failed in no x mode(-nw).
Do you have any idea?
Thanks in advance,
Edited
Here are some results of C-h k C-. after installing above command:
$ emacs -nw -q (without X)
. runs the command self-insert-command, which is an interactive
built-in function in `C source code'.
It is bound to many ordinary text characters.
(self-insert-command N)
$ emacs -q (With X)
C-. runs the command find-name-dired, which is an interactive
autoloaded Lisp function in `find-dired.el'.
It is bound to C-..
(find-name-dired DIR PATTERN)
The terminal can't represent C-.. Find another key sequence and use ut, e.g. C-c ..
How can change this behaviour:
C-s — start incremental search
type word — misprint the last character
Backspace — Oops! incremental search disappears, and I actually delete 1 character from the buffer.
to that one:
C-s — start incremental search
word — misprint the last character
Backspace — delete the last d character
type k — work — correct, and continue the search
I run Emacs in text terminal via SSH in PuTTY.
Operating system version: 2.6.16.60-0.58.1.1882.3.PTF.638363-smp #1 SMP Wed Dec 2 12:27:56 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
Emacs version: GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.14.6) of 2010-07-16
With the -q option, Backspace sent by PuTTY is just C-h, and it acts like C-h, but in my .emacsfile I it bind to delete-backward-char:
(global-set-key [(control h)] 'delete-backward-char)
Try this:
(define-key isearch-mode-map [(control h)] 'isearch-delete-char)
What you should do is configure PuTTY to send C-? (byte 127) for Backspace instead of C-h (byte 8). This is the setting that works best in most circumstances. See the
PuTTY manual.
If you changed the PuTTY setting to send C-h because some other application didn't work, check that your terminal settings are correct on the server. The setting is often correctly autodetected, but sometimes you may need to add stty erase '^?' to your shell configuration file (.bashrc or similar) on the server.
If you really absolutely have to have Backspace send C-h, then globally rebinding C-h isn't sufficient. Instead, add (normal-erase-is-backspace-mode 1) to your .emacs. See the Emacs manual.
How you should use Emacs:
C-s - start incremental search
type word - misprint the last character
M-e - goes into edit-search-word-thing-mode-in-minibuffer :-)
correct the typo
C-s - continue incremental search
I edited a Bazaar version-controlled file in Emacs 23 and pressed C-x v v to commit the file. After entering the comment and pressing C-c C-c, I received a message that the working tree was out of date and that I should run bzr update. Wanting to "do everything" from within Emacs, I then pressed C-x v + (to run vc-update) but received a message: "Sorry, merge-news is not implemented for Bzr". The same message resulted after entering M-x vc-update. I ran the update from the command-line from outside of Emacs. Any ideas? Why is the command running "merge-news"?
does anyone know how to enable Ctrl-o to switch to normal-mode for one command in viper-mode or vimpulse? In viper-mode it's bound to open-line (which is what it does for vanilla Emacs and in vimpulse it is bound to (vimpulse-jump-backward ARG). I'm using Viper-mode + vimpulse at level 2.
If you're in insert-mode and want to execute one Vimpulse command :
(vimpulse-imap "\C-o" 'viper-escape-to-vi)
(it is bound by default to C-z in insert-mode)