Re: Vim config problem in jessie

2014-02-15 Thread rpr nospam
On Sat, 15 Feb 2014 04:05:48 + (UTC), Frank Mile wrote:

 I should have added one more interesting detail.  If I comment out the
 (python) plugin call in /etc/vim/vimrc:
  if has(autocmd)
   filetype plugin indent on
  endif

 then the tabstops work without the manual override.  Having, of course,
 lost all the nice stuff associated with the plugin.  Just to make sure
 I hadn't messed up the plugin I commented-out the 'set ts=4' that I
 had appended to the plugin - no change in its behavior :(

Frank, try this:
$ locate python.vim
/usr/share/vim/vim74/ftplugin/python.vim
/usr/share/vim/vim74/indent/python.vim
/usr/share/vim/vim74/syntax/python.vim

I'd say your issue is caused by the fact that all that three scripts
are loaded when you edit python files.

According to vim help (see :help filetypes) the filetype plugin indent on
command that you have enabled in /etc/vim/vimrc actually means the
following:

- vim tries to detect the type of the file that is edited (e.g. let's
  suppose the file type is my_file_type)
- vim loads the appropriate plugin script:
  /usr/share/vim/vim74/ftplugin/my_file_type.vim
- vim loads the appropriate indent script:
  /usr/share/vim/vim74/indent/my_file_type.vim

Moreover, if the syntax highlighting is enabled in vim (:syntax on)
then the appropriate syntax script is also loaded:
/usr/share/vim/vim74/syntax/my_file_type.vim

In /usr/share/vim/vim74/ftplugin/python.vim I see the following line:
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8

So, it seems that /usr/share/vim/vim74/ftplugin/python.vim is loaded
last and overrides tabstop value set by other scripts.

--rpr.


-- 
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/CAN-5nynMnTDrDrxjv=gUmnRP9984O6L5XUzetaEKruEBo=b...@mail.gmail.com



Re: Vim config problem in jessie

2014-02-15 Thread Frank Miles
On Sat, 15 Feb 2014 18:30:02 +0100, rpr nospam wrote:

 On Sat, 15 Feb 2014 04:05:48 + (UTC), Frank Mile wrote:

 I should have added one more interesting detail.  If I comment out the
 (python) plugin call in /etc/vim/vimrc:
  if has(autocmd)
   filetype plugin indent on
  endif

 then the tabstops work without the manual override.  Having, of course,
 lost all the nice stuff associated with the plugin.  Just to make sure
 I hadn't messed up the plugin I commented-out the 'set ts=4' that I had
 appended to the plugin - no change in its behavior :(
 
 Frank, try this:
 $ locate python.vim /usr/share/vim/vim74/ftplugin/python.vim
 /usr/share/vim/vim74/indent/python.vim
 /usr/share/vim/vim74/syntax/python.vim
 
 I'd say your issue is caused by the fact that all that three scripts are
 loaded when you edit python files.
 
 According to vim help (see :help filetypes) the filetype plugin indent
 on
 command that you have enabled in /etc/vim/vimrc actually means the
 following:
 
 - vim tries to detect the type of the file that is edited (e.g. let's
   suppose the file type is my_file_type)
 - vim loads the appropriate plugin script:
   /usr/share/vim/vim74/ftplugin/my_file_type.vim
 - vim loads the appropriate indent script:
   /usr/share/vim/vim74/indent/my_file_type.vim
 
 Moreover, if the syntax highlighting is enabled in vim (:syntax on)
 then the appropriate syntax script is also loaded:
 /usr/share/vim/vim74/syntax/my_file_type.vim
 
 In /usr/share/vim/vim74/ftplugin/python.vim I see the following line:
 setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
 
 So, it seems that /usr/share/vim/vim74/ftplugin/python.vim is loaded
 last and overrides tabstop value set by other scripts.
 
 --rpr.

Nice work, rpr!  This explains it - down to the differences between
jessie and wheezy or squeeze.  I should be able to get it to work _my_
way... thanks!

   -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/ldpdpn$n1g$1...@dont-email.me



Vim config problem in jessie

2014-02-14 Thread Frank Miles
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



Re: Vim config problem in jessie

2014-02-14 Thread Jeremiah Mahler
On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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
 

I use

~/.vimrc

and haven't experienced any of these issues.

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler


-- 
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/20140214194000.GA21221@hudson.localdomain



Re: Vim config problem in jessie

2014-02-14 Thread Frank Miles
On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:

 On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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
 
 
 I use
 
 ~/.vimrc
 
 and haven't experienced any of these issues.
 
 -- 
 Jeremiah Mahler
 jmmah...@gmail.com
 http://github.com/jmahler

Thanks .. but tried that too, no change.


-- 
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/ldltta$1lt$1...@dont-email.me



Re: Vim config problem in jessie

2014-02-14 Thread Jeremiah Mahler
On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
 On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
the bottom.  This would only have an effect with python.vim is opened.
It would not effect the editing of Python files.

  {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.
  

Are there any modelines in this file?
Does this issue occur with all Python files or just this one?
Can you post an example?

  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
  
  
  I use
  
  ~/.vimrc
  
  and haven't experienced any of these issues.
  
  -- 
  Jeremiah Mahler
  jmmah...@gmail.com
  http://github.com/jmahler
 
 Thanks .. but tried that too, no change.
 

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler


-- 
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/20140214220706.GA25258@hudson.localdomain



Re: Vim config problem in jessie

2014-02-14 Thread Frank Miles
On Fri, 14 Feb 2014 23:10:01 +0100, Jeremiah Mahler wrote:

 On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
 On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
 the bottom.  This would only have an effect with python.vim is opened.
 It would not effect the editing of Python files.
 
  {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.
  
 
 Are there any modelines in this file?
 Does this issue occur with all Python files or just this one?
 Can you post an example?


All python files with tabs; for example:

#!/usr/bin/python

def f() :
return 1

print f()
---
And yes, I know that some people consider tabs sinful.
Thanks so much for considering this!

 
  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
  
  
  I use
  
  ~/.vimrc
  
  and haven't experienced any of these issues.
  
  -- 
  Jeremiah Mahler
  jmmah...@gmail.com
  http://github.com/jmahler
 
 Thanks .. but tried that too, no change.
 
 
 -- 
 Jeremiah Mahler
 jmmah...@gmail.com
 http://github.com/jmahler


-- 
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/ldm65j$i5r$1...@dont-email.me



Re: Vim config problem in jessie

2014-02-14 Thread Jeremiah Mahler
On Fri, Feb 14, 2014 at 10:42:59PM +, Frank Miles wrote:
 On Fri, 14 Feb 2014 23:10:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
  On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
  
   On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
  the bottom.  This would only have an effect with python.vim is opened.
  It would not effect the editing of Python files.
  
   {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.
   
  
  Are there any modelines in this file?
  Does this issue occur with all Python files or just this one?
  Can you post an example?
 
 
 All python files with tabs; for example:
 
 #!/usr/bin/python
 
 def f() :
 return 1
 
 print f()
 ---
 And yes, I know that some people consider tabs sinful.
 Thanks so much for considering this!
 
  
   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
   
   
   I use
   
   ~/.vimrc
   
   and haven't experienced any of these issues.
   
   -- 
   Jeremiah Mahler
   jmmah...@gmail.com
   http://github.com/jmahler
  
  Thanks .. but tried that too, no change.
  
  
  -- 
  Jeremiah Mahler
  jmmah...@gmail.com
  http://github.com/jmahler
 
 

If I remove my ~/.vimrc and open a Python file I get
ts=8 and sw=8.  And when I edit the file the tabs are 8 as expected.
I have not changed any of the system wide Vim configs in Debian.

If I create a ~/.vimrc with only one line

set ts=4

and then open the Python file again I will get ts=4, sw=8 and
tabs will be 4 as expected.

In your case the ts=4 setting is non-existent even if set in a ~/.vimrc.
This seem particularly odd.

What Vim versions are you running?

jeri@hudson:~$ dpkg -l vim* | grep ii
ii  vim2:7.4.161-1  amd64Vi IMproved - enhanced vi editor
ii  vim-common 2:7.4.161-1  amd64Vi IMproved - Common files
ii  vim-doc2:7.4.161-1  all  Vi IMproved - HTML documentation
ii  vim-gtk2:7.4.161-1  amd64Vi IMproved - enhanced vi editor - 
with GTK2 GUI
ii  vim-gui-common 2:7.4.161-1  all  Vi IMproved - Common GUI files
ii  vim-runtime2:7.4.161-1  all  Vi IMproved - Runtime files
jeri@hudson:~$

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler


-- 
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/20140214235833.GA27877@hudson.localdomain



Re: Vim config problem in jessie

2014-02-14 Thread Frank Miles
On Sat, 15 Feb 2014 01:00:01 +0100, Jeremiah Mahler wrote:

 On Fri, Feb 14, 2014 at 10:42:59PM +, Frank Miles wrote:
 On Fri, 14 Feb 2014 23:10:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
  On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
  
   On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
  the bottom.  This would only have an effect with python.vim is
  opened.
  It would not effect the editing of Python files.
  
   {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.
   
   
  Are there any modelines in this file?
  Does this issue occur with all Python files or just this one?
  Can you post an example?
 
 
 All python files with tabs; for example:
 
 #!/usr/bin/python
 
 def f() :
 return 1
 
 print f()
 ---
 And yes, I know that some people consider tabs sinful. Thanks so much
 for considering this!
 
 
   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
   
   
   I use
   
   ~/.vimrc
   
   and haven't experienced any of these issues.
   
   --
   Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
  
  Thanks .. but tried that too, no change.
  
  
  --
  Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
 
 
 
 If I remove my ~/.vimrc and open a Python file I get ts=8 and sw=8.  And
 when I edit the file the tabs are 8 as expected.
 I have not changed any of the system wide Vim configs in Debian.
 
 If I create a ~/.vimrc with only one line
 
 set ts=4
 
 and then open the Python file again I will get ts=4, sw=8 and tabs will
 be 4 as expected.
 
 In your case the ts=4 setting is non-existent even if set in a ~/.vimrc.
 This seem particularly odd.
 
 What Vim versions are you running?
 
 jeri@hudson:~$ dpkg -l vim* | grep ii ii  vim2:7.4.161-1 
 amd64Vi IMproved - enhanced vi editor ii  vim-common
 2:7.4.161-1  amd64Vi IMproved - Common files ii  vim-doc   
 2:7.4.161-1  all  Vi IMproved - HTML documentation ii  vim-gtk  
  2:7.4.161-1  amd64Vi IMproved - enhanced vi editor - with
 GTK2 GUI ii  vim-gui-common 2:7.4.161-1  all  Vi IMproved -
 Common GUI files ii  vim-runtime2:7.4.161-1  all  Vi
 IMproved - Runtime files jeri@hudson:~$
 
 --
 Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler

My versions (look just like yours)
ii  vim   2:7.4.161-1  amd64Vi IMproved - enhanced vi 
editor
ii  vim-common2:7.4.161-1  amd64Vi IMproved - Common files
ii  vim-doc   2:7.4.161-1  all  Vi IMproved - HTML 
documentation
ii  vim-runtime   2:7.4.161-1  all  Vi IMproved - Runtime 
files
ii  vim-scripts   20130814 all  plugins for vim, adding 
bells and whistles
ii  vim-tiny  2:7.4.161-1  amd64Vi IMproved - enhanced vi 
editor - compact version

I'm mystified.
   -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/ldmols$blj$1...@dont-email.me



Re: Vim config problem in jessie

2014-02-14 Thread Frank Miles
On Sat, 15 Feb 2014 01:00:01 +0100, Jeremiah Mahler wrote:

 On Fri, Feb 14, 2014 at 10:42:59PM +, Frank Miles wrote:
 On Fri, 14 Feb 2014 23:10:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
  On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
  
   On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
  the bottom.  This would only have an effect with python.vim is
  opened.
  It would not effect the editing of Python files.
  
   {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.
   
   
  Are there any modelines in this file?
  Does this issue occur with all Python files or just this one?
  Can you post an example?
 
 
 All python files with tabs; for example:
 
 #!/usr/bin/python
 
 def f() :
 return 1
 
 print f()
 ---
 And yes, I know that some people consider tabs sinful. Thanks so much
 for considering this!
 
 
   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
   
   
   I use
   
   ~/.vimrc
   
   and haven't experienced any of these issues.
   
   --
   Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
  
  Thanks .. but tried that too, no change.
  
  
  --
  Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
 
 
 
 If I remove my ~/.vimrc and open a Python file I get ts=8 and sw=8.  And
 when I edit the file the tabs are 8 as expected.
 I have not changed any of the system wide Vim configs in Debian.
 
 If I create a ~/.vimrc with only one line
 
 set ts=4
 
 and then open the Python file again I will get ts=4, sw=8 and tabs will
 be 4 as expected.
 
 In your case the ts=4 setting is non-existent even if set in a ~/.vimrc.
 This seem particularly odd.
 
 What Vim versions are you running?
 
 jeri@hudson:~$ dpkg -l vim* | grep ii ii  vim2:7.4.161-1 
 amd64Vi IMproved - enhanced vi editor ii  vim-common
 2:7.4.161-1  amd64Vi IMproved - Common files ii  vim-doc   
 2:7.4.161-1  all  Vi IMproved - HTML documentation ii  vim-gtk  
  2:7.4.161-1  amd64Vi IMproved - enhanced vi editor - with
 GTK2 GUI ii  vim-gui-common 2:7.4.161-1  all  Vi IMproved -
 Common GUI files ii  vim-runtime2:7.4.161-1  all  Vi
 IMproved - Runtime files jeri@hudson:~$
 
 --
 Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler

I should have added one more interesting detail.  If I comment out the
(python) plugin call in /etc/vim/vimrc:
 if has(autocmd)
 filetype plugin indent on
 endif

then the tabstops work without the manual override.  Having, of course,
lost all the nice stuff associated with the plugin.  Just to make sure
I hadn't messed up the plugin I commented-out the 'set ts=4' that I
had appended to the plugin - no change in its behavior :(


-- 
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/ldmp2s$dgr$1...@dont-email.me



Re: Vim config problem in jessie

2014-02-14 Thread Jeremiah Mahler
On Sat, Feb 15, 2014 at 04:05:48AM +, Frank Miles wrote:
 On Sat, 15 Feb 2014 01:00:01 +0100, Jeremiah Mahler wrote:
 
  On Fri, Feb 14, 2014 at 10:42:59PM +, Frank Miles wrote:
  On Fri, 14 Feb 2014 23:10:01 +0100, Jeremiah Mahler wrote:
  
   On Fri, Feb 14, 2014 at 08:22:02PM +, Frank Miles wrote:
   On Fri, 14 Feb 2014 20:50:01 +0100, Jeremiah Mahler wrote:
   
On Fri, Feb 14, 2014 at 06:35:25PM +, Frank Miles 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 only entry in my ..syntax/pthon.vim with ts=8 is the modeline at
   the bottom.  This would only have an effect with python.vim is
   opened.
   It would not effect the editing of Python files.
   
{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.


   Are there any modelines in this file?
   Does this issue occur with all Python files or just this one?
   Can you post an example?
  
  
  All python files with tabs; for example:
  
  #!/usr/bin/python
  
  def f() :
  return 1
  
  print f()
  ---
  And yes, I know that some people consider tabs sinful. Thanks so much
  for considering this!
  
  
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


I use

~/.vimrc

and haven't experienced any of these issues.

--
Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
   
   Thanks .. but tried that too, no change.
   
   
   --
   Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
  
  
  
  If I remove my ~/.vimrc and open a Python file I get ts=8 and sw=8.  And
  when I edit the file the tabs are 8 as expected.
  I have not changed any of the system wide Vim configs in Debian.
  
  If I create a ~/.vimrc with only one line
  
  set ts=4
  
  and then open the Python file again I will get ts=4, sw=8 and tabs will
  be 4 as expected.
  
  In your case the ts=4 setting is non-existent even if set in a ~/.vimrc.
  This seem particularly odd.
  
  What Vim versions are you running?
  
  jeri@hudson:~$ dpkg -l vim* | grep ii ii  vim2:7.4.161-1 
  amd64Vi IMproved - enhanced vi editor ii  vim-common
  2:7.4.161-1  amd64Vi IMproved - Common files ii  vim-doc   
  2:7.4.161-1  all  Vi IMproved - HTML documentation ii  vim-gtk  
   2:7.4.161-1  amd64Vi IMproved - enhanced vi editor - with
  GTK2 GUI ii  vim-gui-common 2:7.4.161-1  all  Vi IMproved -
  Common GUI files ii  vim-runtime2:7.4.161-1  all  Vi
  IMproved - Runtime files jeri@hudson:~$
  
  --
  Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler
 
 I should have added one more interesting detail.  If I comment out the
 (python) plugin call in /etc/vim/vimrc:
  if has(autocmd)
filetype plugin indent on
  endif
 
This is the difference.  On my machine it is commented out.

With ts=4 in my ~/.vimrc it will correctly be set with this commented out.
With it uncommented I get ts=8.

Why it behaves this way, I haven't figured out yet.

 then the tabstops work without the manual override.  Having, of course,
 lost all the nice stuff associated with the plugin.  Just to make sure
 I hadn't messed up the plugin I commented-out the 'set ts=4' that I
 had appended to the plugin - no change in its behavior :(
 
 
 

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler


-- 
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/20140215043649.GA31020@hudson.localdomain



Re: Vim config problem in jessie

2014-02-14 Thread Stanislav Bocinec
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