Re: syntax settings with php module files - 'after' problem

2014-02-17 Thread Ben Fritz
On Sunday, February 16, 2014 3:12:43 PM UTC-6, Tim Johnson wrote:
 I'm using ver 7.3 on Mac OSX 10.7
 
 I have the following as a group in .vimrc inside of a 
 
 if has(autocmd) 
 
 block in 
 
   augroup module
 
 autocmd BufRead,BufNewFile *.module set filetype=php
 
 autocmd BufRead,BufNewFile *.install set filetype=php
 
 autocmd BufRead,BufNewFile *.test set filetype=php
 
 autocmd BufRead,BufNewFile *.inc set filetype=php
 
 autocmd BufRead,BufNewFile *.profile set filetype=php
 
 autocmd BufRead,BufNewFile *.view set filetype=php
 
   augroup END
 
 
 
 And I have the following in ~/.vim/after/syntax/php.vim
 
 setlocal iskeyword=@,48-57,_,192-255
 
 setlocal expandtab
 
 setlocal shiftwidth=2
 
 setlocal tabstop=2
 
 setlocal softtabstop=2
 
 
 
 I have noted 
 
 1)That the setlocal options above are correct in a buffer with a
 
 .php extension
 
 2)That the filetype is shown to be 'php' in a buffer with a .module
 
 or .install extension.
 
 **But**
 
 the setlocal options from ~/.vim/after/syntax/php.vim are being
 
 ignored in buffers with .module and .install extensions
 

I just tried this exact setup, and it works fine for me in 7.4.

I edited a new test.install file and all the settings in the after/syntax 
file were applied properly, just as they were in a new Vim instance editing 
test.php.

So, what does this tell you?

  :verbose set iskeyword? expandtab? shiftwidth? tabstop? softtabstop?

For me each option points to the after/syntax file.

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: syntax settings with php module files - 'after' problem

2014-02-17 Thread Tim Johnson
* Ben Fritz fritzophre...@gmail.com [140217 07:27]:
 On Sunday, February 16, 2014 3:12:43 PM UTC-6, Tim Johnson wrote:
  ignored in buffers with .module and .install extensions
  
 
 I just tried this exact setup, and it works fine for me in 7.4.
 
 I edited a new test.install file and all the settings in the after/syntax 
 file were applied properly, just as they were in a new Vim instance editing 
 test.php.
 
 So, what does this tell you?
 
   :verbose set iskeyword? expandtab? shiftwidth? tabstop? softtabstop?
  blush I'd solved it earlier, but forgot to post the
  solution./blush
  the session .vim file was overriding the desired settings. I
  simply sourced the /after file manually, saved the session file
  and all is good now.

  This one of the 'gotchas' I frequently fall into when I tweak vim.
  I need to remember 'verbose set' - its often a big help...
  thanks for the help
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


syntax settings with php module files - 'after' problem

2014-02-16 Thread Tim Johnson
I'm using ver 7.3 on Mac OSX 10.7
I have the following as a group in .vimrc inside of a 
if has(autocmd) 
block in 
  augroup module
autocmd BufRead,BufNewFile *.module set filetype=php
autocmd BufRead,BufNewFile *.install set filetype=php
autocmd BufRead,BufNewFile *.test set filetype=php
autocmd BufRead,BufNewFile *.inc set filetype=php
autocmd BufRead,BufNewFile *.profile set filetype=php
autocmd BufRead,BufNewFile *.view set filetype=php
  augroup END

And I have the following in ~/.vim/after/syntax/php.vim
setlocal iskeyword=@,48-57,_,192-255
setlocal expandtab
setlocal shiftwidth=2
setlocal tabstop=2
setlocal softtabstop=2

I have noted 
1)That the setlocal options above are correct in a buffer with a
.php extension
2)That the filetype is shown to be 'php' in a buffer with a .module
or .install extension.
**But**
the setlocal options from ~/.vim/after/syntax/php.vim are being
ignored in buffers with .module and .install extensions

What else do I need to do?
thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: syntax settings with php module files - 'after' problem

2014-02-16 Thread Ben Fritz
On Sunday, February 16, 2014 3:12:43 PM UTC-6, Tim Johnson wrote:
 I'm using ver 7.3 on Mac OSX 10.7
 
 I have the following as a group in .vimrc inside of a 
 
 if has(autocmd) 
 
 block in 
 
   augroup module
 
 autocmd BufRead,BufNewFile *.module set filetype=php
 
 autocmd BufRead,BufNewFile *.install set filetype=php
 
 autocmd BufRead,BufNewFile *.test set filetype=php
 
 autocmd BufRead,BufNewFile *.inc set filetype=php
 
 autocmd BufRead,BufNewFile *.profile set filetype=php
 
 autocmd BufRead,BufNewFile *.view set filetype=php
 
   augroup END
 
 
 
 And I have the following in ~/.vim/after/syntax/php.vim
 
 setlocal iskeyword=@,48-57,_,192-255
 
 setlocal expandtab
 
 setlocal shiftwidth=2
 
 setlocal tabstop=2
 
 setlocal softtabstop=2
 
 
 
 I have noted 
 
 1)That the setlocal options above are correct in a buffer with a
 
 .php extension
 
 2)That the filetype is shown to be 'php' in a buffer with a .module
 
 or .install extension.
 
 **But**
 
 the setlocal options from ~/.vim/after/syntax/php.vim are being
 
 ignored in buffers with .module and .install extensions
 
 
 
 What else do I need to do?
 

I'm not sure if this is the cause, but you could try enabling nested autocmd 
calls in your autocmds. See :help autocmd-nested

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Drupal] syntax settings with php module files - 'after' problem

2014-02-16 Thread Tim Johnson
* Ben Fritz fritzophre...@gmail.com [140216 15:41]:
  
  the setlocal options from ~/.vim/after/syntax/php.vim are being
  
  ignored in buffers with .module and .install extensions
  
  
  
  What else do I need to do?
  
 
 I'm not sure if this is the cause, but you could try enabling
 nested autocmd calls in your autocmds. See :help autocmd-nested
Thanks for the reply, Ben. I'm pretty sure that the nested autocmds
are being 'executed' as they should be. Furthermore, I'm not sure
that autocmd-nested applies in this case.

I *think* there should be some connection between the augroup and
the '?php' at BOF for php.

On a related note, I came across documentation on a drupal vim
plugin, https://drupal.org/node/1389448 and the main author is (I
think) a frequent participant here. 

I've added '[Drupal]' to the subject line to grab further attention.
Unless I hear different, I will probably forgoe this approach and go
with the plugin.

:) If you look at the plugin page and see under Page Status
No known problems, that is a deal-maker for me.
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.