From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Simeon Nifos" Newsgroups: gmane.emacs.help Subject: Re: Copy Paste in no-x11 mode (emacs -nw) Date: Fri, 26 Sep 2008 15:26:19 +0300 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1222432036 30556 80.91.229.12 (26 Sep 2008 12:27:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2008 12:27:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 26 14:28:03 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KjCQM-0004hG-C8 for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Sep 2008 14:27:54 +0200 Original-Received: from localhost ([127.0.0.1]:50916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjCPJ-00036O-N5 for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Sep 2008 08:26:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjCOs-00035v-Rt for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 08:26:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjCOr-00035N-86 for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 08:26:22 -0400 Original-Received: from [199.232.76.173] (port=35956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjCOq-00035B-Uc for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 08:26:20 -0400 Original-Received: from wx-out-0506.google.com ([66.249.82.230]:40156) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KjCOr-0003Vi-34 for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 08:26:21 -0400 Original-Received: by wx-out-0506.google.com with SMTP id s15so227337wxc.24 for ; Fri, 26 Sep 2008 05:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=JR7ZgnGRqvHPplucqjoQwqOwM2jh38vxn6/jjvX28lk=; b=GthxL2S1dA2dNdBKrvAD1AufJrUEBoCh7SEmWHSMaxRD+LgR7E8oY8FC8f64AqVu1J hKBxoIBOd6kwin558rwjZEZtOhERE/70HsGoCqaWtJYiNa9aHH0aZRTuidfhSYsERT2V Ak2dVH/K3o/I+QpRx2QaDplnTPa8pzB3UI6sM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Q0M6zhaYm9UXrsy42ftnnFWNzS3BHTfP1iRWo/gu3VPCGyJZR7bpwjPlEy/+O1xMNL 9Fi8bZq0/5Jzo4KY4o3/5i/fNhkmWKtGZ3P6U/eVgShljM1kMHCxD0P0MQ2BE3ichIsn d+GclCUrqPo8CFRS6IRK4Dy8tNGZyyoe6e44o= Original-Received: by 10.151.9.1 with SMTP id m1mr1909739ybi.140.1222431979760; Fri, 26 Sep 2008 05:26:19 -0700 (PDT) Original-Received: by 10.151.83.13 with HTTP; Fri, 26 Sep 2008 05:26:19 -0700 (PDT) Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58106 Archived-At: On Fri, Sep 26, 2008 at 12:40 PM, wrote: > Send help-gnu-emacs mailing list submissions to > help-gnu-emacs@gnu.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > or, via email, send a message with subject or body 'help' to > help-gnu-emacs-request@gnu.org > > You can reach the person managing the list at > help-gnu-emacs-owner@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of help-gnu-emacs digest..." > > Hello, I will answer to all of you within this single post: > What are you using to paste in vim. "p"? To my knowledge that > shouldn't work, either. (And doesn't, on my machine.) I highlight text with the mouse and then press the middle mouse button in vim where I want to paste it and it does it without destroying the format. I had to do some searching for corresponding configuration of the VIM .vimrc, and also use VIM compiled with clipboard enabled. If you type $ vim --version VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 5 2007 01:40:01) Included patches: 1-56 Compiled by buildd@crested.buildd Huge version with GTK2-GNOME GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -DORBIT2=1 -pthread -DPNG_NO_MMX_CODE -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/gail-1.0 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/libpng12 -O2 -g -Wall -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.8/CORE -I/usr/include/python2.5 -pthread -I/usr/include/tcl8.4 -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/x86_64-linux Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E -L/usr/local/lib -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lXfixes -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgnomeui-2 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lXfixes -lgconf-2 -lgmodule-2.0 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0 -lXt -lncurses -lgpm -Wl,-E -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl/5.8/CORE -lperl -L/usr/lib/python2.5/config -lpython2.5 -lutil -Xlinker -export-dynamic -L/usr/lib -ltcl8.4 -lieee -lruby1.8 -lm this is what I get. Notice +clipboard and similar +clipboard_xterm and other +mouse_xterm e.t.c. Most vim packages have disabled those configurations. I am installing vim running in an Ubuntu/Debian based system: # apt-get install vim-full If you have something similar then highlighting text somewhere and pressing the middle mouse button will get you the copy paste effect you ask for. > * All keys work, regardless of terminal settings. > * I can steal system keybindings (like cmd-h) > * System integration (copy&paste) > * Ability to spawn new frames (mostly for `gnus-other-frame') > * Appearance modifiable by elisp > * More and nicer colors > * Tetris looks way better :) > * Usable fringes (i.e. Edebug doesn't draw over text) > * Scrollbar (I don't use it, but it's nice visual location info) > Nice GDB DEBUGGING interface. > Speed is the most important thing -nw has, of course. The looks on the > other hand are very customizable. Hiding the toolbar and menubar were > the first things I did. Can you tell us how? Moreover, could you please tell us how to move the border up or down, left or right separating the 2 windows the original window is splitted to when one presses C-x 2, or C-x 3? Guys this is amazing: ================= Enabling syntax highlighting in vim, if you browse a huge C,C++ file, you will see that vim slows down significantly even when running on latest Intel Core 2 Duo processor. On the contrary emacs -nw with syntax highlighting on is as fast as VIM without syntax highlighting as if highlighting has no overhead at all. ================= > If you use screen, you can copy from there just like in emacs: > Assume screen prefix key is C-p: (default is C-a) > > C-p [ ==> SPC ==> C-f or/and C-n ==> > > > Now you have a copy of the text in a file named ~/.screen_exchange > to set it, write in your .screenrc: > > ,---- > | bufferfile $HOME/.screen_exchange > `---- > > Note: i think the default if you set nothing is /tmp/.screen_exchange > but i am not sure. > > Now if you define a little function with a global-key like: > > ,---- > | (defun tv-yank-from-screen () > | (interactive) > | (insert-file-contents "~/.screen_exchange")) > | > | (global-set-key (kbd "C-c Y") 'tv-yank-from-screen) > `---- > > you can now yank what you want from your terminal :) Thank you for the long reply, but neither of those C-p or C-a works for me. Jonathan thanks very very much. Shift-Insert works for me as well I am running E17. I hate KDE since it is too buggy and very heavy as a desktop. Not to mention that it crashes frequently and the latest 4.1 is a wrong decision from the very beginning. > Put in those terms, the problem is then how to get M-w to also place > the item into the system clipboard (for -nw), I would much rather do > that than to have to reach for the mouse. I agree, any ideas? I would like to do the Shift-Insert thing with the mouse. The usual way, highlight text and press middle mouse button for the paste. Any ideas? Thank you all but lets try to get this a bit further since it is a really useful feature that is missing and it makes our life harder.