i m assuming that the tmux prefix is Control+b and that you have emacs style key bindings on
1) enter copy mode using Control+b [
2) navigate to beginning of text, you want to select and hit Control+Space
3) move around using arrow keys to select region
4) when you reach end of region simply hit Alt+w to copy the region
5) now Control+b ] will paste the selection
you can navigate the text using the emacs style navigation key
Control+p, Control+n, Control+f, Control+b etc.
tmux is really great, I’m using it too. However I have a problem when it comes to use emacs inside of tmux. Basically, I have shortcuts defined in my ~/.emacs as follows:
(global-set-key (kbd “M-1″) ‘bs-show)
(global-set-key (kbd “C-1″) ‘bs-show)
(global-set-key (kbd “”) ‘bs-show)
(global-set-key (kbd “M-”) ‘bs-show)
(global-set-key (kbd “C-”) ‘bs-show)
(global-set-key (kbd “S-”) ‘bs-show)
Generally I connect to linux box from Windows using putty. When emacs is running inside of tmux, the only first combination is working: “M-1″ (Alt+1). For M- and C- emacs prints tilda “~”.
When emacs in running without tmux, 1st, 3rd and 4th shortcuts are working.
Is there any way to make other combinations working when inside of tmux? Is it tmux who prevents them to pass to emacs?
Oh, the parser has taken LT and GT signs away. Four last lines are bindings to F2: F2, M-F2, C-F2 and S-F2.
well i suspect that putty is to be blamed here … i use gnu/linux so i really don’t know about this … but i will try and reproduce the problems on a windows box and report back ….
i generally run emacs with X and rarely in a terminal … so i have had problems with copy paste between emacs and tmux. which i solve using a mouse
… any selection with mouse is immediately available with the mouse middle click … so i use that but am not satisfied with it…
as for the parser taking away the LT and GT signs.. next time use the “
” tags when commenting in wordpress with code or commands.
Alt+w does not seem to work for me, it was so simple in screen.
that is strange. what terminal program r u using? xterm? urxvt? u can check if Alt key is sending the right code using xev …
It seems that I had another instance of tmux running, and creating new instances of tmux would inherit the config values from the running instance, instead of “re reading” the config file.
I am using xterm -class UXTerm -title uxterm -u8 -bg black -fg gray.
by the config file do you mean the config file for tmux or that of xterm? in case of tmux you can simply source the new config file (~/.tmux.conf) by
as for how u invoke xterm … i think its best to set all the corresponding values in ~/.Xresources that way when new instances of xterm are launched they will all have the same config.
however with tmux you don’t need to launch new instance of xterm.
simply launch xterm, then start tmux and then if u need a another terminal simply open a new window or pane in tmux
at least that is how i work.
u know what i had some problems with the Alt key when trying to use readline editing features at the command line so i had this in the ~/.Xresources
that really helped.