-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syntax error when using f"string {my_var}" #38
Comments
Hi @eAmoeba , Well, I don't think there is any easy way to achieve Python 3 support... In fact, ViM can work only with one version of Python (2 or 3, not 2 and 3) - the version of Python that was used for ViM compilation. Basically, if you want to get support of Python 3 syntax - what you should do is to look for a way to get ViM compiled with Python3. Keep in mind, that one ViM distribution could not be compiled with both Python 2 & Python 3 - you need to choose one of them. What I was doing some time earlier is compiling ViM from sources with Python 3 support and use it in parallel with system ViM with Python 2 support. Basically, I have had two aliases - I'm not sure what OS do you use, so it's hard to recommend some particular way to make this compilation done. What I was doing on my Mac - just compiling ViM from sources with specifying path to python3-config & some paths to link other libraries. Finally, you should get something like that (
After you done with this - now you should go ahead with changing paths in Thanks a lot for the feedback, I'm really glad that you've found it useful. Hope you will be enjoying ViM even thorough these little complications... :) Thanks, |
Thank you for the reply, to answer the OS Question I am on Fedora. Obviously, ViM is pre-installed and so is Python2 and 3. That's a good push in the right direction. Thank you. I will play around with the solution you suggested. If it worked on your Mac it should be able to get it working on Linux fairly easy. I have no need to write anything currently in Python2. So if I can getting working on 3 I should be good. I wonder now giving it a thought... neovim. I wonder if it would work directly under that... hmmm... Again, Thanks for the information and even more thanks for the nice working environment with the vimrc. |
You're welcome, not at all.
Try it... I tried it some time ago as well and faced some issues, but I don't remember what were they :) Hopefully you would be more lucky! Thanks for not hesitating to ask a question! Have a good one, |
Closing this issue, please feel free to reopen / add comments if needed. |
Thanks for the help I did both. tried neovim and I ran into a few issues, so I compiled vim with: ./configure --with-features=huge --enable-multibyte --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.7/config --prefix=/usr/local Totally works no issues with python 3.7 So if anyone else runs into this issue These are the steps I took. Appreciate the help! |
Awesome, perfect news! @eAmoeba , thanks for sharing this - I'm sure it will help lots of people! Roman |
really nice work here on this vimrc. really enjoying the work you put into it.
Would you know how to fix the syntax error when using the new f"string {}" format in python3.6+ I went through all the help pages for pymode and syntastic. I am completly lost. pretty new to vim in general (loving it though, omg my work flow is so much faster now that I learned vim)
can you point me in the right direction or maybe you have a solution?
when I change
let g:pymode_python='python'
to
let g:pymode_python='python3'
I get lots of errors.
Seen here: https://i.imgur.com/gif2Yze.png
Thanks.
The text was updated successfully, but these errors were encountered: