A patch for idlang.vim in syntax directory
Hello, "FOR" should not be regarded as idlangRoutine. This is fixed in the attachment. Cannot get in touch with the maintainer. Regards, H Xu 2011/4/11 -- You received this message from the "vim_dev" 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 diff -r 3adc6dd2d122 runtime/syntax/idlang.vim --- a/runtime/syntax/idlang.vim Thu Mar 03 15:01:30 2011 +0100 +++ b/runtime/syntax/idlang.vim Mon Mar 21 11:40:58 2011 +0800 @@ -113,7 +113,7 @@ syn keyword idlangRoutine F_PDF FACTORIAL FFT FILE_CHMOD FILE_DELETE syn keyword idlangRoutine FILE_EXPAND_PATH FILE_MKDIR FILE_TEST FILE_WHICH syn keyword idlangRoutine FILEPATH FINDFILE FINDGEN FINITE FIX FLICK FLOAT -syn keyword idlangRoutine FLOOR FLOW3 FLTARR FLUSH FOR FORMAT_AXIS_VALUES +syn keyword idlangRoutine FLOOR FLOW3 FLTARR FLUSH FORMAT_AXIS_VALUES syn keyword idlangRoutine FORWARD_FUNCTION FREE_LUN FSTAT FULSTR FUNCT syn keyword idlangRoutine FV_TEST FX_ROOT FZ_ROOTS GAMMA GAMMA_CT syn keyword idlangRoutine GAUSS_CVF GAUSS_PDF GAUSS2DFIT GAUSSFIT GAUSSINT
Re: Suggestion: change how [count]@{register} executes
On Apr 10, 2:45 pm, Bram Moolenaar wrote: > > You can't rely on the register not changing in the first @@, thus the > following 999@@ may do something completely different. Won't work. > I think that might be part of the point of the proposal. But unless I'm wrong you can get that behavior by explicitly recording a recursive macro. -- You received this message from the "vim_dev" 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: :list and :print move cursor
On Apr 9, 3:52 am, Andy Wokula wrote: > > These commands imply cursor movement, e.g. > 20:list > > moves the cursor to the last printed line. > The 'startofline' option applies. > Is it really surprising that the cursor moves? > I did not know that :20list moved the cursor. Now that you point this out, no, it's not that surprising. -- You received this message from the "vim_dev" 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: [patch] match does not Conceal items
Christian Brabandt wrote: Hi Bram! On So, 10 Apr 2011, Bram Moolenaar wrote: Can you explain what the effect is? Basically, I wanted to create a plugin that uses concealing for something like vertical folding. Perhaps you could look into foldcol.vim and see if that does what you want: http://mysite.verizon.net/astronaut/vim/index.html#FOLDCOL. It uses syntax rather than match, with the limitations thereof. Regards, Chip Campbell -- You received this message from the "vim_dev" 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: [patch] match does not Conceal items
Christian Brabandt wrote: > On So, 10 Apr 2011, Bram Moolenaar wrote: > > > Can you explain what the effect is? > > Basically, I wanted to create a plugin that uses concealing for > something like vertical folding. I tried to dynamically conceal columns > using :call matchadd(), but this only highlights the region, it does not > conceal it, no matter what 'cole' is set to. So instead, I started using > :syn match commands. Problem here is, you can't really remove matches > and it is not that easy to use. > > There is still a problem, that cursor movement won't skip over concealed > text. I am currently thinking about creating a patch for that as well, > e.g. when cole is set to 4 (it currently allows only 3). But I don't > know how easy that is to implement, it would have to be done on a lot of > places. > > > Perhaps we also need an update to > > the documentation. And an example to show the effect. > > I Don't think so. I expect, that when cole is set to 3, that a :call > matchadd('Conceal', 'foobar') conceals the foobar part > and not to have it highlighted. I would even consider this a bug. No, using the "Conceal" group only means it's highlighted like characters replaced by the conceal feature, not that they are not displayed. You will have to do more than setting the highlighting group, something similar to the cchar and conceal arguments to :syn. You will also have to fix the cursor movement and any other related problems before I would include this. Experience with the conceal feature has learned us that it can easily trigger more problems, thus we also need tests. -- Bad fashion can discourage normal people from interacting with the engineer and talking about the cute things their children do. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- You received this message from the "vim_dev" 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: Suggestion: change how [count]@{register} executes
Ben Schmidt wrote: > > So, what about executing > > 1000@@ > > as > > @@999@@ > > > > (where in turn 999@@ is executed as > > @@998@@ > > and so on ... and 2@@ as > > @@1@@ > > and 1@@ as > > @@ > > )? > > I like the idea. Hadn't thought of using recursion when I wrote about > the issue earlier, but yes, of course, that's an obvious and simple way > to implement it. Putting together a patch would only take a couple of > minutes. > > What do you think, Bram? I don't think anything could really > meaningfully make use of the current behaviour, so even though > technically it would break backward compatibility it wouldn't break > anything useful. You can't rely on the register not changing in the first @@, thus the following 999@@ may do something completely different. Won't work. -- It doesn't really matter what you are able to do if you don't do it. (Bram Moolenaar) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- You received this message from the "vim_dev" 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: Suggestion: change how [count]@{register} executes
Could that change affect undo chunking? -ernie On 4/10/2011 4:46 AM, Ben Schmidt wrote: So, what about executing 1000@@ as @@999@@ (where in turn 999@@ is executed as @@998@@ and so on ... and 2@@ as @@1@@ and 1@@ as @@ )? I like the idea. Hadn't thought of using recursion when I wrote about the issue earlier, but yes, of course, that's an obvious and simple way to implement it. Putting together a patch would only take a couple of minutes. What do you think, Bram? I don't think anything could really meaningfully make use of the current behaviour, so even though technically it would break backward compatibility it wouldn't break anything useful. Ben. -- You received this message from the "vim_dev" 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: [patch] match does not Conceal items
Hi Bram! On So, 10 Apr 2011, Bram Moolenaar wrote: > Can you explain what the effect is? Basically, I wanted to create a plugin that uses concealing for something like vertical folding. I tried to dynamically conceal columns using :call matchadd(), but this only highlights the region, it does not conceal it, no matter what 'cole' is set to. So instead, I started using :syn match commands. Problem here is, you can't really remove matches and it is not that easy to use. There is still a problem, that cursor movement won't skip over concealed text. I am currently thinking about creating a patch for that as well, e.g. when cole is set to 4 (it currently allows only 3). But I don't know how easy that is to implement, it would have to be done on a lot of places. > Perhaps we also need an update to > the documentation. And an example to show the effect. I Don't think so. I expect, that when cole is set to 3, that a :call matchadd('Conceal', 'foobar') conceals the foobar part and not to have it highlighted. I would even consider this a bug. > Please use tabs where possible. > > +match_conc=FALSE; > > Put spaces around the "=". Sorry. The updated patch, I sent earlier should have covered that. regards, Christian -- You received this message from the "vim_dev" 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: [patch] filetype.vim
Thilo Six wrote: > > I'll include the change for messages, but the one for muttrc now has a > > pattern that ends in a star. That part should use s:StarSetf(), thus it > > needs to be split up. > > Thanks for your remarks. Find attached an updated patch. Thanks. I'll include it. Note that we use "au" intead of "autocmd" in this file. -- Every engineer dreams about saving the universe and having sex with aliens. This is much more glamorous than the real life of an engineer, which consists of hiding from the universe and having sex without the participation of other life forms. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- You received this message from the "vim_dev" 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: dirpager.vim
Thilo Six wrote: > Hello Bram > hello list, > > i have modified a vim syntax file originally written by Nikolai Weibull and i > ask for it´s inclusion into vim runtime files. > > It purpose is to simulate '$ ls --color=auto' and it is used like this: > $ ls -la | view -c "set ft=dirpager" - > > No patch to filetype.vim this time. sorry. ;) > > I also had a conversation with Nikolai about it´s copyright. Conclusion: It's > reusable under the same terms as vim itself. If thats needs adjusting mail me. Thanks, I'll include it. -- Engineers are widely recognized as superior marriage material: intelligent, dependable, employed, honest, and handy around the house. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- You received this message from the "vim_dev" 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: [patch] match does not Conceal items
Christian Brabandt wrote: > Hi Bram, > problem is, you can't conceal items using :match or matchadd(). > > Attached patch fixes it: Can you explain what the effect is? Perhaps we also need an update to the documentation. And an example to show the effect. Please use tabs where possible. +match_conc=FALSE; Put spaces around the "=". -- For society, it's probably a good thing that engineers value function over appearance. For example, you wouldn't want engineers to build nuclear power plants that only _look_ like they would keep all the radiation inside. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- You received this message from the "vim_dev" 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: [patch] match does not Conceal items
Hi vim_dev! On Sa, 09 Apr 2011, Christian Brabandt wrote: > problem is, you can't conceal items using :match or matchadd(). > > Attached patch fixes it: ... and this time, it even compiles with tiny features... regards, Christian -- You received this message from the "vim_dev" 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 diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -2866,6 +2866,7 @@ wrapping */ intvcol_off= 0;/* offset for concealed characters */ intdid_wcol= FALSE; +int match_conc = FALSE; # define VCOL_HLC (vcol - vcol_off) #else # define VCOL_HLC (vcol) @@ -3401,6 +3402,9 @@ */ for (;;) { +#ifdef FEAT_CONCEAL + match_conc = FALSE; +#endif /* Skip this quickly when working on the text. */ if (draw_state != WL_LINE) { @@ -3670,6 +3674,13 @@ && v < (long)shl->endcol) { shl->attr_cur = shl->attr; +#ifdef FEAT_CONCEAL + if (cur != NULL && + syn_name2id((char_u *) "Conceal") == cur->hlg_id) + match_conc = TRUE; + else + match_conc = FALSE; +#endif } else if (v == (long)shl->endcol) { @@ -4471,8 +4482,8 @@ #ifdef FEAT_CONCEAL if ( wp->w_p_cole > 0 && (wp != curwin || lnum != wp->w_cursor.lnum || - conceal_cursor_line(wp)) - && (syntax_flags & HL_CONCEAL) != 0 + conceal_cursor_line(wp) ) + && ( (syntax_flags & HL_CONCEAL) != 0 || match_conc) && !(lnum_in_visual_area && vim_strchr(wp->w_p_cocu, 'v') == NULL)) {
Re: Suggestion: change how [count]@{register} executes
So, what about executing 1000@@ as @@999@@ (where in turn 999@@ is executed as @@998@@ and so on ... and 2@@ as @@1@@ and 1@@ as @@ )? I like the idea. Hadn't thought of using recursion when I wrote about the issue earlier, but yes, of course, that's an obvious and simple way to implement it. Putting together a patch would only take a couple of minutes. What do you think, Bram? I don't think anything could really meaningfully make use of the current behaviour, so even though technically it would break backward compatibility it wouldn't break anything useful. Ben. -- You received this message from the "vim_dev" 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
dirpager.vim
Hello Bram hello list, i have modified a vim syntax file originally written by Nikolai Weibull and i ask for it´s inclusion into vim runtime files. It purpose is to simulate '$ ls --color=auto' and it is used like this: $ ls -la | view -c "set ft=dirpager" - No patch to filetype.vim this time. sorry. ;) I also had a conversation with Nikolai about it´s copyright. Conclusion: It's reusable under the same terms as vim itself. If thats needs adjusting mail me. -- bye Thilo 4096R/0xC70B1A8F 721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F -- You received this message from the "vim_dev" 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 " Vim syntax file " Language: directory pager " Maintainer: Thilo Six " Derived From: Nikolai Weibull's dircolors.vim " Latest Revision: 2011-04-09 " " usage: $ ls -la | view -c "set ft=dirpager" - " if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal nowrap syn keyword DirPagerTodo contained FIXME TODO XXX NOTE syn region DirPagerExestart='^...x\|^..x\|^.x' end='$' contains=DirPagerTodo,@Spell syn region DirPagerDirstart='^d' end='$' contains=DirPagerTodo,@Spell syn region DirPagerLink start='^l' end='$' contains=DirPagerTodo,@Spell hi def link DirPagerTodo Todo hi def DirPagerExectermfg=Green guifg=Green hi def DirPagerDirctermfg=Blueguifg=Blue hi def DirPagerLink ctermfg=Cyanguifg=Cyan let b:current_syntax = "dirpager" let &cpo = s:cpo_save unlet s:cpo_save
Re: [patch] filetype.vim
Thilo Six wrote the following on 09.04.2011 22:20 Hello Bram, > > -- -- > >> I'll include the change for messages, but the one for muttrc now has a >> pattern that ends in a star. That part should use s:StarSetf(), thus it >> needs to be split up. > > Thanks for your remarks. Find attached an updated patch. I just noticed there is still one typoed 'xf86c_xfree86_version' left. fixed that also. -- bye Thilo 4096R/0xC70B1A8F 721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F -- You received this message from the "vim_dev" 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 --- filetype.vim.orig 2011-04-02 19:01:19.0 +0200 +++ filetype.vim 2011-04-10 08:55:13.0 +0200 @@ -1103,7 +1103,7 @@ au BufNewFile,BufRead *.hgrc,*hgrc setf cfg " Messages (logs mostly) -autocmd BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.*[0-9]*} setf messages +autocmd BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages " Metafont au BufNewFile,BufRead *.mf setf mf @@ -1180,6 +1180,9 @@ " Mysql au BufNewFile,BufRead *.mysql setf mysql +" Mutt setup files (must be before catch *.rc) +au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') + " M$ Resource files au BufNewFile,BufRead *.rc setf rc @@ -2230,7 +2233,7 @@ " XFree86 config au BufNewFile,BufRead XF86Config \ if getline(1) =~ '\' | - \ let b:xf86c_xfree86_version = 3 | + \ let b:xf86conf_xfree86_version = 3 | \ endif | \ setf xf86conf au BufNewFile,BufRead */xorg.conf.d/*.conf