help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy Paste in no-x11 mode (emacs -nw)


From: Simeon Nifos
Subject: Re: Copy Paste in no-x11 mode (emacs -nw)
Date: Fri, 26 Sep 2008 15:26:19 +0300

On Fri, Sep 26, 2008 at 12:40 PM,  <help-gnu-emacs-request@gnu.org> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]