Tag Info

New answers tagged

0

EMACS will convert multiple slashes to a root path, e.g. // becomes / If you were to leave whatever text is in the minibuffer append a / paste the absolute path in the minibuffer, appending it to existing text The minibuffer will have a path such as ~//path2file/file EMACS will open /path2file/file There's no need to reassign Ctrl+K, just learn how ...


0

This have bothered me in the past as well. The solution I found was to make Ctrl+K a delete only command. This worked for me, as I never used Ctrl+K to copy and paste. Originally posted here ;; Ctrl-K with no kill (defun delete-line-no-kill () (interactive) (delete-region (point) (save-excursion (move-end-of-line 1) (point))) (delete-char 1) ...


4

You can actually do this with xclip. The secret is the -t option, which refers you to the ICCCM Section 2.6.2. Which I confess I don't blame you for failing to read... Anyway, an example, I have just right-clicked your avatar in Chromium and selected "Copy Image": See what targets are available: $ xclip -selection clipboard -t TARGETS -o TARGETS ...


0

As for the second part of your question where in you specified that when pasting from other applications to vim it adds tabs/spaces. Try adding this to your ~/.vimrc set paste or in vim before pasting in normal mode press "shift" + ":" and type "set paste"


1

If you have xterm_clipboard feature, you can use the * and + registers. These registers interface with the X11 primary selection buffer, and clipboard (respectively). Thus if you've copied something via CTRL+c, you can paste it in vim with "+p. If you've simply highlighted it without copying, you can paste it with "*p. You can also make the * buffer the ...


3

To save a lot of clipboard text to file quickly, you can run cat > file.txt, paste the contents, then press Ctrl-d. If you have xsel installed, you can do :r !xsel to insert the "primary" (aka. "mouse") selection in Vim, or :r !xsel -b to insert the "clipboard" (Ctrl-c) buffer. You can also save the selection directly to a file with xsel >file.txt or ...


1

One workaround is using (remotely accessed) scratch files to transfer the text: In case you can SSH back to your own system, you can just :split scp://hostname/path/to/file, put the yanked text there, and :write. If you can just use SSH from your system to the server box, open Vim locally and access the scratch file from the server: vim ...


2

mouse=a prevents the ability of copying and pasting out of vim with readable characters. Change mouse=a to mouse=r and that should fix your issue with that. one thing I am wondering is, are you changing the config file for your vim with the mouse set to mouse=a? orignal answer ^ If mouse=r doesn't give you all the copy past options change it to mouse=v ...



Top 50 recent answers are included