Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
It seems something wrong with the script installation. The script page says
- Drop the script in your ~/.vim/indent directory.
When I did that, no Python indent when I use Vim. The correct step is:
#cp python.vim /usr/share/vim/vim73/plugin/python.vim
the vim73 directory is your Vim version.
- No, this is wrong. If you copy it to your plugin directory, you will get python indent for all file types, until some other filetype indent script overrides it.
- The installation instructions are probably correct, but they assume you already have your Vim set up to read filetype-specific indent files. To do this, place the line "filetype indent plugin on" in your vimrc. See:
- --Fritzophrenic 15:50, July 7, 2011 (UTC)
As Fritzophrenic pointed out, the path to put the script in seems wrong. The correct paths are:
- --talcala Fri Feb 20 17:11:42 UTC 2015
The suggestion is the Python auto finished script when using Vim.
The step is:
1. $wget http://vim.sourceforge.net/scripts/download_script.php?src_id=2668 2. $mv download_file_name pydicton-0.5.tar.gz 3. $tar xvf pydicton-0.5.tar.gz 4. $mkdir ~/.vim/tools 5. $cp pydicton-0.5/pydiction ~/.vim/tools
We can use Ctrl+N to get the prompt of python.
As a user, I am deeply confused. Do the author of the script suggest doing this
- cp python.vim /usr/share/vim/vim73/plugin/python.vim
Which one is wrong?
I would like to use the script to let vim do autoident for me with 1 tab which is 4 spaces. However, it keeps doing 2 tabs for me.
- It should probably go in ~/.vim/indent. But for this to work you *must* have "filetype indent plugin on" in your .vimrc. --Fritzophrenic (talk) 17:41, February 20, 2015 (UTC)
- Ah, but reading your question, your actual problem is probably not with the script installation. You probably need the following settings, in a FileType autocmd or a python filetype plugin: "setlocal expandtab shiftwidth=4". I think that the default installed Python filetype plugin already sets these starting with Vim 7.4. --Fritzophrenic (talk) 17:43, February 20, 2015 (UTC)