Re: more on local additions in help.txt -- debian bug?
On Wed, Aug 16, 2006 at 03:33:42PM -0400, Gabriel Farrell wrote: Aha. Benji's explanation is correct. My $VIM points at /usr/share/vim/addons/ which contains doc/matchit.txt, doc/tags, and plugin/matchit.vim. This is the default for the Debian installation. The screwy thing is that unless I copy matchit.vim into $HOME/.vim/plugin/, matchit isn't installed, and I can't see any help for it because, as you surmised, :helptags hasn't been run on /usr/share/vim/addons/doc/ -- the tags file in that directory is empty. I'm not sure if this is a bug in vim or the debian package; I think mostly the package. gabe I think you are right that the package only partially installs the plugin. Just to be clear, there are three related things; I will use rtp to denote a path that is in the 'runtimepath' option. (1) A line appears under :help local-additions if rtp/doc/matchit.txt exists. (2) A tags file for dir/matchit.txt is created if you run :helptags dir and :help will find those tags if dir is in 'runtimepath'. (3) The plugin will be effective if rtp/plugin/matchit.vim exists. This particular plugin also relies on rtp/ftplugin/*.vim to set buffer-local variables that control its behavior. HTH --Benji Fisher
Re: more on local additions in help.txt -- debian bug?
On Thu, Aug 17, 2006 at 08:33:23AM -0400, Benji Fisher wrote: On Wed, Aug 16, 2006 at 03:33:42PM -0400, Gabriel Farrell wrote: Aha. Benji's explanation is correct. My $VIM points at /usr/share/vim/addons/ which contains doc/matchit.txt, doc/tags, and plugin/matchit.vim. This is the default for the Debian installation. The screwy thing is that unless I copy matchit.vim into $HOME/.vim/plugin/, matchit isn't installed, and I can't see any help for it because, as you surmised, :helptags hasn't been run on /usr/share/vim/addons/doc/ -- the tags file in that directory is empty. I'm not sure if this is a bug in vim or the debian package; I think mostly the package. gabe I think you are right that the package only partially installs the plugin. Just to be clear, there are three related things; I will use rtp to denote a path that is in the 'runtimepath' option. (1) A line appears under :help local-additions if rtp/doc/matchit.txt exists. Yes. Maybe it should only appear once :helptags has been run? Is that possible? (2) A tags file for dir/matchit.txt is created if you run :helptags dir and :help will find those tags if dir is in 'runtimepath'. Yes. (3) The plugin will be effective if rtp/plugin/matchit.vim exists. I wasn't sure about this one, but after some tests I see it's also true. This particular plugin also relies on rtp/ftplugin/*.vim to set buffer-local variables that control its behavior. Yes. Thank you for the clarification. gabe
Re: conceal-patch status
On 8/17/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Vince Negri wrote: I'm still alive, just very busy :-) New home for conceal patches is: http://vince.negri.googlepages.com/ [...] OK. I've updated my W32 and Unix HowTo (compile Vim) pages to mention this, and while I was at it, I've mentioned Steve Hall's W32 download page on my main vim page http://users.skynet.be/antoine.mechelynck/vim/ I put the link to the 'conceal' patch into vimtip: http://www.vim.org/tips/tip.php?tip_id=1308 so that people who look for conceal patch on the vim.org can find the updated link. Yakov
gVim bug: Window stretched across 2 desktops gets resized on split
I often stretch a gVim window across two monitors, putting the vertical split in between the two monitors so that I can quickly switch between them and edit in both monitors. However, if I size the window then vertical split it, the window will resize itself to one desktop. I suspect that gVim is using the wrong function to get the size of the desktop, but I haven't investigated it myself. In summary, To reproduce: 1. Open a gVim window in Windows on a dual-monitor machine 2. Stretch it across both monitors (Not maximized, just stretched across both desktops) 3. Type C-w v to create a vertical split Expected: Vim should split the window without moving it Actual: Vim splits the window and resizes it to the left monitor. Email me back and let me know if I can be of any help, thanks for the great program! -- Paul Betts [EMAIL PROTECTED]
Re: gVim bug: Window stretched across 2 desktops gets resized on split
Paul Betts wrote: I often stretch a gVim window across two monitors, putting the vertical split in between the two monitors so that I can quickly switch between them and edit in both monitors. However, if I size the window then vertical split it, the window will resize itself to one desktop. I suspect that gVim is using the wrong function to get the size of the desktop, but I haven't investigated it myself. In summary, To reproduce: 1. Open a gVim window in Windows on a dual-monitor machine 2. Stretch it across both monitors (Not maximized, just stretched across both desktops) 3. Type C-w v to create a vertical split Expected: Vim should split the window without moving it Actual: Vim splits the window and resizes it to the left monitor. Email me back and let me know if I can be of any help, thanks for the great program! What kind of system are you on? You can probably work around the problem with: :set guioptions+=lr A real solution would be better though. I don't have such a system to try it out on. -- Hit any key to continue is very confusing when you have two keyboards. /// 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: gVim bug: Window stretched across 2 desktops gets resized on split
I'm on Windows Vista Beta 2, but this happens on XP / 2003 / what-have-you. Setting that GUI flag fixes it though; thanks for your help! -- Paul Betts [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 2:00 PM To: Paul Betts Cc: vim-dev@vim.org Subject: Re: gVim bug: Window stretched across 2 desktops gets resized on split Paul Betts wrote: I often stretch a gVim window across two monitors, putting the vertical split in between the two monitors so that I can quickly switch between them and edit in both monitors. However, if I size the window then vertical split it, the window will resize itself to one desktop. I suspect that gVim is using the wrong function to get the size of the desktop, but I haven't investigated it myself. In summary, To reproduce: 1. Open a gVim window in Windows on a dual-monitor machine 2. Stretch it across both monitors (Not maximized, just stretched across both desktops) 3. Type C-w v to create a vertical split Expected: Vim should split the window without moving it Actual: Vim splits the window and resizes it to the left monitor. Email me back and let me know if I can be of any help, thanks for the great program! What kind of system are you on? You can probably work around the problem with: :set guioptions+=lr A real solution would be better though. I don't have such a system to try it out on. -- Hit any key to continue is very confusing when you have two keyboards. /// 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: using filereadable function
Jürgen Krämer wrote: Hi, SHANKAR R-R66203 wrote: I am trying to use the filereadable function. My code looks like given below (This code is part of a function) - if (!filereadable(a:dataFile) ^ ^ remove the quotes. let @/ = rs_searchString keepjumps exec rs_ori_lineNum echohl Todo echomsg a:dataFile Cannot open file for reading echohl NONE return endif a:dataFile is the argument passed to the function, while calling the function. This does not seem to work. Eventhough the file is present, the function reports, the file is not present. Regards, Jürgen Also, if your function wants to refer to variables defined outside the function, the variable's name should be prefixed by g: (for a global variable) or s: (for a script-local variable), otherwise a function-local variable will be assumed -- and you will get Error: Undefined variable rs_searchString and/or Error: Invalid expression. Outside of any function, a variable name with no prefix refers to a global variable. Best regards, Tony.
cross-platform mappings
Hi, I'm trying to expand my use of GVIM also to Linux . And I see that my mappings with CTRL and/or ALT and/or ARROW keys are handled differently on because of the linux windows manager. Does somebody knows which keys or key-combinations to avoid to create mappings that work on WXP and Linux? Should you never use ALT and/or CTRL in cross-platform mappings? For example: How should I remap noremap C-Left b inoremap c-\c-n C-left noremap C-Right w inoremap c-\c-n C-Right ALT - to make from current pos till begin-of-line everything lower case To keep the cursor position it's prepend with mz (mark pos with z) and append with `z (go to mark z) (notice the backtick `[located under the ESC-key] is used, not a single quote sign ') noremap M-Left mzgu0`z inoremap c-\c-n M-left ALT - to make from current pos till eol everything lower case noremap M-Right mzgu$`z inoremap c-\c-n M-Right ALT-SHIFT - to make from current pos till bol everything upper case noremap M-S-Left mzgU0`z inoremap c-\c-n M-S-left ALT-SHIFT - to make from current pos till eol everything upper case noremap M-S-Right mzgU$`z inoremap c-\c-n M-S-Right Best regards, Eric _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: cross-platform mappings
Eric Leenman wrote: Hi, I'm trying to expand my use of GVIM also to Linux . And I see that my mappings with CTRL and/or ALT and/or ARROW keys are handled differently on because of the linux windows manager. Does somebody knows which keys or key-combinations to avoid to create mappings that work on WXP and Linux? Should you never use ALT and/or CTRL in cross-platform mappings? For example: How should I remap [...] I think the safest keys to use are F2-F9, F11-F12, and Shift-F1 to Shift-F12 (that's 22 possibilities). (Yes, there used to be keyboards without F11-F12 but it's been decades since I've seen one.) F1 is of course Help, and F10 is the Menu key on some systems. Alt- appears as Esc in some terminals; and many Alt-Fn and Ctrl-Fn combinations are preempted by some window managers such as KDE's kwm (even with :set winaltkeys=no) so that they are never seen by gvim but produce some other action such as switch to virtual desktop 4 (Ctrl-F4) or Run command or open URL (Alt-F2). Printable keys and their Ctrl- variations are mostly already in use by Vim itself; and Alt+ printable key, when it isn't seen as Esc + something, can also be confused with the key for some printable character in the range 128-255 (accented letters etc.) Now _which_ particular shortcut you assign to which particular function remains of course your own choice; and if 22 mappings aren't enough, you can also use one (or more) of them as a prefix for an unlimited number of additional multikey mappings (where all keys except the first can be anything, even letters and digits). Best regards, Tony.
Re: _viminfo on walkabout
On 8/17/06, o1792 [EMAIL PROTECTED] wrote: Hi, I'm using vim7 for win32, but actually I've had the following prob with vim6.3. The prob is that _viminfo goes on walkabout when I'm connected to my corp's network. It thinks it should be stored in a networked drive, which is read-only, so I get errors. Probably isn't a vim problem, but may be my win32 which is telling the interface vim4win32 uses that _viminfo should lose itself in a networked drive. When I use the pc standalone, this problem does not occur. Has anybody had similar problems and sorted it out? Advice welcome. Thanks in advance. Just one thought, try typing set HOME in a Command Prompt to check the values of the environment variables HOME, HOMEDRIVE, and HOMEPATH. -- Wu Yongwei URL: http://wyw.dcweb.cn/
Re: _viminfo on walkabout
Yongwei Wu wrote: On 8/17/06, o1792 [EMAIL PROTECTED] wrote: Hi, I'm using vim7 for win32, but actually I've had the following prob with vim6.3. The prob is that _viminfo goes on walkabout when I'm connected to my corp's network. It thinks it should be stored in a networked drive, which is read-only, so I get errors. Probably isn't a vim problem, but may be my win32 which is telling the interface vim4win32 uses that _viminfo should lose itself in a networked drive. When I use the pc standalone, this problem does not occur. Has anybody had similar problems and sorted it out? Advice welcome. Thanks in advance. Just one thought, try typing set HOME in a Command Prompt to check the values of the environment variables HOME, HOMEDRIVE, and HOMEPATH. Also, you can tell Vim to put the viminfo at any place of your choice by using the n suboption to 'viminfo'. Beware: that suboption must be _last_ in 'viminfo. Example, to write the viminfo in the root directory of the filesystem: if has(viminfo) if has(unix) set viminfo='50,1000,s100,:0,n/.viminfo else Windows set viminfo='50,1000,s100,:0,nC:\\_viminfo endif endif Best regards, Tony.
[EMAIL PROTECTED]: failure notice]
When I send e-mail using my mail hosting company as my SMTP host, it gets bounced by the list. I'm using a different SMTP host now, which is why I can send this message to the list. The problem is that I don't have the option of using an alternate SMTP host most of the day, so it would be really nice if I could use my mail hosting company (Zettai.net'). The error message below says that my mail hosting company's mail servers are blocked by Sorbs. I forwarded this on to their tech support, and they said that Sorbs forces you to pay to get your name removed from their black list, which my mail hosting company believes is unethical. Is there anything that can be done by someone on this list to re-allow e-mail from my mail hosting company? Any help at all would be greatly appreciated! Tom Purl - Forwarded message from [EMAIL PROTECTED] - X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on theta.zettai.net X-Spam-Report: * 1.0 NO_REAL_NAME From: does not include a real name * -0.0 NO_RELAYS Informational: message was not relayed via SMTP * 2.0 BIZ_TLD URI: Contains an URL in the BIZ top-level domain * -1.1 BAYES_05 BODY: Bayesian spam probability is 1 to 5% * [score: 0.0206] * 3.4 AWL AWL: From: address is in the auto white-list X-Spam-Status: Yes, score=5.2 required=5.0 tests=AWL,BAYES_05,BIZ_TLD, NO_REAL_NAME,NO_RELAYS autolearn=no version=3.1.0 X-Spam-Level: * From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: failure notice Hi. This is the qmail-send program at a.mx.zettai.net. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. vim@vim.org: 217.73.17.21 does not like recipient. Remote host said: 554 5.7.1 Service unavailable; Client host [205.234.172.66] blocked using dnsbl.sorbs.net; Spam Received See: http://www.sorbs.net/lookup.shtml?205.234.172.66 Giving up on 217.73.17.21. --- Below this line is a copy of the message. Return-Path: [EMAIL PROTECTED] Received: (qmail 20923 invoked by uid 80); 16 Aug 2006 16:00:02 - Received: from 159.53.46.143 (SquirrelMail authenticated user [EMAIL PROTECTED]) by mail.zoper.com with HTTP; Wed, 16 Aug 2006 11:00:01 -0500 (CDT) Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wed, 16 Aug 2006 11:00:01 -0500 (CDT) Subject: Re: netrw Uses Single Quotes On Windows From: Tom Purl [EMAIL PROTECTED] To: Charles E Campbell Jr [EMAIL PROTECTED] Cc: vim@vim.org User-Agent: SquirrelMail/1.4.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Oh duh. Thanks for the help! Tom Purl wrote: I'm trying to use the netrw plugin with Vim 7 on Windows to edit files using the scp protocol. My scp client of choice is pscp. ..snip.. Please use a more up-to-date version of netrw. There's one on vim.sf.net, and there's an even more up-to-date one at my website. http://vim.sourceforge.net/scripts/script.php?script_id=1075 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs , see Network Oriented Reading, Writing, and Browsing. Regards, Chip Campbell - End forwarded message -
Re[2]: windows unicode (iso10646-1) font for vim
On Mon, 31 Jul 2006, (BST) Georg Dahn apparently wrote: I personally need Latin only and use Consolas: http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3displaylang=en which (IMHO) is a great font. This package is only intended for licensed users of Microsoft Visual Studio 2005. I'm not sure what that means here ... (intended for vs. licensed to?) Cheers, Alan Isaac
comments in vimrc
I'm in the process of updating from vim 6.3 to vim 7.0 and am having trouble getting comments to work to support Doxygen. I add the following line to my vimrc file (~/.vimrc): set comments=s1:/*!,mb:\ ,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* When I run vim and :set comments, though, I see the following: comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,:// Some change in vim 7.0 results in changing the comments line. In the documentation there is a hint about some file-specific comments but the standard method of setting file specific options doesn't help either: autocmd BufNewFile *.cc set comments=s1:/*!,mb:\,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* Anyone have any idea how I can get my comment options to work correctly again? Or some documentation that I can read about how vim 7 changed this feature? Thanks, Uri
Re: [EMAIL PROTECTED]: failure notice]
Tom Purl wrote: When I send e-mail using my mail hosting company as my SMTP host, it gets bounced by the list. I'm using a different SMTP host now, which is why I can send this message to the list. The problem is that I don't have the option of using an alternate SMTP host most of the day, so it would be really nice if I could use my mail hosting company (Zettai.net'). The error message below says that my mail hosting company's mail servers are blocked by Sorbs. I forwarded this on to their tech support, and they said that Sorbs forces you to pay to get your name removed from their black list, which my mail hosting company believes is unethical. Paying money to be removed from a blacklist? If this is correct then this blacklist system must immediately be removed from spam checkers. It's like blackmail. I actually think this would be illegal. Is there anything that can be done by someone on this list to re-allow e-mail from my mail hosting company? Any help at all would be greatly appreciated! I'll ask someone to look into this. -- hundred-and-one symptoms of being an internet addict: 169. You hire a housekeeper for your home page. /// 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: [EMAIL PROTECTED]: failure notice]
On Thu, Aug 17, 2006 at 11:00:01PM +0200, Bram Moolenaar wrote: Paying money to be removed from a blacklist? If this is correct then this blacklist system must immediately be removed from spam checkers. It's like blackmail. I actually think this would be illegal. Here's the offcial response from my mail hosting service: * http://www.zettai.net/Weblog/sorbs Thanks a ton for the help! Tom Purl
Re: comments in vimrc
On 2006-08-17, Uri Moszkowicz [EMAIL PROTECTED] wrote: I'm in the process of updating from vim 6.3 to vim 7.0 and am having trouble getting comments to work to support Doxygen. I add the following line to my vimrc file (~/.vimrc): set comments=s1:/*!,mb:\ ,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* When I run vim and :set comments, though, I see the following: comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,:// Some change in vim 7.0 results in changing the comments line. In the documentation there is a hint about some file-specific comments but the standard method of setting file specific options doesn't help either: autocmd BufNewFile *.cc set comments=s1:/*!,mb:\,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* Anyone have any idea how I can get my comment options to work correctly again? Or some documentation that I can read about how vim 7 changed this feature? As far as I know, vim 7 did not change that feature. I only went back as far as vim 6.4, but the behavior I tested was the same in both 6.4 and 7. I can think of two reasons you're having this problem. The first is that you put the autocommand before the filetype plugin on in your .vimrc. Any BufNewFile or BufRead autocommands in your .vimrc need to be after any filetype [...] on commands or else their settings will be overridden by any setting of the same options in the filetype plugins. The second is that when I execute your set comments command, I get the following error: E525: Zero length string: comments=s1:/*!,mb:\,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* When that command is executed in an autocommand, it comes and goes pretty quickly, so if that's the problem, you may not have seen the message. After opening a new .cc file, you can execute :message to see if that's what happened. I didn't look closely at your 'comments' setting, but the backslash immediately followed by the comma looked suspicious, so I inserted a space there, set comments=s1:/*!,mb:\ ,ex:*/,f://!,://,b:#,:%,:XCOMM,n:,fb:-,s1:/*,mb:*,ex:* and the command executed without error. One more thing: When you're testing this, you can execute :verbose set comments? to see where the 'comments' option was last set. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
use '/' to find both upper and lower case instances
Hi. I have a need to use '/' to find something in a file, but I wish it to ignore case. So say I'm looking for 'foo' then I want to find all instances for 'foo' and 'FOO' Thanks. Kind regards. Luke
Re: use '/' to find both upper and lower case instances
Hi Luke. 18Aug2006 @ 10:14 Luke Vanderfluit thusly spake Hi. I have a need to use '/' to find something in a file, but I wish it to ignore case. So say I'm looking for 'foo' then I want to find all instances for 'foo' and 'FOO' :set ignorecase then do your usual search. HTH. Kind regards. Luke (-: Thanks. Kind regards. Luke
Re: use '/' to find both upper and lower case instances
I have a need to use '/' to find something in a file, but I wish it to ignore case. So say I'm looking for 'foo' then I want to find all instances for 'foo' and 'FOO' Use \c (for instance /\cfoo). If you want this behavior most of the time you could set the 'ignorecase' option. By the way, \C works oppositite to \c. -- Stefan
Re: use '/' to find both upper and lower case instances
On Fri, 18 Aug 2006, Luke Vanderfluit apparently wrote: I have a need to use '/' to find something in a file, but I wish it to ignore case. :h \c hth, Alan Isaac
Re: [unclassified] Re: use '/' to find both upper and lower case instances
Hi. 17Aug2006 @ 20:53 Dimitriy V. Masterov thusly spake Luke, Have you tried using :set ignorecase before your search? Yes. And that worked. Thanks (-: Kind regards. Luke. DVM
How to insert text via script/function call ?
Hi, I often need to place a header above a function defintion (C-source) fpr documentational purposes. What I treid is to write a short function for vim, which dioes insert the text skeleton -- but I did not find any already existing function in the API which does this for me. With :i I got weird effects -- sure my fault, but... . How can I insert text via a script ? Kind regards, mcc
Re: How to insert text via script/function call ?
Meino Christian Cramer wrote: Hi, I often need to place a header above a function defintion (C-source) fpr documentational purposes. What I treid is to write a short function for vim, which dioes insert the text skeleton -- but I did not find any already existing function in the API which does this for me. With :i I got weird effects -- sure my fault, but... . How can I insert text via a script ? Kind regards, mcc If your text is in a file on its own, you can use :r with a line number (the number of the line after which to insert, or 0 for before first line, or . for after cursor line, or $ for after last line; default is after cursor line) in the range position, i.e. just before the r. The file name comes as an argument at the end. Example (after line 5): 5r ~/template.txt If your text is in a register, you can use :put with a line number (again) in the range position and the register name (including , which must be escaped as \, for the default register; or + for the system clipboard) after the :put. Example (before cursor line): .-1put \ See :help :read :help :put Best regards, Tony.