Code folding without explicit end matches

2011-04-17 Thread howard Schwartz
Im not sure if this idea might help, but I faced a similar problem in folding blocks of text within email digests like that for vim_use. And I did not have the stomach for fancy, script-based folding strategies. So I discovered something simple. Here is a fold for blocks of text that appear

Re: why autocmd has E488 error

2011-04-17 Thread Ben Schmidt
E488 is Trailing characters Perhaps it is occurring because your script has DOS line endings on a Unix/Mac system. That frequently causes these kinds of errors. Ensure your script containing the autocommand is saved with Unix line endings and it should go away. Vim scripts with Unix line

Re: conditional insertion of utf-8 characters

2011-04-17 Thread AK
On 04/16/2011 08:16 PM, Tony Mechelynck wrote: On 17/04/11 01:50, AK wrote: Hi, I needed to make a mapping that would insert a bullet if '*' is typed at the beginning of line and insert literal '*' if typed somewhere else. I came up with something that works for me, but I was wondering if

How to Access 2nd Word on Search Result Line

2011-04-17 Thread Roy Fulbright
What I am trying to do is insert a 'warn' statement after each subroutine definition in a Perl program. The warn statement displays Entering subroutine . I currently have the following mapping: map F6 /^sub CR:r generic_warn.txtCR/CR where I find the next subroutine

Weird indentation behavior when splitting lines

2011-04-17 Thread Khelben Blackstaff
Hello. I noticed some weird behavior when splitting lines in vim. I have vim 1.3.154 but it did it in older versions too. When i split some line and it contains whitespace, then instead of the usual tab, both spaces and tab get inserted. In every other case, indentation works fine and tabs get

Re: why autocmd has E488 error

2011-04-17 Thread Tony Mechelynck
On 17/04/11 13:54, Ben Schmidt wrote: E488 is Trailing characters Perhaps it is occurring because your script has DOS line endings on a Unix/Mac system. That frequently causes these kinds of errors. Ensure your script containing the autocommand is saved with Unix line endings and it should go

Re: why autocmd has E488 error

2011-04-17 Thread Michael(Xi Zhang)
On Sun, Apr 17, 2011 at 2:57 PM, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 17/04/11 13:54, Ben Schmidt wrote: E488 is Trailing characters Perhaps it is occurring because your script has DOS line endings on a Unix/Mac system. That frequently causes these kinds of errors.

RE: How to Access 2nd Word on Search Result Line

2011-04-17 Thread Roy Fulbright
From: rfulb...@hotmail.com To: vim_use@googlegroups.com Subject: How to Access 2nd Word on Search Result Line Date: Sun, 17 Apr 2011 14:00:56 -0400 What I am trying to do is insert a 'warn' statement after each subroutine definition in a Perl program. The warn statement displays

Re: why autocmd has E488 error

2011-04-17 Thread Ben Schmidt
On 18/04/11 6:57 AM, Tony Mechelynck wrote: On 17/04/11 13:54, Ben Schmidt wrote: E488 is Trailing characters Perhaps it is occurring because your script has DOS line endings on a Unix/Mac system. That frequently causes these kinds of errors. Ensure your script containing the autocommand is

Re: Code folding without explicit end matches

2011-04-17 Thread Ben Fritz
Leslie Viljoen wrote: I think the problem would be solved if Vim could recognise a new section starting and use that to terminate the previous one. Looking at Python syntax files, it looks like people are using huge vimscripts to solve a similar problem - which is a bit of a hack I think.

Re: why autocmd has E488 error

2011-04-17 Thread Tony Mechelynck
On 18/04/11 01:02, Ben Schmidt wrote: On 18/04/11 6:57 AM, Tony Mechelynck wrote: On 17/04/11 13:54, Ben Schmidt wrote: E488 is Trailing characters Perhaps it is occurring because your script has DOS line endings on a Unix/Mac system. That frequently causes these kinds of errors. Ensure your

Shell-like command completion

2011-04-17 Thread Ted
Hello folks, I've written a command that will replace the contents of a buffer with the output of a shell command. I'd like to have it provide completion as similar as possible to that used by bash itself. Ideally, I would like it to use the bash completions themselves, presumably by spawning a

Re: Shell-like command completion

2011-04-17 Thread Tony Mechelynck
On 18/04/11 04:23, Ted wrote: Hello folks, I've written a command that will replace the contents of a buffer with the output of a shell command. :%r !whatever or if the buffer contains the command's stdin (or if it reads no estdin) :%!whatever in both cases replacing whatever by the

Re: Shell-like command completion

2011-04-17 Thread Ben Schmidt
On 18/04/11 12:23 PM, Ted wrote: Hello folks, I've written a command that will replace the contents of a buffer with the output of a shell command. I'd like to have it provide completion as similar as possible to that used by bash itself. Ideally, I would like it to use the bash completions

Re: Shell-like command completion

2011-04-17 Thread Ted
Comments inline... On Apr 17, 11:55 pm, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 18/04/11 04:23, Ted wrote: ... I've written a command that will replace the contents of a buffer with the output of a shell command. :%r !whatever or if the buffer contains the command's stdin