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

Is there a way to have % in vim find the next ([{ or
I have an automatic replacement done by my vim setup, which systematically replaces all
If I have a Vim window open with 2 splits in it (3 total
I have recently started using Vim as my text editor and am currently working
I have found some in the Cappuccino website (vim, textmate and SubEthaEdit), but not
I have spent lot of time doing research on VIM. I am Windows guy
I'm an avid vim user and have started to write some SQL code recently.
I have a longish list of files opened in vim that looks like this:
This question follows on from this vim search question I have a setting in
I am interested in enabling code folding in Vim for Python code. I have

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.