Neovim do not work on mac - macos

I installed neovim v0.2.2 via homebrew:
$ brew install neovim
$ alias n="nvim -u $XDG_CONFIG_HOME/nvim/init.vim"
Then, neovim causes many errors, so I cannot use it.
First, when I open a file, say n foo.rb, the filetype is not detected: :set ft? gives filetype=.
Second, I tried :CheckHealth, but it is said Not an editor command: CheckHealth. I also tried :checkhealth, giving Invalid 'runtimepath'. So I checked :set rtp?, but it seems to be right.
Third, when I entered insert mode, deoplete raised an error Unknown function js_encode.
Finally, I could not copy texts to clipboard "+y.
I think there must be more errors I have not found.
I checked :set rtp?, but it is OK. And all key mappings [nvics][nore]map work correctly, so init.vim is certainly loaded.
These errors occur only after updating neovim from v0.2.0 to v0.2.2. They do not occur when I used v0.2.0.
Environments:
mac OS 10.12.6
neovim v0.2.2

Something went wrong with Oni. I rm all files concerning oni, :call dein#update(), and :UpdateRemotePlugins, then Neovim recovered.

Related

MacVIM - Python 3 Error

I have Anaconda Python3.6. I have been trying to reinstall MacVIM on El Captain by the following method:
brew tap macvim-dev/macvim
brew install --HEAD macvim-dev/macvim/macvim --with-properly-linked-python2-python3
I followed the instructions from the installation of MacVIM here
I get the following error:
if_python3.c:75:10: fatal error: 'Python.h' file not found
#include <Python.h>
^
1 error generated.
make[1]: *** [objects/if_python3.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [first] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/macvim-dev/homebrew-macvim/issues
Error: Your Xcode (7.3.1) is outdated.
Please update to Xcode 8.2.1 (or delete it).
Xcode can be updated from the App Store.
Error: You have MacPorts or Fink installed:
/opt/local/bin/port
This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.
sudo mv /opt/local ~/macports
I have looked online and I see that a similar bug has been reported here for Fedora.
I also looked at the error and tried to update X-Code. The thing is that I don't want to upgrade by OS at this time and just want to update X-Code. I looked in the App Store Update and I clicked "Update" and it doesn't seem to be working. When I click "Update", it stalls and nothing happens.
So, I looked up the command
softwareupdate --list
and X-Code does not show up there. I looked up this on Stack Overflow and the comments seem to clearly indicate that even the selected answer is wrong. I don't want to upgrade my OS but I want to install MacVIM with python3 support. I was hoping someone can help me regarding this?
Note : I have not tried to uninstall Macports or Fink (not sure what this is). This is mentioned in the error. Would the removal or movement of them help? I just don't want to do anything I might regret later.
I had the same problem even with Xcode 8.2.1. The compilation stalled at the same place. After several attempts, I found a workaround.
Firstly, you need to open the problematic if_python3.c from another editor, e.g. Sublime Text. It is normally situated at
~/Library/Caches/Homebrew/macvim--git/src/if_python3.c
Go to line 75, replace the #include <Python.h> with #include "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/Python.h", or the path of Python.h of python3 on your mac. Save it. (cmd+s in sublime text).
Run the brew install command again. Once you see
==> Cloning https://github.com/macvim-dev/macvim.git
from the terminal, it will git pull and overwrite your previous change in step 2. So you must take a close eye on if_python3.c from sublime text. Once you notice the line 75 reverted back to #include <Python.h>, immediately press cmd+z, cmd+s to recover and save the change.
I used this trick and successfully built macvim.

Jedi-vim: No auto-complete on dot (.), testing shows erroneous "no python" error

I just installed jedi-vim and supertab (because I already had something bound to <C-Space>). <Tab> now shows the autocomplete menu and it's working pretty well, however I don't see any menus when I hit ..
If I use <Tab> in insert mode after pressing ., I get the normal menu that doesn't have the context of the name preceding the dot (and it's not at all useful because of it).
:verbose imap . says No mapping found, but I'm guessing that's not how jedi-vim works.
In my effort to troubleshoot the issue I've disabled my other plugins and replaced my .vimrc with just execute pathogen#infect().
Now, when I :e foo.py I see: "Error: jedi-vim failed to initialize Python: jedi-vim requires Vim with support for Python 2 or 3." I didn't get this error before, and :version shows that I have both Python 2 and 3 support.
Scriptnames: https://gist.github.com/hovissimo/a2413d6a5d0e1be356c0
:version: https://gist.github.com/hovissimo/f5a0e630edac8756397e
Edit:
:JediDebugInfo says Using Python Version: null
I don't know why I didn't see the error before, but it looks like my python3 integration in Vim was in fact broken.
I had Python 3.5 32-bit installed, but I was using a 64-bit version of Vim. Installing a 32-bit version of Vim (making sure it was compiled for python35) seems to have fixed all problems.

