Re: Limiting ftplugins to relevant buffers

2013-01-23 Thread neilhwatson
Thanks for the help everyone. I think I have it sorted out. -- 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

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread Tony Mechelynck
On 22/01/13 22:48, Ben Fritz wrote: On Tuesday, January 22, 2013 3:41:27 PM UTC-6, Ben Fritz wrote: I think the problem is actually here: if !exists('g:DisableCFE3KeywordAbbreviations') let g:DisableCFE3KeywordAbbreviations=1 call EnableCFE3KeywordAbbreviations() endif That should b

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread Ben Fritz
On Tuesday, January 22, 2013 3:41:27 PM UTC-6, Ben Fritz wrote: > > I think the problem is actually here: > > if !exists('g:DisableCFE3KeywordAbbreviations') > let g:DisableCFE3KeywordAbbreviations=1 > call EnableCFE3KeywordAbbreviations() > endif > > That should be a buffer-local variab

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread Ben Fritz
On Tuesday, January 22, 2013 3:25:06 PM UTC-6, Charles Campbell wrote: > neilhwat...@gmail.com wrote: > > > On Tuesday, 22 January 2013 15:30:23 UTC-5, Ben Fritz wrote: > > >> Where did you define the abbreviations? How did you edit the new buffer > > > (specific command sequence)? > > > > >

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread neilhwatson
I have this: if exists("g:DisableCF3Ftplugin") finish endif But I do not have 'let g:DisableCF3Ftplugin=1' or anything similar in .vimrc or elsewhere. How can this affect it? If this is the cause I would expect the maps to not work, but they do. Only abbreviations do not work in a new b

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread Charles Campbell
neilhwat...@gmail.com wrote: On Tuesday, 22 January 2013 15:30:23 UTC-5, Ben Fritz wrote: Where did you define the abbreviations? How did you edit the new buffer (specific command sequence)? The abbreviations are on the ftplugin. New buffer: :e newfile.cf The plugin is here: https://github.

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread neilhwatson
On Tuesday, 22 January 2013 15:30:23 UTC-5, Ben Fritz wrote: > Where did you define the abbreviations? How did you edit the new buffer (specific command sequence)? The abbreviations are on the ftplugin. New buffer: :e newfile.cf The plugin is here: https://github.com/neilhwatson/vim_cf3/blob/d

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread Ben Fritz
On Tuesday, January 22, 2013 8:40:25 AM UTC-6, neilh...@gmail.com wrote: > Success with maps. Thank you. nmap limits the map to that file > type. I tried the same with abbreviations using iab . This works > too well. If I open another buffer of the same file type, the maps work but > the a

Re: Limiting ftplugins to relevant buffers

2013-01-22 Thread neilhwatson
Success with maps. Thank you. nmap limits the map to that file type. I tried the same with abbreviations using iab . This works too well. If I open another buffer of the same file type, the maps work but the abbreviations do not. What did I do wrong? -- You received this message from th

Re: Limiting ftplugins to relevant buffers

2013-01-21 Thread Ben Fritz
On Monday, January 21, 2013 3:24:33 PM UTC-6, neilh...@gmail.com wrote: > I tried this: > au BufRead,BufNewFile *.cf setlocal ft=cf3 > > The maps from the cf plugin still worked if my buffer was *.html. You need to set up buffer-local mappings if you don't want them to be defined globally to all

Re: Limiting ftplugins to relevant buffers

2013-01-21 Thread neilhwatson
I tried this: au BufRead,BufNewFile *.cf setlocal ft=cf3 The maps from the cf plugin still worked if my buffer was *.html. -- 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

Re: Limiting ftplugins to relevant buffers

2013-01-21 Thread sc
On Mon, Jan 21, 2013 at 01:03:59PM -0800, neilhwat...@gmail.com wrote: > Greetings, > I set custom ftplugin like this: > au BufRead,BufNewFile *.cf set ft=cf3 > I edit a .cf file the plugin works correctly. If I start a new buffer, say > *.html, the settings from the .cf plugin are active in th

Limiting ftplugins to relevant buffers

2013-01-21 Thread neilhwatson
Greetings, I set custom ftplugin like this: au BufRead,BufNewFile *.cf set ft=cf3 I edit a .cf file the plugin works correctly. If I start a new buffer, say *.html, the settings from the .cf plugin are active in this buffer. How can I prevent this? -- You received this message from the "vim_