Hello Frank, i experienced same issues in past. This link helped to solv all my issues: http://henry.precheur.org/vim/python
" First I would like to point out something when writing a Vim configuration file. Generally don’t use the autocmd command to add hooks to a specific filename’s extension. AutoCmd ... *.py ... might look like a good way of executing commands when opening a Python file; it’s not. Because all Python filenames do not necessarily end with .py; some executable scripts might not have extension for example. autocmd FileType python is better. But there is an even better way: ftplugin. For instance, instead of the following in your vimrc AutoCmd BufNewFile,BufRead *.py \ setlocal tabstop=4 \ setlocal softtabstop=4 \ setlocal shiftwidth=4 \ setlocal textwidth=80 \ setlocal smarttab \ setlocal expandtab Create the directory ~/.vim/ftplugin; create a file named ~/.vim/ftplugin/python.vim containing: setlocal tabstop=4 setlocal softtabstop=4 setlocal shiftwidth=4 setlocal textwidth=80 setlocal smarttab setlocal expandtab Now every files detected as Python files by Vim get the previous commands executed. Even those with filenames which do not end with .py. " HTH, Stano On Fri, Feb 14, 2014 at 7:35 PM, Frank Miles <f...@u.washington.edu> wrote: > I'm having problems setting the vim configuration - > and having it mean something - in a fairly new computer. > One simple example is the tab stops. Since I'm the > only direct user of this machine, I've simply edited > /etc/vim/vimrc, where I have the line: > set tabstop=4 > In addition, I've appended the line > set ts=4 > to some of the 'plugin' files, for example: > /usr/share/vim/vim74/syntax/python.vim > {the normal ending line with ts=8 has been commented-out; > otherwise the plugin file is unaltered from the Debian original}. > > However when I open a python file, it's obvious that > 8-space tabs are being used. Doing a set: shows that > softtabstop=4 > But there is no > tabstop=4 > whereas opening a 'C' file will achieve the latter (and > 'proper' spacing. > > The file is recognized as python - the keywords are highlighted > as expected. Manually entering the set ts=4 sets things right. > > I've tried creating a ~/.vim/vimrc to no avail. I've not had > any problem with previous incarnations of Debian. > > One has to suspect that some config file is overriding mine. > A quick examination of the installed vim packages using > dpkg -L ... > has turned up nothing other than links to /etc/vim/vimrc > > Anyone have any hints regarding the source of this annoyance? > TIA! > -F > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: http://lists.debian.org/ldlnld$j3j$1...@dont-email.me > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/camdf0pq+5amkv5v3330hvgjwufaxjnrpqa4gwisfcrmeobe...@mail.gmail.com