0

I have set up set tabstop=2 set lcs=tab>.,trail=.

in .vimrc when i open .txt files, tabs are displayed as

>.

however when i open a .py file, tabs are displayed as

>.........

I have typed :tabstop=2 which works. How to make tabstop=2 activated by default?

:verbose set tabstop?

results in tabstop=8

My .vimrc is

set list
set tabstop=2
set listchars=eol:⏎,tab:␉·,trail:␠,nbsp:⎵

set nocompatible              " be iMproved, required
filetype off                  " required

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'davidhalter/jedi-vim'
call vundle#end()            " required
filetype plugin indent on    " required

I have only 1 plugin which is jedi-vim. Could that be the problem?

  • 1
    Hi Nic, welcome to Vi and Vim! Your question has some gaps in it, and filling in the missing details goes a long way to helping solve the problem. For example: can you provide a minimal vimrc that still reproduces your problem? Have you tried disabling the plugin python-mode to see if that has any effect? There’s a myriad of different possible interactions here (from local v. global options to ftplugins), so it’s pretty hard to tell what’s going on at the moment. As it stands, your question is being close-voted as « unclear », so it may get closed. Please edit with as much detail as possible – D. Ben Knoble May 1 at 20:34
  • 1
    You could do :verbose set tabstop?. This will show where tabstop was last set. You should also read :help ft-python-plugin, :help ft-python-indent and :help ft-python-syntax. – Ralf May 2 at 4:35