I am trying to install vim 7.3 locally on a red hat machine in which
I have a user account. I downloaded the source code from vim.org and
ran the following commands.
./configure --prefix=/home/<username>/.local --enable-gui --with-x --
with-features=normal
make install DESTDIR=/home/<username>/.local
Now, I am unable to copy the data to/from the system clipboard. I
googled to find out that that this happens when vim is compiled
without X/gui support. Hence, I tried the options (given above) while
compiling, again with the same results. Can someone help me out?
Given below are the version details (obtained by entering :version
from vim)
--------------------------------------------------------------------------------------------------------------------------------
Normal version with X11-Motif GUI. Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
+cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui
+diff
+digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -
farsi
+file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input -iconv +insert_expand +jumplist -keymap -langmap
+libcall
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession
+modify_fname
+mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm
-mouse_sysmouse +mouse_xterm -multi_byte +multi_lang -mzscheme
+netbeans_intg
-osfiletype +path_extra -perl +persistent_undo +postscript +printer -
profile
-python -python3 +quickfix +reltime -rightleft -ruby +scrollbind
+signs
+smartindent -sniff +startuptime +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: "/home/<username>/.local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -
DFUNCPROTO=15
-DNARROWPROTO -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lXext -lXm -lXpm -lm -
lncurses -lselinu
x -lacl -lgpm
--------------------------------------------------------------------------------------------------------------------------------
Thanks in advance.
Anith.
I don't think you need DESTDIR there - I tried your command and it
caused vim to be installed in
/home/<username>/.local/home/<username>/.local, which looks wrong. So,
maybe when you started vim, you actually used a different binary than
you had just compiled, because it was installed in another place.
Everything else looks ok to me.
> Now, I am unable to copy the data to/from the system clipboard.
Are you accessing the system via ssh? Make sure you use ssh -X flag to
enable X11 forwarding. Check that $DISPLAY environment variable is
set.
X11 clipboard is vim's register +, so use "+p and "+y commands to access it.
This Vim version should be able to use the system clipboard, as long as
it is running in a terminal with an X connection. So:
- running Vim in the linux console (Ctrl-Alt-F1 to Ctrl-Alt-F6) or
invoking it with -X on the command-line, prevents communication with the
clipboard.
- In gvim or in Vim-in-xterm you should be able to use the + register
which is what most programs use with Edit → Paste, Edit → Copy, Edit →
Cut, or the * register which is what most programs use for a selection
or for MiddleMouse pasting. Unlike what happens on Windows, on X11
systems these two registers are distinct.
- In gvim, you can also use Edit → Paste, Edit → Copy, Edit → Cut
- The Visual area is normally not automatically copied into "* -- if you
want it (which I don't recommend) you can use
:set clipboard+=autoselect guioptions+=a
- In gvim, or in terminals where Vim can access both the mouse and the
clipboard, you can use <MiddleMouse> to paste the * register.
- About downloading the source code: you are aware, aren't you, that as
of this writing there have been 356 bugfixes since Vim 7.3 was released?
See http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
about how to get the latest sources.
Best regards,
Tony.
--
"Gosh that takes me back ... or forward. That's the trouble with time
travel, you never can tell."
-- Dr. Who
1) The server already contains vim 7.2, which works fine. (i.e if I
invoke vim 7.2 which is there in the default path, I am able to cut/
paste from/to the clipboard). The issue occurs when I invoked the
gvim binary I created on my own (because I wanted vim 7.3, and the
administrator has not yet installed it in the common directory) in my
local "bin" directory.
2) I have vim created in my ~<user>/.local/home/<user>/.local/bin,
but moved it to ~<user>/.local/bin manually (along with the share
directory). I hope this is fine. I always invoke the newly created
gvim binary by giving the full path.
3) I am using a linux "konsole"
4) I had already tried out the Edit-copy-paste and the clipboard
registers "*" and "+". But they didn't work :(
5) I can re-compile and re-generate the vim binaries, if any of the
options I used is incorrect.
6) Has this got anything to do with me not having administrator
permissions? (I hope not)
Regards,
Anith.
On Nov 30, 5:19 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> Seehttp://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
It started working once I got the latest patch for vim 7.3.
Thanks a lot to Tony for suggesting this.
Regards,
Anith.