OS X `rlwrap coqtop` not working

rlwrap is a good program handling arrow keys in REPL loop. In most cases it works. For example rlwrap sbcl, rlwrap sml, and so on. But when it comes to rlwrap coqtop, it fails. The error information is below.
rlwrap: error: Couldn't read completions from /usr/local/Cellar/rlwrap/0.41/share/rlwrap/completions/coqtop: No such file or directory
I downloaded coqide from coq website, and installed rlwrap using homebrew. The file /usr/local/Cellar/rlwrap/0.41/share/rlwrap/completions/coqtop is at the right place. So, is there any clue how to fix this? Or is there a replacement software out there?
This is a bug that has been fixed for the upcoming rlwrap 0.42.
If you don't want to wait for an upcoming release, you can always get the newest source from github (https://github.com/hanslub42/rlwrap)

iPython won't autoindent

I've never had this problem before and I don't understand why it's happening now so I'm hoping someone has encountered this. If I'm using iPython in interactive mode and try to do a loop I don't get an auto indent (and can't add one in on my own). So if I do
for i in range(5):
The next line is not indented, and if I try to indent it won't move the cursor over. I'm using iPython 0.13.2 on Mac OS X Mountain Lion
EDIT I can space over to add indentation but I can't use tab and it's never added automatically. I have also ensured that %autoindent has auto indent on
This is another symptom of the problems with libedit, the Mac equivalent of readline.
IPython will show a warning about libedit, which will instruct you to easy_install readline. Be sure to use easy_install, not pip - the latter won't install it correctly in this case.

E185 error on mac terminal [duplicate]

I have Solarized installed via pathogen and it's been working fine in both terminal and MacVim on my Mac. Today, I tried setting up an Ubuntu box on Linode. I just cloned my dotfiles and symlinked to my .vim and .vimrc folders (this is the same setup as I use on my local machine.
Whenever I try to run vim on the Ubuntu box I get an error
Error detected while processing /root/.vimrc:
line 43:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
I can tell my .vimrc is being loaded because all other setting like line numbers are working.
The related lines in .vimrc are the following:
" settings needed for solarized colorscheme
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
This is the setup of my .vim/bundle directory (incase you suspect I don't actually have solzrized in there!):
~ ls .vim/bundle
ack coffeescript liquid snipmate vim-colors-solarized vim-jst zencoding
closetag html5.vim nerdtree surround vim-javascript vim-rails
One other thing, running echo &t_Co in vim on the ubunto box gets me 256.
Any ideas?
I was running into this problem just now, too. I had my call pathogen#infect() line in my .vimrc just fine, but was getting the
E185: Cannot find color scheme solarized
error, like you. I moved my call pathogen#infect() up to the top of my .vimrc and all is swell now. Try that if you're still having problems!
I know that it is kind of obvious, but did you check the contents of ~/.vim/bundle/vim-colors-solarized? Just in case you are running in the same issue described in Vim: Pathogen not loading
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.vim. The first one that
is found is loaded.
You should put solarized.vim in ~/.vim/colors/.
This is what I did;
cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
I just ran into this problem myself on a new CentOS box where 'vi' was mapped to a version of VIM without syntax support (ie. -syntax) and was giving the E185: Cannot find color scheme solarized error, while 'vim' mapped to a version with syntax support and worked fine with solarized.
Aliasing 'vi' to 'vim' resolved the issue.
For reference:
To check if the version of vim that you are running has support for syntax highlighting, run :version from within vim. -syntax means no support, +syntax means it has support.
To create the alias, append alias vi='vim' to your ~/.bashrc or ~/.bash_profile
To re-source, type source ~/.bashrc or source ~/.bash_profile, whichever is appropriate for your setup.
One step you might be missing is to add
call pathogen#infect()
to your .vimrc file.
Src: http://www.vim.org/scripts/script.php?script_id=2332
I was getting this problem and I fixed it by issuing
cd ~/.yadr
git pull
rake update
I fix it ;)
Found this bug:
https://github.com/altercation/vim-colors-solarized/issues/104
cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
As Ryan Ransford said:
With the new version of vundle (Vundle.vim),
it appears as though "colorscheme solarized" must
come somewhere after "call vundle#end()".
This works for me!
I have the same issue and resolve it after moving color setting after call vundle#end() in ~/.vimrc
...
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
call vundle#end() " required
filetype plugin indent on " required
if has('gui_running')
set background=dark
colorscheme solarized
else
colorscheme zenburn
endif

Resources