Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #243355 > unrolled thread
| Started by | mick crane <mick.crane@gmail.com> |
|---|---|
| First post | 2021-12-22 15:10 +0100 |
| Last post | 2021-12-22 21:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.debian.user
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
tmux and nano in console mick crane <mick.crane@gmail.com> - 2021-12-22 15:10 +0100
Re: tmux and nano in console Markus Schönhaber <debian-user@list-post.mks-mail.de> - 2021-12-22 16:40 +0100
Re: tmux and nano in console "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-12-22 19:10 +0100
Re: tmux and nano in console mick crane <mick.crane@gmail.com> - 2021-12-22 21:20 +0100
| From | mick crane <mick.crane@gmail.com> |
|---|---|
| Date | 2021-12-22 15:10 +0100 |
| Subject | tmux and nano in console |
| Message-ID | <Dxatz-5YL-1@gated-at.bofh.it> |
I'm trying to use the console to see if my editing problems go away. Want to copy lines from one file into another. Splitting the screen with tmux with the 2 files opened in nano the nano buffer is not shared. Seems can have more than one buffer in nano but the things I want are not in the same file. If use the mouse to select text in one file in one tmux window the selection goes across both windows/files. Is there a way in console to achieve copying lines from one file to another ? mick -- Key ID 4BFEBB31
[toc] | [next] | [standalone]
| From | Markus Schönhaber <debian-user@list-post.mks-mail.de> |
|---|---|
| Date | 2021-12-22 16:40 +0100 |
| Message-ID | <DxbSG-6Gf-7@gated-at.bofh.it> |
| In reply to | #243355 |
22.12.21, 14:59, +0100, mick crane: > I'm trying to use the console to see if my editing problems go away. > Want to copy lines from one file into another. > Splitting the screen with tmux with the 2 files opened in nano the nano > buffer is not shared. > Seems can have more than one buffer in nano but the things I want are > not in the same file. > If use the mouse to select text in one file in one tmux window the > selection goes across both windows/files. > Is there a way in console to achieve copying lines from one file to > another ? Since tmux knows how to cope with tmux' panes, what's wrong with using the copy/paste functionality tmux provides? -- Regards mks
[toc] | [prev] | [next] | [standalone]
| From | "Alexander V. Makartsev" <avbetev@gmail.com> |
|---|---|
| Date | 2021-12-22 19:10 +0100 |
| Message-ID | <DxedP-8br-5@gated-at.bofh.it> |
| In reply to | #243355 |
[Multipart message — attachments visible in raw view] — view raw
On 22.12.2021 18:59, mick crane wrote: > I'm trying to use the console to see if my editing problems go away. > Want to copy lines from one file into another. > Splitting the screen with tmux with the 2 files opened in nano the > nano buffer is not shared. > Seems can have more than one buffer in nano but the things I want are > not in the same file. > If use the mouse to select text in one file in one tmux window the > selection goes across both windows/files. > Is there a way in console to achieve copying lines from one file to > another ? > > mick 'tmux' was made to let people work in console without using a mouse. Ideally, to do everything without even touching a mouse at all and always keep their fingers on 'A' 'S' 'D' 'F' and 'J' 'K' 'L' ';' keys. Like when you use 'vim' (or 'nano' in your case), you just type and use memorized key combinations to perform actions on text, buffers, etc, and in case of 'tmux' , on text inside multiple panes. Personally, I've failed to memorize all the commands of 'tmux' and 'vim' and "be efficient and fast without a mouse", as it says on a tin. But I've managed to remember a few major ones and still enjoy working inside several consoles on a single screen and do that quite frequently. AFAICR I had to personalize configurations for both 'tmux' and 'vim' , so they would use clipboard of X server instead of their own buffers. I can use mouse to select and copy lines of text in linear or in rectangular fashion: Rectangular fashion: Hold Shift + Hold Ctrl + Press and hold LMB at the beginning of the text you want to copy; Move mouse to select wanted text lines and release LMB; Click LMB on the selected text and then release Shift and Ctrl keys. Linear fashion: Hold Shift + Press and hold LMB at the beginning of the text you want to copy; Move mouse to select wanted text lines and release LMB; Click LMB on the selected text and then release Shift key. Linear fashion for a single 'tmux' pane: Press and hold LMB at the beginning of the text you want to copy; Move mouse to select wanted text lines and press 'y' key; Then release LMB. To paste copied text press "Ctrl + v" or "Shift + Ctrl + v" or "Shift + Insert" or "Shift" + "p" (if you would use 'vim'). If my directions work differently for you, here I've tried to gather, hopefully, relevant config lines from my "~/.tmux.conf": ========8<============8<============8<============8<==== ## Mouse mode enabled by default set -g mouse on ## Use vi control scheme by default set-window-option -g mode-keys vi ## Use system buffer for copy paste operations in tmux bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection bind -T copy-mode-vi y send-keys -X copy-pipe "xclip -sel clip -i" bind P paste-buffer bind-key -T prefix PageUp copy-mode -eu bind-key -T prefix PageDown copy-mode ========8<============8<============8<============8<==== Btw, keys 'v' (visual mode select) 'y' (copy text) and 'P' (paste text) are for the same actions in 'vim' , so they are easier to remember. Also, I use Xfce and "xfce4-terminal" so my instructions may not work if your DE is different. -- With kindest regards, Alexander. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄⠀⠀⠀⠀
[toc] | [prev] | [next] | [standalone]
| From | mick crane <mick.crane@gmail.com> |
|---|---|
| Date | 2021-12-22 21:20 +0100 |
| Message-ID | <DxgfD-T4-7@gated-at.bofh.it> |
| In reply to | #243363 |
On 2021-12-22 18:00, Alexander V. Makartsev wrote: snipped lots of useful stuff. > Also, I use Xfce and "xfce4-terminal" so my instructions may not work > if your DE is different. Thanks very much I'll use those tips. I just started using tmux today and looks handy. Seems may be like screen as well which I've not really used either. I'm using because something doesn't seem to like something I've done and so far not having problems in console so likely something in X. cheers mick -- Key ID 4BFEBB31
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web