I want to ssh to a remote server, open vim, split a file, and drag the split separator around with the mouse. More importantly, I want to use the "* register, so I can select text with the keyboard and put it into my local X buffer (to paste with shift-insert). None of this currently works for me.
X11 forwarding is working - xclock on the remote server displays on my local screen.
The terminal window title does change when I edit different files.
I have compiled GUI support into the remote vim -
Normal version with GTK 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
+float +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_sysmouse +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
Is there something I am missing?
--
.
$ euses g | grep mouse
gpm - Adds support for sys-libs/gpm (Console-based mouse driver)
kde-base/kcontrol:logitech-mouse - Build the Control Center module to
configure logitech mice
$ eix ^gpm -o ^vim$
[I] app-editors/vim
Available versions: 7.0.235 ~7.0.243 7.1.123 ~7.1.330 7.2.182
~7.2.264 ~7.2.303 {acl bash-completion cscope debug gpm minimal nls
perl python ruby vim-pager vim-with-x}
Installed versions: 7.2.182(07:39:55 14/09/09)(acl nls perl
python -bash-completion -cscope -gpm -minimal -ruby -vim-pager -vim-
with-x)
Homepage: http://www.vim.org/
Description: Vim, an improved vi-style text editor
* sys-libs/gpm
Available versions: 1.20.1-r6 1.20.5 ~1.20.6 {selinux}
Homepage: http://linux.schottelius.org/gpm/
Description: Console-based mouse driver
Found 2 matches.
$
This would appear to be "mouse_gpm" on your distro. No idea if it will
work across X11, though.
Stroller.
I just wanted to report that I do have this working, although often
times it gets in the way for me so I may turn it off in the future.
Jason
Just thought I'd mention an alternative -- use netrw and edit the file
locally. vim scp://hostname/path/file will let you edit the file
locally, using the mouse/selection locally, and when you :w the file
will be saved back to the remote machine.
Regards,
Chip Campbell
Aha. I installed gpm-devel (gpm was already installed) and I can now make use of "*, but I still can't move the separator around with the mouse.
I can't use netrw because I have to run the file on the remote machine and do other things that require the remote environment set.
--
.
You seem to be having two separate issues. As far as getting the
mouse working, the only requirements are that a) your terminal
emulator supports sending mouse clicks to applications, b) you have
+mouse compiled into your vim (you do), and c) that the 'mouse' and
'ttymouse' options are set up to allow it. Try :set mouse=a if you
haven't already, that might be all that's needed. Otherwise, we'll
need more info.
Your other issue is talking to the X server. If x forwarding is
working properly, this should just work. If you launch terminal vim
on the remote, and then use the :gui command, does the Vim window "pop
out" into a new GVim window? That would be a good way to make sure
that vim can talk to the x server. Another quick way would be to copy
some text to the clipboard on the local machine, and then check with
:reg if it shows up in the * or + registers on the remote machine.
After telling us the results of those tests, we'll probably be in a
much better position to help.
~Matt
ttymouse=TERM and mouse=a. What more info would you like? :)
>Your other issue is talking to the X server. If x forwarding is
This is working now, since I installed gpm-mouse.
--
.
ttymouse shouldn't be set to TERM, it should be set to either "xterm"
or "xterm2". What terminal emulator are you running? Do things work
properly with a local vim instance running in that terminal?
>> Your other issue is talking to the X server. If x forwarding is
>
> This is working now, since I installed gpm-mouse.
Strange - gpm should only be required if you're ssh'ing from a linux
virtual console (ie, /dev/tty1 by doing ctrl-alt-f1); it shouldn't
affect things using an X11 terminal...
~Matt
If X11 forwarding is working, why not just use gvim instead of vim?
You can start gvim from the remote server and have full mouse support.
For console vim, I can't even use mouse to drag the split separator
locally. So this is not a problem with remote server, it is about the
configuration of your console vim.
Sorry, that was a typo. ttymouse is indeed 'xterm'. I'm using mlterm, and things do work properly locally.
>Strange - gpm should only be required if you're ssh'ing from a linux
>virtual console (ie, /dev/tty1 by doing ctrl-alt-f1); it shouldn't
>affect things using an X11 terminal...
Yeah, well, I dunno. 'Stroller', in a previous reply, suggested that it was an issue with "mouse_gpm" in the distro, so I just installed it and it worked.
--
.