I'm trying to use slimv, which is recommended in the answer for another question of mine, under macOS Sierra. However, when I installed this plugin into ~/.vim/plugin, and ran vi test.lisp, I got the following error. The beautiful "Slimv" menu was also not shown.
sunqingyaos-MacBook-Air:plugin sunqingyao$ vi ~/.vimrc
Error detected while processing /Users/sunqingyao/.vim/plugin/ftplugin/clojure/slimv-clojure.vim:
line 196:
E117: Unknown function: SlimvInitBuffer
Press ENTER or type command to continue
Note that currently I don't have Clojure installed on my MacBook Air. All what I want to do is to debug some mit-scheme programs inside vim.
Here is the relevant part of ~/.vimrc:
let g:slimv_swank_cmd = '!osascript -e "tell application \"Terminal\" to do script \"mit-scheme --load ~/.vim/plugin/slime/start-swank.lisp\""'
Version information for vim:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 13 2016 21:22:16)
Included patches: 1-898
Compiled by root#apple.com
I'm a vim newbie who don't know much about vim script, so please explain it in detail to me.
You shouldn't install it into ~/.vim/plugin, you should install it into ~/.vim because slimv has files in other vim directories outside plugin (e.g ftplugin, indent, syntax etc).
Related
On my local PC I am running Ubuntu 20.10 with Vim:
:version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 11 2020 17:00:59)
Included patches: 1-716
In this version I can undo text with Ctrl + u open a file explorer with :Explore which is fine.
On another (remote) linux/ubuntu machine (where I don't have permission to install anything):
$ cat /proc/version
Linux version 4.15.0-1111-azure (buildd#lcy01-amd64-016) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)) #123~16.04.1-Ubuntu SMP Sat Mar 20 01:52:07 UTC 2021
and:
$ cat /etc/os-release
NAME=Buildroot
VERSION=2014.02
ID=buildroot
VERSION_ID=2014.02
PRETTY_NAME="Buildroot 2014.02"
I cannot use those Vim commands. E.g. if I:
:Explore
'Explore' is not implemented
and Ctrl + u does not work either. Further:
:help compatible
'help' is not implemented
I can get the version:
:version
1.22.1 2014-09-13 22:15:30 PDT
Its definitely another version of Vim(vi?) compared to the one on my host system.
Is it some vanilla/old/minimal version of Vi that's on this machine?
How do I know if its Vi or Vim (pretty limited info from :version)?
I can use the arrow keys to navigate so I expect its some minimal version of Vim.
Also on the remote machine:
$ which vi
/bin/vi
$ which vim
$ whereis vim
sh: whereis: not found
What you have on that host is neither Vim nor the original vi. It is "BusyBox vi", a partial reimplementation of vi that is part of the BusyBox project.
If you want Vim, you will have to install it yourself in your $HOME or ask the administrator of that machine to do it for you.
As a side note, the ubiquity of Vim (and vi) is a sadly common misconception.
POSIX-certified systems must have a vi command that follows the specs but how that command is actually implemented is left to the vendor. On some systems it might be the original vi, on other systems it might be a minimal Vim, or a maximal Vim, or nvi, etc. Then you have Linux vendors, who generally try to follow the spec but are not bound to it. Then you have VM/container-oriented distributions that tend to strive for minimalism and may not even have a vi command to begin with. And then you have Vim itself, which can be built with or without this or that feature and has never stopped evolving anyway so two Vims are rarely the same.
Outside of the world of containers, it is relatively safe to assume the presence of a vi command on a Unix-like system, but where the behaviour of that command lies on a spectrum from the vi spec to a complete GUI build of the latest Vim is pretty much a game of roulette.
In the world of containers, it is best to not assume anything.
I installed Vim 7.4 in a Windows 8 machine and it was working fine. After installing all plugins in my .vimrc, GVIM crashed and it wouldn't open again. I could manage to use VIM from cmd but not without some errors. My first try was to reeinstall GVIM completely. After reinstalling, it worked fine but if I also reinstall my plugins it would crash and not open again. What should I do?
I removed all plugins and installed one by one until I got the error, which was with the Ultisnips plugin. I happen to know that this plugin requires VIM with Python support, which my VIM probably wouldn't have. To test this, run vim --version and look for a +python (or run echo has("python") from inside GVIM and look for a output of 1). In my case, it was -python, which was confusing, since I have Python installed. According to this answer, you need to install Python after installing VIM, so I did it and it worked.
I have a error when i use vim. After I place this line in .vimrc
Plugin 'Valloric/YouCompleteMe'
and
:PluginInstall
error:
YouCompleteMe unavailable:
My vim : VIM - Vi IMproved 7.3
Anyone's know how to fix it ?v
The :version command tells you the exact Vim version. If you grabbed the official installer from vim.org, you probably have 7.3.000. As Vim 7.4 has been released, it's the easiest to upgrade to that version.
If you have the problem with Homebrew version on Mac, try the following as officially documented. Please make sure you're running vim not vi on your mac.
cd ~/.vim/bundle/YouCompleteMe
./install.sh
I'm working in vim and having a problem. On my primary macbook pro, I have vim running in iterm via macvim terminal mode. Normally, I can have multiple tabs open ie, tab1 is rails app a and tab 2 is rails app b, and I can yank y lines from tab1 and paste p them into tab2. On my macbook air, I can't seem to paste between tabs. I'm sharing the bundle dire and bash_profile between the two computers via dropbox so the configuration should be good. The one problem I think I'm noticing is that when I run vim --version on the correctly functioning machine, I get
VIM - Vi Improved 7.3 (date)
MacOs X (unix) version
Included patches: 1-754
compiled by usr#usr-macbook-pro.local
Huge version with MacVim GUI
and when I run vim --version on my mac book air, the non correctly functioning machine I get
V
IM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 23 2012 13:50:52)
Compiled by root#apple.com
Normal version without GUI. Features included (+) or not (-):
and I notice that in the correctly functioning machine the features list has +clipboard and in the non functioning machine the feature list has -clipboard. how do I change this to reflect the proper configuration on the macbook air?
Try running
brew install macvim --override-system-vim
followed by
brew link macvim
However, it looks like the version of vim you are using on your macbook air is not the macvim version you are looking for. It's the standard version of vim. What is the output of which -a vim? You may have to add macvim to your path on your macbook air before the builtin vim. What does echo $PATH output?
i just uninstalled macvim via homebrew and reinstalled it making careful to connect the symlink to the application folder correctly. everything now works.
So i'm rocking a VIM version 6.3.82 on rhel 4.9... which i'd imagine is the biggest culprit. (no chance of an upgrade any time soon)
I downloaded the latest Rails.vim and have installed this many times on my home machine.
I try the command :Rails! and i Get "e493: Not an editor command."
In my .vimrc i've added
set nocompatible
syntax on
filetype plugin indent on
Am i doomed with a dated vim to use most any plugins? Am i missing something in my .vimrc to enable vim plugins?
Any direction is appreciated. :p-
TIA,
Kirby
You'll need to use an old version of Rails.vim it looks like. The last version that worked with Vim 6 is version 2.1:
http://www.vim.org/scripts/script.php?script_id=1567
You may be able to compile your own version of vim in your home directory if you want to use the latest Vim and Rails.vim.