iPython won't autoindent - macos

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.

Related

Neovim do not work on mac

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.

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.

Can't call history search in pry

I want to use reverse-i-search in Pry, but somehow I can't use in my OS X machine running iTerm2.
When I connect to VPS and run pry, then I can use the history search by pressing Ctrl + R.
It looks like the problem is located in my local environments, but I don't know what's wrong. I don't have a ~/.pryrc config file.
What can I do to find out the cause of problem?
This is libedit library problem (which replaces readline in modern MacOS distros.)
You need to explicitely configure libedit. Add to your ~/.editrc this line:
bind "^R" em-inc-search-prev
For other issues see man editrc.

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)

How to avoid installing unnecessary dependencies with MacPorts?

I've tried to get postgresql 8.4 via MacPorts (on Snow Leopard) but it seems that the dependencies are endless - including getting older version of stuff that is already available in Snow Leopard, kitchen-sink and who knows if eventually I end up with windows 7 ...
Is there a way to get only those dependancies absolutely necessary to run stuff from command line in Mac?
Especially I'm trying to avoid installing old version of python, Xorg packages and so on.
Any ideas? So far it seems that it is better to avoid MacPorts altogether.
Looking at the port file for postgresql84, the +python variant for it actually means python2.5. Most of the dependencies you find annoying are probably being brought in by the python tkinter module dependency on Tk which by default builds an X11 version of Tk rather than the +quartz variant. You can change that by specifying that variant and reinstalling. The easy way to deal with variants is to add the options you normally want to use as defaults to those in /opt/local/etc/macports/variants.conf.
Unfortunately, at the moment, the tk +quartz variant build is broken on Snow Leopard. So, if you are not planning to use tkinter (or IDLE) with the MacPorts python2.5, you can force the removal after the fact of the unwanted modules:
port installed
port -f uninstall tk Xft2 xorg-libX11 ...
You might want to first do a dry-run by adding the -y option to see exactly what the effects of the uninstall will be.
Note, the python26 port has a handy +no_tkinter variant which could be useful once the portgresql ports are upgraded to python2.6.
It's potentially a bit of grunt work (and definitely violates Occam's razor for this particular scenario)... but if you're positive you know which dependencies you don't want/need, they can always be passed as hyphen-delimited args after the port call:
port install sweetPort -depYouDontWant -depYouDontNeed ...
I know it's been a while since the OP, but I hope this helps... somebody.

Resources