Re: your best vim scripting tip

2006-12-07 Thread Kim Schulz
[snip] Great input Luc! thanks.

Re: your best vim scripting tip

2006-12-06 Thread Bill McCarthy
On Tue 5-Dec-06 10:29pm -0600, Sibin P. Thomas wrote: > While we are at the subject of tips for budding Vim > scripters - I had created this mapping --> > > nmap com ^:if search('\/\*.*\*\/','c',line("."))!=0 > :.s/\/\*\(.*\)\*\//\1/g :else > :.s/\(\s*\)\(.*\)\(\s*\)/\1\/\*\2\*\/\3/g :endif :noh >

RE: your best vim scripting tip

2006-12-05 Thread C.G.Senthilkumar.
What I wanted to know is could the same functionality have been achieved by a better sequence of commands? Can an experienced 'vimmer' do better? There is a comments plugin that I yanked off the Internet a while ago that can do the same for several different languages. From the file header: "

RE: your best vim scripting tip

2006-12-05 Thread Sibin P. Thomas
d the same functionality have been achieved by a better sequence of commands? Can an experienced 'vimmer' do better? Regards, Sibin -Original Message- From: Mikolaj Machowski [mailto:[EMAIL PROTECTED] Sent: Sunday, December 03, 2006 7:18 PM To: vim@vim.org Subject: Re: your be

Re: your best vim scripting tip

2006-12-05 Thread Michael Phillips
Towards the bottom of Luc Hermitte message, the following was said: > substitute(), match*(), exists(), ... > But also :exe, :normal!, I-CTRL_R, :s, ... which are not functions > indeed. What does the I-CTRL_R command do? TIA Michael --- Luc Hermitte <[EMAIL PROTECTED]> wrote: > Hello, > > *

Re: your best vim scripting tip

2006-12-05 Thread Luc Hermitte
Hello, * On Sat, Dec 02, 2006 at 07:05:40PM +0100, Kim Schulz <[EMAIL PROTECTED]> wrote: > It you should give one (or more) tips to a person who was going to > start creating scripts for vim, then what would it be? Tough question. > ideas could be: > Do's and dont's * Do know the various kin

Re: your best vim scripting tip

2006-12-04 Thread Kim Schulz
On Mon, 04 Dec 2006 00:40:53 +0100 "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > Kim Schulz wrote: > > Hi, > > It you should give one (or more) tips to a person who was going to > > start creating scripts for vim, then what would it be? > > (besides "know your :help" :-) ) > > > > ideas could be

Re: your best vim scripting tip

2006-12-03 Thread Tim Chase
>> It you should give one (or more) tips to a person who was >> going to start creating scripts for vim, then what would >> it be? (besides "know your :help" :-) ) I'll add my detritus to the pearls handed out by Tony, et al. It's not only important to "know your :help", but to know how to make

Re: your best vim scripting tip

2006-12-03 Thread A.J.Mechelynck
Kim Schulz wrote: Hi, It you should give one (or more) tips to a person who was going to start creating scripts for vim, then what would it be? (besides "know your :help" :-) ) ideas could be: Do's and dont's best util script often used functions ways of optimization etc. etc.. In additi

Re: your best vim scripting tip

2006-12-03 Thread zzapper
"Yakov Lerner" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 12/3/06, Kim Schulz <[EMAIL PROTECTED]> wrote: >> On Sun, 3 Dec 2006 11:53:37 +0200 >> "Yakov Lerner" <[EMAIL PROTECTED]> wrote: >> > Depends on your task you have at hand. >> > Once you know the task, you can pick related s

Re: your best vim scripting tip

2006-12-03 Thread Mikolaj Machowski
On nie gru 3 2006, vim@vim.org wrote: > Hi, > It you should give one (or more) tips to a person who was going to > start creating scripts for vim, then what would it be? > (besides "know your :help" :-) ) > > ideas could be: > Do's and dont's Keep ff=unix . In other case your scripts won't be work

Re: your best vim scripting tip

2006-12-03 Thread Yakov Lerner
On 12/3/06, Kim Schulz <[EMAIL PROTECTED]> wrote: On Sun, 3 Dec 2006 11:53:37 +0200 "Yakov Lerner" <[EMAIL PROTECTED]> wrote: > Depends on your task you have at hand. > Once you know the task, you can pick related script(s) > from www.vim.org/scripts and learn from them. sure, but many of the sc

Re: your best vim scripting tip

2006-12-03 Thread Kim Schulz
On Sun, 3 Dec 2006 11:53:37 +0200 "Yakov Lerner" <[EMAIL PROTECTED]> wrote: > Depends on your task you have at hand. > Once you know the task, you can pick related script(s) > from www.vim.org/scripts and learn from them. sure, but many of the scripts are done by script-programming-beginners an in

Re: your best vim scripting tip

2006-12-03 Thread Yakov Lerner
On 12/3/06, Kim Schulz <[EMAIL PROTECTED]> wrote: On Sun, 3 Dec 2006 00:19:26 +0200 "Yakov Lerner" <[EMAIL PROTECTED]> wrote: > On 12/2/06, Kim Schulz <[EMAIL PROTECTED]> wrote: > > It you should give one (or more) tips to a person who was going to > > start creating scripts for vim, then what w

Re: your best vim scripting tip

2006-12-02 Thread Kim Schulz
On Sun, 3 Dec 2006 00:19:26 +0200 "Yakov Lerner" <[EMAIL PROTECTED]> wrote: > On 12/2/06, Kim Schulz <[EMAIL PROTECTED]> wrote: > > It you should give one (or more) tips to a person who was going to > > start creating scripts for vim, then what would it be? > > (besides "know your :help" :-) ) >

Re: your best vim scripting tip

2006-12-02 Thread Yakov Lerner
On 12/2/06, Kim Schulz <[EMAIL PROTECTED]> wrote: It you should give one (or more) tips to a person who was going to start creating scripts for vim, then what would it be? (besides "know your :help" :-) ) This is creepy question, because it's sort of self-contradicting. Let me explain. On one