Closed jimbasquiat closed 6 years ago
@jimbasquiat I am using just the default settings myself.
A PR with improved doc would be nice, if you can figure something out etc.
Well as per the docs: You can configure the initial indentation of multiline strings using g:python_pep8_indent_multiline_string (which can also be set per buffer). *This defaults to *0, which means that multiline strings are not indented.
So I understand that by default the indentation is deactivated? As a matter of fact when I tried the plugin (ie git cloning it into my pathogen vim/bundle folder, the indentation was not functioning. Any hints?
2017-05-20 16:59 GMT+01:00 Daniel Hahler notifications@github.com:
@jimbasquiat https://github.com/jimbasquiat I am using just the default settings myself.
A PR with improved doc would be nice, if you can figure something out etc.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Vimjas/vim-python-pep8-indent/issues/75#issuecomment-302881895, or mute the thread https://github.com/notifications/unsubscribe-auth/AS26JoMpni--2LzU3vAjQ-mD-WUOc5xsks5r7w3ugaJpZM4NhTr8 .
What does :verb set indentexpr?
give you?
It should be indentexpr=GetPythonPEPIndent(v:lnum)
.
Make sure the filetype is python
.
it gives me indentexpr=
how do i fix that? why did it not set itself up correctly by default?
2017-05-20 17:33 GMT+01:00 Daniel Hahler notifications@github.com:
What does :verb set indentexpr? give you? It should be indentexpr=GetPythonPEPIndent(v:lnum). Make sure the filetype is python.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Vimjas/vim-python-pep8-indent/issues/75#issuecomment-302883925, or mute the thread https://github.com/notifications/unsubscribe-auth/AS26Ji0ykxhTyV_k4CbLTIp-fBJneSQyks5r7xX0gaJpZM4NhTr8 .
It should do so, via ftplugin indent
- so it depends on how you load it.
I recommend using a plugin manager like vim-plug.
so there should be a "indent" file in the ftplugin directory? i am using pathogen for plugin manager
2017-05-20 20:03 GMT+01:00 Daniel Hahler notifications@github.com:
It should do so, via ftplugin indent - so it depends on how you load it. I recommend using a plugin manager like vim-plug.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Vimjas/vim-python-pep8-indent/issues/75#issuecomment-302892335, or mute the thread https://github.com/notifications/unsubscribe-auth/AS26JoHW0zd7ij8Kh_UU_XXi7VIxHRL-ks5r7zkYgaJpZM4NhTr8 .
Sorry, I've meant filetype indent on
, see :h :filetype-indent-on
.
pathogen is quite basic, so make sure to follow its documentation regarding those :filetype
calls.
https://github.com/Vimjas/vim-python-pep8-indent/blob/master/indent/python.vim is the file that should get loaded for ft=python.
This is completely confusing.... Why do i need to read and digest all the details of pathogen to have your plugin to work? Concretely, what action do i need to perform once i did "git clone https://github.com/Vimjas/vim-python-pep8-indent.git", in the .vim/bundle directory, using pathogen ? Thank you
It's more about having your pathogen setup correctly after all.
It's not just about this plugin, but plugins in general.
Using a more sophisticated plugin manager like vim-plug helps you with that, but if you want to use pathogen, you have to use it correctly.. :)
my pathogen setup has worked well with all plugins except yours. While asking for a simple help on a setup with yours you werent able to explain it in simpler terms (albeit you managed to come back with even more confused explanations) and then give me this passive agressive crap. No need to pretend to be maintaining this package or even to reply to the issue thread if its to throw stuff like that at people.
What is passive-aggressive from my side? I'm trying to help you while I am pretty certain that your pathogen setup is not working correctly (and told you at least twice). You have not shown your vimrc for example, nor a minimal vimrc which shows that it fails there. There are dozens or hundreds of users (according to the GH stars) where setup is not an issue.
my pathogen setup has worked well with all plugins except yours.
Do you use other indent plugins?
And it is pretty clear that your initial issue was about configuration of the plugin, while it only turned out later that it is not loading/working for your in general.
no i am not using any other indent plugin
You can try using a minimal.vimrc
(from this plugin's directory) via vim -Nu minimal.vimrc
:
let &runtimepath=$PWD.','.&rtp
filetype plugin indent on
This should load the plugin.
As for using pathogen, it should work when properly configured, i.e. following https://github.com/tpope/vim-pathogen#runtime-path-manipulation.
So the .vimrc had to be modified? How are users supposed to guess that? Beside I tried your suggestion but it doesn't work. But I give up. I don't doubt your good faith in trying to provide a solution or your coder's skills, but you just seem unable to express yourself in a way that's clear.
"filetype plugin indent on" is disabled by default on Ubuntu(possibly others to make it more vi like), that is probably what the issue is. Even with autoindent and smartindent enabled this plugin does not activate, it is not an obvious fix unless you know the internals of vim.
Quick blindfix for you is probably: echo "filetype plugin indent on" >> ~/.vimrc
If you added anything else in vimrc while debugging this I would take it out(not sure what setting the runtimepath could affect).
@redNixon Thanks!
@jimbasquiat In case you want to give it another try, please let us know if that fixes it for you.
I think we should update the README to include this note then anyway.
Strictly speaking only the filetype indent on
would be required, right?
Correct, I tested using Ubuntu 16.04 and a vimrc file with only filetype enabled and seemed to worked fine.
Added a Troubleshooting section.
Hi,
I have been trying to make use of this plugin - however the readme supposed to explain the configuration is very unclear. Could you expand a little bot on how to use this plugin - maybe fr instance showing 1 or 2 examples of the most common config you would recommand?