Friday, July 18, 2014

Re: eVim - easy Vim - How to make it work on Ubuntu?

On 18/07/14 08:14, Igor Forca wrote:
> @ZyX, on my Windows machine I have cleaned-up _vimrc all of this Windows specifics. For test the only command in my _vimrc is: "set nocompatible". I even opened vim and execute command: e $MYVIMRC to see if this file really opens up and takes effect and it does. So no Windows specific shortcuts in _vimrc and all of described WORKS successfully on Vim for Windows. But the same does not on Linux (Ubuntu, Suse).
>
> @John Little, I tried starting "vim -u NONE -y file" but still no success, the only shortcuts working is CTRL+A and CTRL+arrow_keys. The same problem on Ubuntu/Suse.

In some Linux distributions, including openSUSE but not necessarily
limited to it, if you use the Vim packaged by the distribution (not one
you compile yourself from Bram's sources), it sources a "system vimrc"
even before checking if there is a user vimrc.

To see, if this is the case on your Vim, do

:version

Near the middle of the output, you'll see a number of locations for Vim
configuration scripts. One of them (usually the first one) is called
"system vimrc file". Open that path/file (often, but not necessarily
always, /etc/vimrc) in the same version of Vim. If it opens a blank
window with [New File] in the status message at bottom, then you don't
have a system vimrc for this Vim setup, you can close the window with
":q!" (including the exclamation mark but of course not the quotes).
Otherwise you'll see what the distro has decided to dump on you "for
your own good". Reading that may be quite instructive; it may even
convince you to use an own-compiled version of Bram's Vim (with the
executable at /usr/local/bin/vim, the runtime files as a tree starting
at /usr/local/share/vim/vim73/ and the system vimrc, if any, at
/usr/local/share/vim/vimrc with no dot or underscore in the filename) so
you won't be a victim of do-gooders who act in your name without your
say-so.

You can even have your own-compiled Vim and the distro's Vim both
present on the same system. Since /user/local/bin comes early in the
$PATH, your own Vim takezs precedence, but the other one can still be
invoked with a full path, or under another name from a softlink (e.g.
/bin/vim-suse -> vim). Of course the distro's Vim uses its own system
vimrc and its own runtime files, but your ~/.vimrc and (if any) anything
under your ~/.vim/

> Exactly the same as with only "vim -y myfile".
>
> @John Little, about "bonus question": I can't just close down with ALT+F4, I am using headless = no GUI = terminal only server.

I think I've heard there are headless setups where GUIs are possible.
IIRC it requires "X forwarding" or something.

You can always create a mapping, provided that Vim can get the {lhs},
for example (untested)

:imap <C-F4> <C-O>:qa<CR>

to use Ctrl-F4 to exit Vim. This will still end in error (and not exit)
if you have modified files, unless 'autowriteall' is set and the
modified buffers can be saved.

>
>
> Additional test:
> I have now also checked the same on "Ubuntu 14.04 Desktop" and having exactly the same problem with both starting commands (vim -y myfile and vim -u NONE -y myfile), exactly the same problem. I have also added only "set nocompatible" command in .vimrc file.
>



Best regards,
Tony.
--
There was a young man from Nantucket
Whose cock was so long he could suck it.
He said with a grin,
While wiping his chin,
"If my ear was a cunt, I could fuck it."

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: