If/Else for a Catch statement?

2011-03-31 Thread howard Schwartz
Hi, I would like to do something like this, to process exceptions: try if catch /pattern/ do this and that else do the ordinary thing endif endtry Of course this is not real code, but catches do act like an ``if'', but I do not know of a clean way to do

Re: If/Else for a Catch statement?

2011-03-31 Thread Tony Mechelynck
On 31/03/11 08:13, howard Schwartz wrote: Hi, I would like to do something like this, to process exceptions: try if catch /pattern/ do this and that else do the ordinary thing endif endtry Of course this is not real code, but catches do act like an ``if'', but I do not know of a clean way to

What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Rostyslaw Lewyckyj
IF vim recognizes an error in a script, what does it do? Where are the rules for this detailed? Suppose that while editing file.foo, I initiate a script e.g. :so myscript.vim and there is an error e.g. the script looks for a non existing pattern in file.foo After issuing its error message what

Re: What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Christian Brabandt
On Thu, March 31, 2011 8:38 am, Rostyslaw Lewyckyj wrote: IF vim recognizes an error in a script, what does it do? Where are the rules for this detailed? Suppose that while editing file.foo, I initiate a script e.g. :so myscript.vim and there is an error e.g. the script looks for a non

Re: What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Ben Schmidt
On 31/03/11 6:25 PM, Christian Brabandt wrote: On Thu, March 31, 2011 8:38 am, Rostyslaw Lewyckyj wrote: IF vim recognizes an error in a script, what does it do? Where are the rules for this detailed? Suppose that while editing file.foo, I initiate a script e.g. :so myscript.vim and there is

Re: What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Christian Brabandt
On Thu, March 31, 2011 9:52 am, Ben Schmidt wrote: Note that mappings abort on error, though. I think other commands like @ might, too. Since both these can actually run scripts, one way or another, it somewhat depends in what context your script is running how errors are handled. To be sure

Re: What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Andy Wokula
Am 31.03.2011 08:38, schrieb Rostyslaw Lewyckyj: IF vim recognizes an error in a script, what does it do? Where are the rules for this detailed? Suppose that while editing file.foo, I initiate a script e.g. :so myscript.vim and there is an error e.g. the script looks for a non existing pattern

[Thanks] Re: Function to write correctly French quotation marks

2011-03-31 Thread Steve
Hi Christian and Ben, I've spent some time these last two days to understand your suggestions regarding my query and I must say that I had a tough time with them. But I tried and learnt a lot. So I'm not going to continue on this thread, as I'm using the keymap mapping solution which fits pretty

Re: What is supposed to happen if there is an error in a vim script?

2011-03-31 Thread Rostyslaw Lewyckyj
Andy Wokula wrote: Am 31.03.2011 08:38, schrieb Rostyslaw Lewyckyj: IF vim recognizes an error in a script, what does it do? Where are the rules for this detailed? Suppose that while editing file.foo, I initiate a script e.g. :so myscript.vim and there is an error e.g. the script looks for a

Re: call graph functionality

2011-03-31 Thread hari.rangara...@gmail.com
I'm not sure I still get your exact requirements. The latest version of CCTree can load a kernel cscope database of 280 Mb in about 10 mins, and now you have the option of saving a native cross-ref db and loading it later; these only take about a couple of mins and you can reuse them (and also, I

Tag jumps and colon

2011-03-31 Thread Kim Schulz
Hi, I use tag jumping with ctags a lot but one thing annoys me. In C code when I have a switch case like: switch (foo) { case BAR: { } } I cannot ctrl-leftmouse click the BAR word in order to jump to it. It thinks that : (colon) is part of the tag name and

about submatch in VIM

2011-03-31 Thread Coiby
Hi, everyone! I want to increase the number in this format /ddd by one but also keep /. But the following command doesn't work: $s/\/\([1-9]\+\)/\/\=submatch(1)-1)/g Can anyone give a tip? Thanks! -- View this message in context:

Re: about submatch in VIM

2011-03-31 Thread ZyX
Reply to message «about submatch in VIM», sent 21:10:08 01 April 2011, Friday by Coiby: `\=' must be the at the beginning of the replacement string, so you should use `\=\/.(submatch(1)+1)' (`-1' is `decrease', not `increase'). By the way, you could have used `\@=':

Re: about submatch in VIM

2011-03-31 Thread Tim Chase
On 03/31/2011 12:10 PM, Coiby wrote: I want to increase the number in this format /ddd by one but also keep /. But the following command doesn't work: $s/\/\([1-9]\+\)/\/\=submatch(1)-1)/g Can anyone give a tip? In addition to what ZyX's comments (particularly about the \= needing to be at

Re: Tag jumps and colon

2011-03-31 Thread Gary Johnson
On 2011-03-31, Kim Schulz wrote: Hi, I use tag jumping with ctags a lot but one thing annoys me. In C code when I have a switch case like: switch (foo) { case BAR: { } } I cannot ctrl-leftmouse click the BAR word in order to jump to it. It thinks

Finding the correct map

2011-03-31 Thread carlosvillu
Hi, I came from Textmate and i try to created a map that i was so useful for me. When i edit a file in insert mode, i want can press shiftLeft / shiftRigth for select caracter by caracter and shiftcmdLeft shiftcmdRight to select word by word. Really I tried, but I don´t make work fine. I

Re: Finding the correct map

2011-03-31 Thread Tim Chase
On 03/31/2011 05:01 PM, carlosvillu wrote: I came from Textmate and i try to created a map that i was so useful for me. When i edit a file in insert mode, i want can press shiftLeft /shiftRigth for select caracter by caracter and shiftcmdLeftshiftcmdRight to select word by word. Really I tried,