Re: Vim7: Spell checking not working with ft=mail
On Thu, Oct 12, 2006 at 01:42:23PM -0700, Max Dyckhoff wrote: > Has spell been turned off by something? If you enter > > :verbose set spell? > > does it tell you if some plugin has been messing with your spell > settings The answer is just "spell". > FWIW: I tried this and it worked. Opena clean instance of vim, :set > spell, this is a tset (observe highlighting), :set > ft=mail (observe highlighting still present). Doesn't work for me. Leslie -- gpg --keyserver pgp.mit.edu --recv-keys DD4EBF83 http://nic-nac-project.de/~skypher/ pgpcBMxqtnUEL.pgp Description: PGP signature
Re: diffoff
Is it on the to-do list to make diffoff restore from previous values rather than default ones, or is there already an option somewhere that toggles the behaviour? AFAIK you have to save the options before starting diff mode and restore them later. At least, that is the answer to the question you asked. Maybe if you give more detail about what you are trying to do, someone can give a more helpful answer. I had a file open with foldmethod=marker, then I :vimdiff'd it against another file, made my changes to the original file, then :q'd the second file and :diffoff'd the first, but it was still using foldmethod=diff. Thanks. -- .
Re: Vim7: Spell checking not working with ft=mail
On Thu, Oct 12, 2006 at 10:50:31PM +0200, A.J.Mechelynck wrote: > (i.e., 3 nonempty lines and one empty line). You may add more headers, > and/or fill them in. Then your "body" text will be after the first > empty line, and it will not be regaded as "headers". Interesting. The subject is checked for errors, but the body part still isn't. Leslie -- gpg --keyserver pgp.mit.edu --recv-keys DD4EBF83 http://nic-nac-project.de/~skypher/ pgp6BpiqjH0n2.pgp Description: PGP signature
Re: VimL and Exuberant tags - Suggestions please
Dnia piątek, 13 października 2006 02:16, David Fishburn napisał: > > > Instead of simply grouping everything under variables, should we > distinguish between different types? > let forms#form = { > \ 'title': 'Address Entry Form', > \ 'fields': [], > \ 'defaultbutton': 'ok', > \ 'fieldMap': {}, > \ 'hotkeyMap': {}, > \ } > > Right now this is identified as a variable, should we identify it as a > Dictionary by adding another kind of tag? Detection of variable type (string, list, dictionary) would be great thing. m.
Re: diffoff
On Fri, Oct 13, 2006 at 10:47:33AM +0100, Vigil wrote: > >>Is it on the to-do list to make diffoff restore from previous values > >>rather > >>than default ones, or is there already an option somewhere that toggles > >>the > >>behaviour? > > > >AFAIK you have to save the options before starting diff mode and > >restore them later. At least, that is the answer to the question you > >asked. Maybe if you give more detail about what you are trying to do, > >someone can give a more helpful answer. > > I had a file open with foldmethod=marker, then I :vimdiff'd it against > another file, made my changes to the original file, then :q'd the second > file and :diffoff'd the first, but it was still using foldmethod=diff. I do not think that :vimdiff is a command. Did you start a new instance of vim from the shell with $ vimdiff or did you use some other command within vim? I tried :tab sp foo.txt :set fdm=marker :diffsplit bar.txt " do some editing ending in bar.txt :wq :diffoff :set fdm? foldmethod=manual This is the expected behavior. HTH --Benji Fisher
Re: Vim7: Spell checking not working with ft=mail
Anthony Campbell wrote: On 12 Oct 2006, A.J.Mechelynck wrote: Tom Purl wrote: [...] That's weird. I use Gvim to edit web mail via the Mozex extension. I can place "this is a tset" at line one in my message after executing the `set filetype=mail` command, and it will be spell-checked. I don't have to include any headers or empty lines or anything else like that. Hm. Apparently you're right. By doing the following: :new :setl ft=mail :setl spell a this is a tset with a space at the end of the line, I get a blue curly underline under "this" and a red one under "tset". Do you have spell checking on? Normally yes, but still... what is the reply to :verbose setlocal spell? when you do it (with the question mark) in a window where the 'filetype' is set to "mail" but you don't see spell-check highlights? Unless you yourself set 'spell' on, e.g. by having "set spell" in your vimrc, Vim will by default do no spell-checking at all. I'm sorry; I can't post to the list, although I can read it. (Feel free to forward it.) Just to say that I don't get spelling checked with html files either. Anthony I. To post to the list, you must: 1. Subscribe to it. This is a two-step process, see http://www.vim.org/community.php 2. Send a message, in plain text only, to the list address (e.g., vim -at- vim -dot- org), "from" your subscribed address. II. You didn't say whether 'spell' was set. Best regards, Tony.
Re: Vim7: Spell checking not working with ft=mail
Anthony Campbell wrote: On 13 Oct 2006, A.J.Mechelynck wrote: Anthony Campbell wrote: I'm sorry; I can't post to the list, although I can read it. (Feel free to forward it.) Just to say that I don't get spelling checked with html files either. Anthony I. To post to the list, you must: 1. Subscribe to it. This is a two-step process, see http://www.vim.org/community.php 2. Send a message, in plain text only, to the list address (e.g., vim -at- vim -dot- org), "from" your subscribed address. II. You didn't say whether 'spell' was set. Best regards, Tony. I know, I have subscribed, but my posts never appear. (This is not new; it's been like that for many months.) I've tried unsubscribing and resubscribing, but no luck. Did you receive the confirmation email which was sent to you as an auto-reply when you sent a mail to vim-subscribe -at- vim.org ? And did you do what it said? (If you did, you should receive two copies of the present email.) Is the "From:" line of your messages to the list identical to that on your two "subscribe" emails? (Messages "From" non-subscribed email addresses are silently discarded by the mail robot for the list). Is the list address present in the "To:" or "Cc:" (not "Bcc:") line? ("Reply to Sender" on a post will never send to the list; "Reply to All" ought to). Are your messages in plaintext only, with no HTML? (HTML messages are silently discarded as an anti-spam measure; they never make it to the list.) And yes, spell is set and if I turn off html (set ft=text) it does work. But if html is specififed nothing is spell-checked. Anthony When I set 'spell', text (but not tag names or attributes) is spell-checked in my HTML files. If I ":setlocal ft=text", everything is spell-checked, and ":setlocal ft=html" brings it back to text-only. What does it say when you do :verbose set spell? (with the question mark), the active cursor being in a non-spell-checked HTML file? Bset regards, Tony.
Re: Vim7: Spell checking not working with ft=mail
> Anthony Campbell wrote: >> I know, I have subscribed, but my posts never appear. (This is not new; >> it's been like that for many months.) I've tried unsubscribing and >> resubscribing, but no luck. > Did you receive the confirmation email which was sent to you as an > auto-reply when you sent a mail to vim-subscribe -at- vim.org ? And > did you do what it said? (If you did, you should receive two copies of > the present email.) > Is the "From:" line of your messages to the list identical to that on > your two "subscribe" emails? (Messages "From" non-subscribed email > addresses are silently discarded by the mail robot for the list). > Is the list address present in the "To:" or "Cc:" (not "Bcc:") line? > ("Reply to Sender" on a post will never send to the list; "Reply to > All" ought to). > Are your messages in plaintext only, with no HTML? (HTML messages are > silently discarded as an anti-spam measure; they never make it to the > list.) Another possibility is that the Vim listserver is bouncing your messages and your mail provider isn't telling you that this happens. I had a problem for a while when my mail provider was recognized as a spammer by the listserver, and all of the messages that I sent to the list were bounced. Luckily, my mail provider sent an error e-mail to me that gave me a decent amount of troubleshooting information. HTH! Tom Purl
RE: VimL and Exuberant tags - Suggestions please
> -Original Message- > From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 12, 2006 8:47 PM > To: David Fishburn > Cc: vim@vim.org > Subject: Re: VimL and Exuberant tags - Suggestions please > > David Fishburn wrote: > [...] > > When variables are identified we strip off the scope: > > let s:ignoreNextCursorMovedI = 0 ==> > ignoreNextCursorMovedI Should > > the scope be left on ==> s:ignoreNextCursorMovedI > > How are scopes handled in other languages? > > Notice that varname (in a function) is the same as l:varname > while varname (in a script, but outside of all functions) is > the same as g:varname. Similarly, s:funcname is the same as > funcname > > If you identify scopes, should or shouldn't ctags qualify the > non-global variables by their script (if script-local) or > script and function (if function-local)? (I see you mention > this in a further paragraph. If it's not too hard to program, > it might be useful as an option.) > > And how to treat buffer- and window-local variables? Basically I am saying this, consider the code snippet: let g:var_global_scope = 1 let s:var_script_scope = 1 let var_script_default_scope = 1 function mydict.len() dict let var_in_func = 2 let s:script_var_in_func = 2 return len(self.data) endfunction What I am suggesting is we do not remove the scoping at the start of the variable. So in the case above, we would create the following tags: Variable g:var_global_scope s:var_script_scope var_script_default_scope These 2 variables are ignored since they were used inside of a function: let var_in_func = 2 let s:script_var_in_func = 2 I would like to leave the scoping on, since it provides additional information: g:var_global_scope -> var_global_scope s:var_script_scope -> var_script_scope You don't know if this is a script, global, buffer, window, tab, scoped variable. You would assume they were all global unless otherwise referenced. > > > > > > > Instead of simply grouping everything under variables, should we > > distinguish between different types? > > let forms#form = { > > \ 'title': 'Address Entry Form', > > \ 'fields': [], > > \ 'defaultbutton': 'ok', > > \ 'fieldMap': {}, > > \ 'hotkeyMap': {}, > > \ } > > > > Right now this is identified as a variable, should we > identify it as a > > Dictionary by adding another kind of tag? > [...] > > When a script has > > :let var1 = var2 > > there is nothing there (maybe nothing in the script) which > says whether the variable in question is a "simple" variable > (Number/String), a List, or a Dictionary. Wouldn't it be a > headbreaker to try to label all cases correctly? Right, I wasn't looking for anything earth shattering here. let var1 = var2 let var1 = {...} let var1 = [...] Does provide us with additional information if we wish to use it. Dave
:tab does not open in new tab in some cases ?
:hi I did the following mappings: map :tab e ~/.vimrc_ map :tab e ~/.zshrc_ I start vim without any argument and press F12 . ${HOME}/.vimrc opens but does not create an entry in the tab pages line at the top of my Vim window -- so far so nice, since it is the first file loaded and showtabline == 1. Then I press Shift-F12 . ${HOME}/.zshrc appears. This is the second file, but still no tab pages line appears. Then I do :tab h :tab and TADA! the tab pages line apears, showing "~/.zshrc" and "tabpages.txt" With :tabn I can switch to ${HOME}/.zshrc. Now the tab pages line shows "~/.zshrc" and "tabpages.txt". This is at least a little confusing (at least?) to me. What is the logic of showing/not showing a tab pages line entry ? Thank you very much in advance for any help ! Keep hacking! mcc
Re: bugs in vim scripting highlighting
Hari Krishna Dara wrote: I faced a problem, though it is with netrw, not with vim syntax file. I tried to open the download link from Vim, and got the below error: Error detected while processing function netrw#NetRead: line 275: "http://mysite.verizon.net/astronaut/vim/syntax/vim.vim.gz"; E212: Can't open file for writing "VIG3A4.tmp.gz" [+][Not edited] --No lines in buffer-- Error detected while processing function netrw#NetRead..115_NetGetFile: line 42: E37: No write since last change (add ! to override) "http://mysite.verizon.net/astronaut/vim/syntax/vim.vim.gz"; [+][Not edited] --No lines in buffer-- Error detected while processing function gzip#read: line 31: Error: Could not read uncompressed file "VIJ3A7.tmp.gz" [Not edited] --No lines in buffer-- I got an empty buffer, and when I reloaded the buffer, it worked fine. I am on windows. In addition to the various fixes concerning tmp files and windows, another similar problem has been solved; apparently, having autowrite on caused trouble. The latest netrw now bypasses that option, too. (v107c). Its currently available at my website: http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs , see "Network Oriented Reading, Writing, and Browsing". Regards, Chip Campbell
Re: Vim7: Spell checking not working with ft=mail
Anthony Campbell wrote: On 13 Oct 2006, A.J.Mechelynck wrote: Anthony Campbell wrote: On 13 Oct 2006, A.J.Mechelynck wrote: Anthony Campbell wrote: I'm sorry; I can't post to the list, although I can read it. (Feel free to forward it.) Just to say that I don't get spelling checked with html files either. Anthony I. To post to the list, you must: 1. Subscribe to it. This is a two-step process, see http://www.vim.org/community.php 2. Send a message, in plain text only, to the list address (e.g., vim -at- vim -dot- org), "from" your subscribed address. II. You didn't say whether 'spell' was set. Best regards, Tony. I know, I have subscribed, but my posts never appear. (This is not new; it's been like that for many months.) I've tried unsubscribing and resubscribing, but no luck. Did you receive the confirmation email which was sent to you as an auto-reply when you sent a mail to vim-subscribe -at- vim.org ? And did you do what it said? (If you did, you should receive two copies of the present email.) Is the "From:" line of your messages to the list identical to that on your two "subscribe" emails? (Messages "From" non-subscribed email addresses are silently discarded by the mail robot for the list). Is the list address present in the "To:" or "Cc:" (not "Bcc:") line? ("Reply to Sender" on a post will never send to the list; "Reply to All" ought to). Are your messages in plaintext only, with no HTML? (HTML messages are silently discarded as an anti-spam measure; they never make it to the list.) Yes to all these. I think Tom may be on the right lines about this. And yes, spell is set and if I turn off html (set ft=text) it does work. But if html is specififed nothing is spell-checked. Anthony When I set 'spell', text (but not tag names or attributes) is spell-checked in my HTML files. If I ":setlocal ft=text", everything is spell-checked, and ":setlocal ft=html" brings it back to text-only. What does it say when you do :verbose set spell? (with the question mark), the active cursor being in a non-spell-checked HTML file? It says "nospell" Anthony 'nospell' is the default setting, and it prohibits all spell checking. Add the line set spell to your vimrc, and restart Vim. If it doesn't cure your problem, retry ":verbose set spell?" in a non-spell-checked file to see if some other script undid what your vimrc had done. Best regards, Tony.
RE: VimL and Exuberant tags - Suggestions please
> -Original Message- > From: Peter Hodge [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 12, 2006 11:24 PM > To: David Fishburn; vim@vim.org > Subject: Re: VimL and Exuberant tags - Suggestions please > > Hello David, > > Can I suggest support for these commands: > > :set/setlocal/setglobal > :syntax > :highlight (and maybe :HiLink because it is so commonly used) > > Some examples: > > set foldmethod=syntax > setlocal formatoptions+=roq > setglobal completeopt-=preview I can see why we might want to track settings, it is often useful to see where a particular script is changing Vim options. This can also work for: let &foldmethod='syntax' let &l:foldmethod='syntax' let &g:foldmethod='syntax' > > syntax keyword phpFunction ... > syn match phpIdentifier ... > syn region phpRegion ... > sy cluster phpClTop ... > syntax clear phpMethods > > highlight String ... > hi clear Constant ... > hi link Number ... > hi! link Number ... > hi def link Function ... > HiLink Number ... These ones I am not certain of the value. If I open a syntax file, there are somethimes hundreds of these lines. This would merely identify a syn is there, but there is no real "name" associated with the item. So the tag isn't particularily meaningful. > > These are all pretty straightforward to find. > > Also, for dictionary functions would it make sense to mark > them twice, since they get a new 'name' if the dictionary is > copied to a new variable? For > example: > > let foo = { } > function! foo.func1() dict > endfunction > let bar = foo > > There is now a function called 'bar.func1()', so maybe func1 > should be tagged > as: > > Dictionary Functions > foo.bar /^function! foo.bar() dict/ > .bar /^function! foo.bar() dict/ I have fixed it to return: foo.func1 as a function tag. Let bar = foo, if made outside of a function tags "bar" as a variable. I will not attempt to figure out what time of variable it is. Seem my previous response to Tony. > I wouldn't mind if mappings could be tagged as well. I was thinking on this topic too. nnoremap yr :YRSearch nnoremap :YRShow >From maps I guess they have a name, in the above case it would be: yr So these could be "tagged". I know I often open my vimrc and try to find these mappings. > Is there or will there be any way to toggle options for the > way ctags scans vim files? You can override this yourself already using the taglist.vim plugin. 'a', "augroup", "autocommand groups" 'f', "function", "function definitions" 'v', "variable", "variable definitions" The current version of ctags tags the above, you can override this and only capture functions and variables if you like. I have added another: 'c', "command", "user-defined commands" And will consider adding more (like maps). These options can be turned on or off by default. Currently they are all on. To override it you provide additional information on the ctags command line. To do this via the taglist plugin you can do something like this in your vimrc: let g:tlist_vim_settings = 'vim;a:augroup;c:command;f:function;v:variable' Dave
Re: :tab does not open in new tab in some cases ?
Meino Christian Cramer wrote: :hi I did the following mappings: map :tab e ~/.vimrc_ map :tab e ~/.zshrc_ I start vim without any argument and press F12 . ${HOME}/.vimrc opens but does not create an entry in the tab pages line at the top of my Vim window -- so far so nice, since it is the first file loaded and showtabline == 1. Then I press Shift-F12 . ${HOME}/.zshrc appears. This is the second file, but still no tab pages line appears. Then I do :tab h :tab and TADA! the tab pages line apears, showing "~/.zshrc" and "tabpages.txt" With :tabn I can switch to ${HOME}/.zshrc. Now the tab pages line shows "~/.zshrc" and "tabpages.txt". This is at least a little confusing (at least?) to me. What is the logic of showing/not showing a tab pages line entry ? Thank you very much in advance for any help ! Keep hacking! mcc ":tab" only has an effect if the command following it on the same line tries to open a new window. It is in the same family as ":topleft", ":botright" and ":vertical". If the command doesn't try to open a new window (like your ":e" command), you won't get a new tab. IOW, replace ":tab e" by "tab split" in your mappings, and they will open a new tab. If you want to open a new tab only if the current buffer is not a [No Name] buffer, it is possible, but more complex, e.g.: :map :if (&bufname == '') && !&modified e ~/.vimrc wincmd _ else tab split ~/.vimrc endif (all on one line) Best regards, Tony.
Re: VimL and Exuberant tags - Suggestions please
hdrtag (available at http://mysite.verizon.net/astronaut/src) creates tags for *.vim files. Currently, it supports tags for syntax, match, region, c luster, keyword, function, command, and maps. Regards, Chip Campbell
RE: VimL and Exuberant tags - Suggestions please
On Fri, 13 Oct 2006 at 11:43am, David Fishburn wrote: > > > > -Original Message- > > From: Peter Hodge [mailto:[EMAIL PROTECTED] > > Sent: Thursday, October 12, 2006 11:24 PM > > To: David Fishburn; vim@vim.org > > Subject: Re: VimL and Exuberant tags - Suggestions please > > > > Hello David, > > > > Can I suggest support for these commands: > > > > :set/setlocal/setglobal > > :syntax > > :highlight (and maybe :HiLink because it is so commonly used) > > > > Some examples: > > > > set foldmethod=syntax > > setlocal formatoptions+=roq > > setglobal completeopt-=preview > > > I can see why we might want to track settings, it is often useful to see > where a particular script is changing Vim options. > > This can also work for: > let &foldmethod='syntax' > let &l:foldmethod='syntax' > let &g:foldmethod='syntax' As long as I can turn this off, I am ok with it, otherwise it will be too much clutter. > > > > syntax keyword phpFunction ... > > syn match phpIdentifier ... > > syn region phpRegion ... > > sy cluster phpClTop ... > > syntax clear phpMethods > > > > highlight String ... > > hi clear Constant ... > > hi link Number ... > > hi! link Number ... > > hi def link Function ... > > HiLink Number ... > > > These ones I am not certain of the value. > If I open a syntax file, there are somethimes hundreds of these lines. This > would merely identify a syn is there, but there is no real "name" associated > with the item. So the tag isn't particularily meaningful. I agree. Also, as a test case, please include all of the commands to repeat. If functions repeat, I think you should tag both (it can actually help catch programmatic error), but if variables repeat, you should tag only the first one, which is implicitly the declaration also. If there are non-local variables being set only in a function, it is technically a declaration for the variable, but I don't usually do this, and when I do it is a temporary thing, so I am OK not tagging it. I presume user-commands are already tagged? -- Thanks, Hari > > > > > > These are all pretty straightforward to find. > > > > Also, for dictionary functions would it make sense to mark > > them twice, since they get a new 'name' if the dictionary is > > copied to a new variable? For > > example: > > > > let foo = { } > > function! foo.func1() dict > > endfunction > > let bar = foo > > > > There is now a function called 'bar.func1()', so maybe func1 > > should be tagged > > as: > > > > Dictionary Functions > > foo.bar /^function! foo.bar() dict/ > > .bar /^function! foo.bar() dict/ > > > I have fixed it to return: > foo.func1 as a function tag. > > Let bar = foo, if made outside of a function tags "bar" as a variable. I > will not attempt to figure out what time of variable it is. Seem my > previous response to Tony. > > > > > I wouldn't mind if mappings could be tagged as well. > > I was thinking on this topic too. > > nnoremap yr :YRSearch > nnoremap :YRShow > > From maps I guess they have a name, in the above case it would be: > yr > > > So these could be "tagged". > I know I often open my vimrc and try to find these mappings. > > > > Is there or will there be any way to toggle options for the > > way ctags scans vim files? > > > You can override this yourself already using the taglist.vim plugin. > 'a', "augroup", "autocommand groups" > 'f', "function", "function definitions" > 'v', "variable", "variable definitions" > > The current version of ctags tags the above, you can override this and only > capture functions and variables if you like. > > I have added another: > 'c', "command", "user-defined commands" > > And will consider adding more (like maps). > These options can be turned on or off by default. Currently they are all > on. To override it you provide additional information on the ctags command > line. To do this via the taglist plugin you can do something like this in > your vimrc: > let g:tlist_vim_settings = 'vim;a:augroup;c:command;f:function;v:variable' > > > Dave > > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: VimL and Exuberant tags - Suggestions please
Am Freitag, 13. Oktober 2006 17:22 schrieben Sie: > function mydict.len() dict > let var_in_func = 2 > let s:script_var_in_func = 2 > return len(self.data) > endfunction This syntax is only suitable for what is called an Meta-Class or a Singelton-Pattern. It is not suitable for real OO programming. See: http://en.wikibooks.org/wiki/Learning_the_vi_editor/Vim#Object_orientated_programming As you can see the creation of a true class is a lot more complex and - more importantly - difficult to parse for ctags - at least when more then one class is defined inside a script file. Mind you Ada suffers a similar problem as Ada too allows for more then one class to be defined inside on package. Martin -- Martin Krischik mailto://[EMAIL PROTECTED] pgpnvgrZs4Uk3.pgp Description: PGP signature
netrw for new extension
Netrw comes with a few supported formats, and the format is deduced by the extension of the file, which is fair, but is there anyway to configure netrw such that it will recognize new extensions as one of the supported filetypes? E.g., there are several archives that are compatible/same as zip archives, except for extra metadata attached them. The jar, ear, war, and the Flex archives (forgot what the extension is), they are all zip archives, so I want netrw to treat them that way. -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Scanning messages in :messages
When you use ins-completion, Vim starts scanning all the buffers for matches, and this results in several messages, one for each of the buffer. I am wondering if these need to go into the :messages list. If you have several buffers loaded, one completion could potentially take all the existing messages out of the history resulting in any newly added messages right before the completion is started to be thrown away. Can we please have Vim skip them from being added to the :messages list? -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: netrw for new extension
Hari Krishna Dara wrote: Netrw comes with a few supported formats, and the format is deduced by the extension of the file, which is fair, but is there anyway to configure netrw such that it will recognize new extensions as one of the supported filetypes? E.g., there are several archives that are compatible/same as zip archives, except for extra metadata attached them. The jar, ear, war, and the Flex archives (forgot what the extension is), they are all zip archives, so I want netrw to treat them that way. Are you talking about using netrw's map for the x key? If so, look for :help netrw_filehandler for a discussion about how to write your own. Regards, Chip Campbell
Re: netrw for new extension
Hari Krishna Dara wrote: Netrw comes with a few supported formats, and the format is deduced by the extension of the file, which is fair, but is there anyway to configure netrw such that it will recognize new extensions as one of the supported filetypes? E.g., there are several archives that are compatible/same as zip archives, except for extra metadata attached them. The jar, ear, war, and the Flex archives (forgot what the extension is), they are all zip archives, so I want netrw to treat them that way. If, on the other hand, you're not really talking about netrw, but about the zip plugin -- presumably just include in your <.vimrc> a line such as: au BufReadCmd *.jar,*.ear,*.warcall zip#Browse(expand("")) Regards, Chip Campbell
Re: Scanning messages in :messages
Hari Krishna Dara wrote: > When you use ins-completion, Vim starts scanning all the buffers for > matches, and this results in several messages, one for each of the > buffer. I am wondering if these need to go into the :messages list. If > you have several buffers loaded, one completion could potentially take > all the existing messages out of the history resulting in any newly > added messages right before the completion is started to be thrown away. > Can we please have Vim skip them from being added to the :messages list? Let's call this a bug. -- A day without sunshine is like, well, night. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: netrw for new extension
On Fri, 13 Oct 2006 at 3:16pm, Charles E Campbell Jr wrote: > Hari Krishna Dara wrote: > > >Netrw comes with a few supported formats, and the format is deduced by > >the extension of the file, which is fair, but is there anyway to > >configure netrw such that it will recognize new extensions as one of the > >supported filetypes? E.g., there are several archives that are > >compatible/same as zip archives, except for extra metadata attached > >them. The jar, ear, war, and the Flex archives (forgot what the > >extension is), they are all zip archives, so I want netrw to treat them > >that way. > > > > > > > If, on the other hand, you're not really talking about netrw, but about > the zip plugin -- presumably > just include in your <.vimrc> a line such as: > > au BufReadCmd *.jar,*.ear,*.warcall > zip#Browse(expand("")) > > Regards, > Chip Campbell Right, I somehow thought netrw is the one doing that. Thanks for the information on how to do this with the zip plugin. -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
ANN: VST 1.2 "Friday 13th"
Hello, Hello, VST is script which makes possible to export text files with simple markup to HTML, LaTeX or HTML S5 presentation format to create even complex documents. Script doesn't require any external dependency and will work on any platform Vim7 is available. VST is Vim only implementation of reStructuredText. Latest version of script files and documentation in text form: http://skawina.eu.org/mikolaj/vst.zip ChangeLog ' - ADD: o auxiliary mapping for ornaments - ADD: section numbers in fold auxiliary command - ADD: section numbers in toc auxiliary command - ADD: [LaTeX] raw directive accepts tex, not only latex argument - CHG: don't look for including commands in auxiliary commands - massive speed gains - CHG: [LaTeX] change default font size for 12pt - FIX: [HTML] all styles from multiple 2html directives are in - FIX: [HTML] @ in 2html directive was breaking syntax highlighting - FIX: [HTML] restore validity of generated documents - FIX: [LaTeX] bug with _ in filenames in raw latex file option - FIX: many minor bugs List of changes with working links to documentation: http://skawina.eu.org/mikolaj/vst.html#lchangelog Supported elements of inline markup (among others): - emphasised text (italic) - strongly emphasised text (bold) - hyperlinks (in various syntax forms) - custom decorations (among them: sub, sup, big, small) Elements of documents structure: - paragraphs - block quotes - ordered lists - unordered lists - option lists - footnotes - citations - images - preformatted text - colorized preformatted text (HTML export only) - tables - admonitions - table of contents Also bunch of auxiliary commands which should ease writing of document and navigating (folding, text table of contents, lists or declared links, replacements) Latest version of script files and documentation in text form: http://skawina.eu.org/mikolaj/vst.zip To install, place archive in ~/.vim directory and unpack it there. Following versions of help file was produced without any modifications to HTML or LaTeX source: HTML: http://skawina.eu.org/mikolaj/vst.html LaTeX file exported from vst.txt: http://skawina.eu.org/mikolaj/vst.tex PDF file produced from vst.tex: http://skawina.eu.org/mikolaj/vst.pdf m.
VIM as C++ IDE
Hi, Currently, I use F12 to map to make command. However, the cursor will jump to the file which contains the first error or the first warning. It will leave the current file that I'm editing if it is different from the file contain the errors or warnings. Another drawback, is that the error message window should be gone before I can do any editing in the source files. map :w:make The plugin c.vim : C/C++-IDE http://vim.sourceforge.net/scripts/script.php?script_id=213 seems very interesting. It is building "save and compile" command can preserve the error window just like any other IDE (eclipse, visual-studio). However, it can only compile single. My project is rather complex and it is compiled by the make command. Can some body provide some script to satisfy my more general requirement? I want press , then make is called. The error window will not be closed unless I do so. When I brower the error, the file where the error is from will be open automatically and the cursor is put in the error line? Thanks, Peng
java indentation bug?
In the below code, I find that the curly-brace for the method is indented incorrectly. The first line in the method is also indented incorrectly. I verified this with gvim starting with -u NONE option and with :filetype on and :filetype indent on. public class A { public static void main(String[] args) throws Something { int i = 0; } } This seems like a bug in the Java indent plugin. -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: VimL and Exuberant tags - Suggestions please
On Fri, 13 Oct 2006 at 7:29pm, Martin Krischik wrote: > Am Freitag, 13. Oktober 2006 17:22 schrieben Sie: > > > function mydict.len() dict > > let var_in_func = 2 > > let s:script_var_in_func = 2 > > return len(self.data) > > endfunction > > This syntax is only suitable for what is called an Meta-Class or a > Singelton-Pattern. It is not suitable for real OO programming. See: > > http://en.wikibooks.org/wiki/Learning_the_vi_editor/Vim#Object_orientated_programming > > As you can see the creation of a true class is a lot more complex and - more > importantly - difficult to parse for ctags - at least when more then one > class is defined inside a script file. Mind you Ada suffers a similar problem > as Ada too allows for more then one class to be defined inside on package. > > Martin An alternative approach to what was suggested (assembling an instance), is to use it like a template or prototype-based language. I have been using this approach to create a factories like this: let plug#factory = {...} function! plug#factory.getX() function! plug#factory.doY() function! plug#factory.new() let newobj = deepcopy(self) unlockvar! newobj return newobj endfunction lockvar! plug#factory The usage is as follows, which is very close to OO programing. Of course, you can't do inheritance, but you can solve some problems by delegation. Polymorphism and inheritance can also be achieved by doing some manual assembly new(), but this will be an unnecessary overhead for most problems that we will try to solve in Vim. let obj = g:plug#factory.new() call obj.doY() The factory object is locked once all the dictionary functions are defined. This avoids accidentally modifying the factory instance instead of the newly created ones. The newly created object will have all the members of the original including any fields (non-Funcref keys) and member functions (numbered or Funcref keys). -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: VimL and Exuberant tags - Suggestions please
Am Freitag, 13. Oktober 2006 02:16 schrieb David Fishburn: > I have taken over maintenance of the VimL exuberant tags component. Just VimL or the hole of ctags? The ctags Patch list list [1] not been worked on for ages. Parsers for Ada, Ruby, PHP, Haskel are "Open" and waiting for integration for ever. > For the vim plugin writers, are there any outstanding bugs or new feature > requests you have for ctags.exe? Well my which would be: Integrate my patch [2]. Martin [1] http://sourceforge.net/tracker/?group_id=6556&atid=306556 [2] http://sourceforge.net/tracker/index.php?func=detail&aid=1525305&group_id=6556&atid=306556 -- Martin Krischik mailto://[EMAIL PROTECTED] pgpby9TL4BOKT.pgp Description: PGP signature
Re: VimL and Exuberant tags - Suggestions please
On 10/13/06, Martin Krischik <[EMAIL PROTECTED]> wrote: The ctags Patch list list [1] not been worked on for ages. I wonder why no one has taken over development/forked this project yet. It seems obvious that the current maintainer has given up interest. nikolai
Re: VimL and Exuberant tags - Suggestions please
On 10/13/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote: On 10/13/06, Martin Krischik <[EMAIL PROTECTED]> wrote: > The ctags Patch list list [1] not been worked on for ages. I wonder why no one has taken over development/forked this project yet. It seems obvious that the current maintainer has given up interest. Hm, I take that back. It seems like development hasn't stopped completely, as the last update was done in May, 2006. It was mentioned earlier on this list that the lead developer had stopped working on exuberant-ctags. Maybe he's back? nikolai
RE: VimL and Exuberant tags - Suggestions please
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nikolai Weibull > Sent: Friday, October 13, 2006 2:48 PM > To: Martin Krischik > Cc: vim-dev; vim@vim.org > Subject: Re: VimL and Exuberant tags - Suggestions please > > On 10/13/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote: > > On 10/13/06, Martin Krischik <[EMAIL PROTECTED]> wrote: > > > > > The ctags Patch list list [1] not been worked on for ages. > > > > I wonder why no one has taken over development/forked this project > > yet. It seems obvious that the current maintainer has given up > > interest. > > Hm, I take that back. It seems like development hasn't > stopped completely, as the last update was done in May, 2006. > It was mentioned earlier on this list that the lead > developer had stopped working on exuberant-ctags. Maybe he's back? Darren was dealing with some life problems which prevented him from continuing with the development. When the idea of forking the project popped up, he was completely against it. So he called for maintainers and we are just now moving forward with volunteers to get things moving again. At least now there are many contributors instead of just Darren and patches submitted by the field. As mentioned, I have taken over the maintenance of the Vim piece of ctags. Dave
Re: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)
Hi Benji, On 10/12/06, Benji Fisher <[EMAIL PROTECTED]> wrote: On Sat, Oct 07, 2006 at 12:37:33AM +0800, Yongwei Wu wrote: > This is a report of what I have already achieved. If you are dealing > with more encodings than the fileencodings option can handle, esp. if > you read and write Simplified and Traditional Chinese, please read on. I write English almost exclusively, so this is not something I will use. If this is useful for others (and I expect it will be) then I suggest posting it as a script at http://www.vim.org/scripts/index.php . In the description, you can post a link (as snipped below) to tellenc. Perhaps you can package your vim functions as a plugin so that they can be used without adding anything to the vimrc file. :help write-plugin HTH --Benji Fisher I thought of doing this, but this seems far too personal. My script works best on Simplified Chinese locale, with the ability to tell between utf-8, gb2312/gbk, big5, and latin1. Some small tweaks are probably needed when the environment or requirements are different. So maybe it is more suitable to be a tip. If it is only in the mailing list, it can quickly get lost. So I will consider your suggestion and try to do something. -- Wu Yongwei URL: http://wyw.dcweb.cn/
Why cabbrev rather than cmap?
In another thread, Yakov Lerner wrote: > 4) You can use tip http://www.vim.org/tips/tip.php?tip_id=1285 > to remap :w to :up : > > cabbrev w =(getcmdtype()==':' && getcmdpos()==1 ? 'up' : 'w') Why cabbrev rather than cmap? --Suresh
Re: Auto-guessing file encoding and integration with Vim (works for Latin1, GBK, and Big5 now)
Yongwei Wu wrote: Hi Benji, On 10/12/06, Benji Fisher <[EMAIL PROTECTED]> wrote: On Sat, Oct 07, 2006 at 12:37:33AM +0800, Yongwei Wu wrote: > This is a report of what I have already achieved. If you are dealing > with more encodings than the fileencodings option can handle, esp. if > you read and write Simplified and Traditional Chinese, please read on. I write English almost exclusively, so this is not something I will use. If this is useful for others (and I expect it will be) then I suggest posting it as a script at http://www.vim.org/scripts/index.php . In the description, you can post a link (as snipped below) to tellenc. Perhaps you can package your vim functions as a plugin so that they can be used without adding anything to the vimrc file. :help write-plugin HTH --Benji Fisher I thought of doing this, but this seems far too personal. My script works best on Simplified Chinese locale, with the ability to tell between utf-8, gb2312/gbk, big5, and latin1. Some small tweaks are probably needed when the environment or requirements are different. So maybe it is more suitable to be a tip. If it is only in the mailing list, it can quickly get lost. So I will consider your suggestion and try to do something. I suspect you are not the only person using Vim to edit Simplified Chinese; furthermore, I suspect that your script might be useful, if only as a source of inspiration, to someone wishing to discriminate between the various encodings used for the other CJK languages, viz. Traditional Chinese, Japanese and Korean. IMHO it would be better as a script than as a tip because it is easier to upload new versions of a script. Or maybe a script to "do the job" and a tip explaining to Vim users, in pain language, what to look for when trying to guess the encoding for CJK text files. Best regards, Tony.
Re: Why cabbrev rather than cmap?
Suresh Govindachar wrote: In another thread, Yakov Lerner wrote: 4) You can use tip http://www.vim.org/tips/tip.php?tip_id=1285 to remap :w to :up : cabbrev w =(getcmdtype()==':' && getcmdpos()==1 ? 'up' : 'w') Why cabbrev rather than cmap? --Suresh For one thing, a cabbrev will wait for an end-of-word signal: if you try to type :wa, :wq, :wincmd, :winpos, :windo, :while, etc., a "cmap w" will react as soon as you type the w while a "cabbrev w" will not react at all. Best regards, Tony.
Generic tree control plugin for Vim
Hi all, I have developed a generic Vim tree control (non-GUI) plugin. This control can be used by other Vim plugins to display information in a tree control. The tree control is similar to the one used by the taglist plugin. The tree control will work only in Vim version 7.0 and above. The tree control plugin is available at: http://www.geocities.com/yegappan/treectrl/treectrl.zip Unzip the contents of this file into the ~/.vim or the vimfiles directory. The documentation for the tree control is at: http://www.geocities.com/yegappan/treectrl/treectrl.html As a demo, I have developed a file explorer plugin using the tree control. This is also included in the above zip file. The zip file contains the following files: autoload/treectrl.vim - Tree control doc/treectrl.txt - Tree control documentation plugin/filetree.vim - Demo file explorer using the tree control Let me know if you have any suggestions or comments about the tree control. - Yegappan
Version confusion
Hi, For the real vim junkie there are several sources for the "real stuff" ( == newest versions of vim/scripts/plugins et cetera available). I myself use to update my vim source with the newest patches and download the runtime files on a regular base. Furthermore I download the newest CVS stuff from vim-ruby, the ruby support files for vim. The vim-ruby files go into ~/.vim/ The runtime files go into /usr/share/vim/vim70 (== $VIMRUNTIME) The result of the compilation of the sources go also to $VIMRUNTIME (and non-scripts to other places). I recognized, that some files are doubled: Older version of the vim-ruby support files go also to $VIMRUNTIM. Furthermore: Newly installed vimruntimefiles will be overridden with older ones from the compilation results of the vim sources (when a new patch is available...). As it seems with this practice of trying to have always the newest vim stuff on my hd I will shoot into my own feet... If vim recognized a script file which it has already loaded from another place, will it be loaded ? Has vim an automatism to load the script with the highest versioning? How can I simplify the update of my whole vim environment without the need to look into each single file whether it is newer/older as another file of the same name at another place and what version of this file will work with what version of another file of the same suit at shat place? Keep hacking! mcc
Re: Version confusion
Meino Christian Cramer wrote: Hi, For the real vim junkie there are several sources for the "real stuff" ( == newest versions of vim/scripts/plugins et cetera available). I myself use to update my vim source with the newest patches and download the runtime files on a regular base. Furthermore I download the newest CVS stuff from vim-ruby, the ruby support files for vim. The vim-ruby files go into ~/.vim/ The runtime files go into /usr/share/vim/vim70 (== $VIMRUNTIME) The result of the compilation of the sources go also to $VIMRUNTIME (and non-scripts to other places). I recognized, that some files are doubled: Older version of the vim-ruby support files go also to $VIMRUNTIM. Furthermore: Newly installed vimruntimefiles will be overridden with older ones from the compilation results of the vim sources (when a new patch is available...). As it seems with this practice of trying to have always the newest vim stuff on my hd I will shoot into my own feet... If vim recognized a script file which it has already loaded from another place, will it be loaded ? Has vim an automatism to load the script with the highest versioning? How can I simplify the update of my whole vim environment without the need to look into each single file whether it is newer/older as another file of the same name at another place and what version of this file will work with what version of another file of the same suit at shat place? Keep hacking! mcc Vim has no knowledge of script versions. When using the ":runtime!" command or in most cases of auto-loading, Vim loads all scripts by a given name and/or in a given subdirectory in all directories listed in the 'runtimepath' option. Most full-fledged scripts have an "if" clause at the start, with a ":finish" command, to avoid running them twice. This means that the first one loaded will win. OTOH, "small tweak" scripts don't have that, so the last one loaded will win. 'runtimepath' normally lists the following directories, in the following order: 1. ~/.vim/ (on Unix) or ~/vimfiles (on Windows) for full-fledged scripts applicable to one user only. 2. $VIM/vimfiles/ (on all platforms) for system-wide full-fledged scripts not distributed with Vim 3. $VIMRUNTIME/ for scripts distributed with Vim. Any upgrade may silently add, remove or change anything in this tree; on Unix, "make install" or "make installruntime" _will_ silently replace everything here with scripts from vim70/runtime/ in your "build" directory tree (which were downloaded with the sources). 4. $VIM/vimfiles/after/ for small system-wide tweaks to any of the above 5. ~/.vim/after/ or ~/vimfiles/after/ for small single-user tweaks to any of the above. On Windows, the binaries are usually installed in $VIMRUNTIME; on Unix, they are installed in some nearby directory already in the $PATH. Typical values: $VIM: (Unix) /usr/local/share/vim/ ; (Windows) C:\Program Files\Vim $VIMRUNTIME: (version 7.0) $VIM/vim70 executables: (Unix) /usr/local/bin/ ; (Windows) same as $VIMRUNTIME. This means that "user" scripts (in 1 and 5) may override all others, and "system-wide" scripts (in 2 and 4) may override those distributed with Vim (in 3). AFAIK, the only reliable way to always use the newest version is to manually check the datestamps (in directory listings and/or near the top of the file text) of any duplicated files. Note that depending on how you upgrade your sources, the timestamp shown in a directory listing can be either the date-time when the files were updated by their authors, or the date-time when you downloaded them. Best regards, Tony.