Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 542007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:24:07+00:00 2026-05-13T10:24:07+00:00

I have Vim 7 (enhanced) on CentOS 5, and it comes with all the

  • 0

I have Vim 7 (enhanced) on CentOS 5, and it comes with all the usual Vim plugins/scripts ready to go.

$ find /usr/share/vim/vim70/ -name \*python\*
/usr/share/vim/vim70/syntax/python.vim
/usr/share/vim/vim70/ftplugin/python.vim
/usr/share/vim/vim70/indent/python.vim
/usr/share/vim/vim70/autoload/pythoncomplete.vim

I would think that when opening a file ending in .py (vim file.py) it would automatically load these plugins, but I am not sure that is the case. What I want is:

Press TAB and receive four spaces. Auto indent next line for suites, conditionals, etc.

I have this working by explicitly setting tabstop, shiftwidth, etc. in my .vimrc file. Isn’t this what the above Python files are for? Why do I have to set these things in my .vimrc? How do I get these features from the Vim plugins instead?

Current .vimrc:

syntax on
set hls
set expandtab
set textwidth=0
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set backspace=indent,eol,start
set incsearch
set ignorecase
set ruler
set wildmenu
set smarttab
filetype indent on
filetype on
filetype plugin on
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:24:07+00:00Added an answer on May 13, 2026 at 10:24 am

    Setting tabstop, shiftwidth, etc… in your vimrc is correct. These set your global settings, as well as serve as parameters to the filetype-specific indentation support.

    The language indentation plugins use these settings, but typically also set an indent expression (:he inde) appropriate for the language. Thus the Python indenter should be automatically indenting after a block opening statement (def, class, for…), and dedenting after a closing one (return, pass, continue…) and doing so according to the ts,sw,… you have set.

    If you’re still unsure if the plugin is loading for a buffer, simply do :filetype to show the detection, plugin, and indent settings, and :set ft? to see the detected type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an automatic replacement done by my vim setup, which systematically replaces all
I have a number of scripts (Ruby as it happens) I run from VIM,
I'm using CentOS, which appears to have vim installed by default. I located the
I have my vim setup to use omnicomplete with ctags and its all working
Is there a way to have % in vim find the next ([{ or
Logged as root on a CentOS 5.3, I can't have colors in vim (7.0.237,
I have installed Vim and MinGW on my machine, so I try to create
so 1GvG:s/..../g can replace over an entire buffer However, suppose I have multiple vim
In Vim I have: simulación (fig.),pretexto (fig.),excusa (fig.). My goal is: simulación ,pretexto ,excusa
I have installed the vim-latex package using Ubuntu Synaptic package manager and updated my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.