Recently I got a Macbook Pro. I can't manage to copy any sing in mceditor to clipboard and paste. No solutions seems to work.
Command+V - does paste a text from the buffer, but Command+C does nothing, I can't copy to buffer.
As seen in this answer, you can use the ⌘+R shortcut to disable "Mouse Reporting" in your Terminal window.
Or you can leave "Mouse Reporting" on to be able to use your mouse in MC, but press Fn to disable it just while selecting text to copy.
More details in this answer.
Run mc with -d switch (mc -d). It will disable mouse features in mc and now you can copy with LMB+select and paste with Cmd+RMB
1) Select text in File1 by F3(select block)
2) Run Menu (F9 edit/[copy to buff file] aka C-Ins)
3) Open File2
4) Run Menu (F9 edit/[paste from buff file] aka S-Ins)
Related
when I paste the website address to the terminal, the terminal will escape the character.
eg:
I paste the http://stackoverflow.com/questions/ask?title=xxx ,
in the terminal, it will convert into http://stackoverflow.com/questions/ask\?title\=xxx
How to close the escape in MacOS terminal?
Thanks!
If you are asking how to paste into Terminal without escapes: from the menu bar, choose Edit > Paste (default shortcut: ⌘V).
You only get escaping if you use Edit > Paste Escaped Text (default shortcut: ⌃⌘V).
If your menu items have different keyboard shortcuts, you (or someone) has probably customized them using the Keyboard pane in System Preferences. It looks like this (although I haven't customized the Paste shortcuts):
I use iterm in Mac as my command line terminal. In iterm I use tmux as the terminal manager. When I open my code files in Vim copying has become painful in this. To copy text in vim I need to hold "option" key and then select the text. When holding option there are multiple issues:
1) I am unable to scroll while in select mode
2) When I split my terminal into 2 panes, select using option copies across panes making it tough.
I am not sure about the reason for this issue and where to find a workaround. Could anyone help me with it?
You cannot depend on iTerm's clipboard support because it will not know anything about Vim's or tmux's splits. Use native Vim copy instead.
:help v
:help V
:help y
:help d
:help "*
:help clipboard
So e.g. in order to copy two lines, you can do "*2yy (to clipboard register, two line yank); or you can mark something using visual mode, then just "*y (to clipboard register, yank). If you want the clipboard register to be always automatically used unless another register is specified, you can add the following to your .vimrc:
set clipboard+=unnamed
Then a simple 2yy will copy two lines, and you can just paste it in iTerm or any other application.
Has anyone found a good way to copy all lines from VIM in cygwin?
I've tried yanking the lines but it doesn't go to windows clipboard. Any ideas?
This seems to be a solution but it is a lot of work for copy/paste:
http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim
UPDATE:
this works:
echo 'put this on my windows clipboard' > /dev/clipboard
BUT doesn't work for me because I want to copy to clipboard while SSH'd into another machine. So echo'ing/cat'ing to /dev/clipboard will put it on the other machine's clipboard, not mine
There may be better ways, but here's how I do it:
Use visual mode to highlight lines to be copied to clipboard (From command mode, v, then navigate normally to highlight).
"+y
to copy to clipboard.
Since the question asks how to copy everything:
ggVG"+y
This is maybe not as easy as you wanted it to be, but here is how I usually do it myself:
:w
:!cat %
This will display your file, and you can copy it from there.
In Sourcetree when you click Terminal and use the vagrant ssh command in the window, how to paste text from your clipboard?
These don't work:
Ctrl + V
Ctrl+Shift+Ins
Right clicking in the window and selecting Paste.
To paste into it when using Windows, you have to:
Right click on the top bar
Select Edit
Select Paste
Using this command:
http://www.hypexr.org/bash_tutorial.php#vi
I'm able to use vim commands in the bash. But, what I'd like to do is copy and paste from that (bash) into vim and vice-versa.
I know there are other posts on here using the middle mouse button, but I use putty to connect to linux boxes, and the middle mouse performs a selection, just like the left click drag.
I'm not looking for something that will modify my windows clipboard. Selecting in vim is useful for transfering stuff to and from windows, but I'd like a solution that will work both through putty and using a direct terminal.
Thanks in advance...
I use the copy&paste feature in screen. ctrl-[ to enter copy mode and ctrl-] to paste. There are different buffers and the ability to dump to a file. It's pretty powerful. The default is to copy lines, but you can curtail by columns join display lines into a single copied line (and other options). And since you would likely already be in screen when you run vim, you would have the paste buffer available. I also have hooks to copy the buffer to/from the X clipboard.
I don't know if that can help you, but I have installed a utility called xclip, which shares the X11 clipboard with VIM. I mainly use it to copy and paste between instances of VIM running in different terminal windows.
I typically use xclip with the following mappings, which keep a very similar behaviour to the usual yank and paste commands, but using the clipboard:
nmap `yy :.w !xclip<CR><CR>
vmap `y :w !xclip<CR><CR>
nmap `p :.r!xclip -o<CR>
nmap `P :.-r!xclip -o<CR>
Use the * (or + in X Windows) registers to reference the system clipboard. Anything yanked-to or pasted-from those registers can be used to cooperate with other applications:
Cut/Copy examples
"*yy : copy current line to the system clipbard
gg"*yG : copy current file to the system clipbard
"*dd : cut current line to the system clipbard
etc, etc
Paste examples
"*p : paste the system clipbard
Or in insert mode:
i Ctrl+r *
Or
i Ctrl+r Ctrl+p *
(the last one pastes withouth formatting, useful to avoid those ugly pastes from the OS clipboard where each indented line appears more and more shifted)
You can copy from/to the clipboard in both vim and bash using ctrl + ins for copy, and shift + ins for paste.