On 08/12/09 17:35, Peter Princz wrote:
> Dear vimmers on this list,
> please help me with my problem, it is driving me crazy, I'm giving up.
> It is the flip question that we normally have, i.e. I cannot reproduce a
> behaviour on a fresh install that works as expected on my machine, I
> just can't remember how did I this.
> I am on gvim 7.2 in parallel on linux and windows.
> Have one vimrc file that is named as _vimrc on windows and .gvimrc on
> linux.
this is dangerous: _vimrc is sourced on every startup, before the
plugins; .gvimrc is not sourced at all in Console Vim and only after the
plugins in gvim. Even on Unix, ~/_vimrc will be used if there is no
~/.vimrc so you could soft-link it under its own name, let's say
something like
cd
ln -sv /mnt/dos/c/Documents\ and\ Settings/princzp/_vimrc
rm -vf .gvimrc
Of course, modify the above depending on the Unix mount point for
Windows C: partition and for the exact name of your Windows $HOME directory.
> I am using ctrl-ins, shift-ins for copy/paste on windows as well,
> ctrl-v is vsual block in both environments.
> Everything is fine, I could not be happier, and I haven't touch these
> _vimrc/.gvimrc files this year.
> Ironically, even mswin.vim is left as sourced i.e. not commented out,
> yet everything works.
> ...And then my colleague walked by and became envy on my ctrl-v and
> clipboard handling shortcuts. But I cannot reproduce my settings at his
> machine.
> My _vimrc is 10 kBytes, my colleague would want just the needed settings
> to be merged into his _vimrc.
Ctrl-V and clipboard handling mappings are those set up by mswin.vim.
They are very "un-vimmish" and they hide useful Vim keystrokes, so I
would advise you (and your colleague) not to use them, but after all,
it's your funerals.
> I've been playing around half on hour by toggling on/off the settings
> one by one I have in _vimrc but still no luck.
> :map shows ctrl-v is not mapped at all, I cannot comprehend how ctrl-v
> does not paste on a windows machine. Even worse, I did that somehow, but
> cannot remember how.
Normally, Ctrl-V in Vim starts Block-Visual if in Normal mode, or
Literal insert in Insert or Command-line modes. However, if you source
mswin.vim, it maps it to "paste from clipboard", whose "normal" Vim
command is "+gP
See also
:menu Edit.Paste
in gvim, or after sourcing $VIMRUNTIME/menu.vim in a Console Vim with
+menu compiled-in.
> It does paste in all other applications, so I must have done something
> within vim and not on Windows level.
> I did find the unix like ctrl-ins, shift-ins copy/paste definition, but
> not ctrl-v to visual mode mapping.
Since you called the file .gvimrc on Unix, you won't have a .vimrc then,
and your Unix vim will run in 'compatible' mode, and, if in Console
mode, without sourcing the file at all.
> This is in my _vimrc:
> ...
> " 2008.11.19: rev18, Peter Princz: Ctrl-Insert/Shift-Insert to
> copy/paste in visual/insert modes
> ...
> " Peter Princz (2008-Nov-19_125207)
> vnoremap <C-Insert> "+y
> inoremap <S-Insert> <Esc>"+gpi
> Please help. If needed, I can send the whole _vimrc file for
> troubleshooting.
> Have a nice day,
> Peter
From the above, it doesn't seem to source mswin.vim at all. To use it
(if you still want to after all my warnings above), check that it
contains one (not both) of
runtime mswin.vim
or
source $VIMRUNTIME/mswin.vim
Best regards,
Tony.
--
To get something done, a committee should consist of no more than three
men, two of them absent.
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php