Project specific settings

2007-05-14 Thread Marius Roets
Hi All, I know this has been covered before, but I can't seem to find it by searching Vim tips, so please excuse me if this has been ask many times before. I always uses spaces to indent my code, but a current project requires me to use tabs. How could I make this setting only be in effect for

Why does VimResized get triggered 4 times per resize

2007-03-09 Thread Marius Roets
Hi everybody, Can somebody explain the following behaviour to me. In my .vimrc I put the following: --START -- function ResizeEvent() let lines = lines - 1 execute '!echo resizing '.lines . ' test.txt' endfunction autocmd VimResized * call ResizeEvent() END

Only half a command line in GVim

2007-03-08 Thread Marius Roets
Hi everybody, I have been using GVim on X11 for years. Recently I have changed my window manager to Compiz. Now, all (and I have many) sessions I have created before the switch, shows only half the command line when I load them. For instance when I type :q, I see only one . of the : and the top

Re: Getting out of netrw

2006-11-03 Thread Marius Roets
On 11/3/06, Jean-Rene David [EMAIL PROTECTED] wrote: I thought of using :q but that closes vim if only one window is open. Am I missing something obvious? I use :Sexplore (or :Vexplore) to open the explorer. Then it's not a problem using :q. Or if you really want to be fancy, put this in

Re: active links for opening files

2006-10-31 Thread Marius Roets
On 10/30/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 10/30/06, Michael M. Tung [EMAIL PROTECTED] wrote: Hi all: I am working on a simple plugin and want to make vim open a file which appears in text e.g. as [/tmp/test.txt] by clicking on it. The path and filename always

Re: BUG: mksession saves lcd in incorrect place

2006-10-24 Thread Marius Roets
On 10/24/06, Bram Moolenaar [EMAIL PROTECTED] wrote: I see the problem. I'll fix it. Thanks Bram!

Re: BUG: mksession saves lcd in incorrect place

2006-10-24 Thread Marius Roets
On 10/24/06, Bram Moolenaar [EMAIL PROTECTED] wrote: I see the problem. I'll fix it. This works correctly now after applying patch 7.0.147. Thanks again Bram. Marius

Re: Quickfix behaviour

2006-10-23 Thread Marius Roets
On 10/20/06, Yegappan Lakshmanan [EMAIL PROTECTED] wrote: The above problem with the quickfix window and the 'switchbuf' option set to 'usetab' is now fixed by patch 7.0.146. - Yegappan This works perfectly now. Thanks a million. Marius

BUG: mksession saves lcd in incorrect place

2006-10-23 Thread Marius Roets
Hi everybody, I believe I have found a bug in Vim 7.0.146, relating to mksession and lcd. Here is a small example. 1) Open Vim 2) :e file1.txt 3) :tabe temp/file2.txt Any different directory 4) :lcd %:h 5) :mks test.vim 6) Close vim 7) Open vim 8) :source test.vim 9) The second tab is empty. The

Re: Quickfix behaviour

2006-10-21 Thread Marius Roets
On 10/20/06, Yegappan Lakshmanan [EMAIL PROTECTED] wrote: The above problem with the quickfix window and the 'switchbuf' option set to 'usetab' is now fixed by patch 7.0.146. - Yegappan Thanks, I will check it out. Marius

Quickfix behaviour

2006-10-19 Thread Marius Roets
Hi everybody, In a quickfix window, selecting an error (pressing enter) takes you to that error. The way it does this is by opening the file in the window above the quickfix window (if it is not open already, in which case it jumps to the open buffer, assuming the buffer is in the same tabpage).

Re: Quickfix behaviour

2006-10-19 Thread Marius Roets
On 10/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 1) I would like to open a new window/tab, rather than use the one above the quickfix window. :h 'switchbuf' - split 2) If the buffer is already open in another tab page, I'd like to jump there, instead of opening it in this tab

Re: Question about listchars

2006-10-19 Thread Marius Roets
On 10/19/06, Jeff Lanzarotta [EMAIL PROTECTED] wrote: Hello, I have the following in my vimrc, This shows spaces and tabs characters. Visual Whitespace. set listchars=tab:»·,trail:· set list That all work well and good, but I would like to disable this display of visual

Using output of Vim commands in scripts

2006-10-16 Thread Marius Roets
Hi everybody, Is it possible to use the output of Vim commands in a script? My specific problem currently is that I would like to use the output of :tabs in a script. I cannot find a Vim function that does the same as this command. Any ideas? Thanks Marius

Strange behaviour of C-X and C-A

2006-10-11 Thread Marius Roets
Hi everybody, I'm using Vim 7.0.94 on Linux. I use C-A and C-X from time to time to increment/decrement numbers. However when there is a leading zero I get very strange behaviour with both. Example: 01 02 03 04 05 06 07 08 09 10 11 :nmap F7 C-Xj I position the cursor on 01 and press F7, this

Re: Strange behaviour of C-X and C-A

2006-10-11 Thread Marius Roets
On 10/11/06, Peter Palm [EMAIL PROTECTED] wrote: Op woensdag 11 oktober 2006 11:46, schreef Marius Roets: set nrformats-=octal Yep, this did it. Thanks!! Marius

Uppercase keywords

2006-10-02 Thread Marius Roets
Hi Vimmers, I have a big a (3000+ lines) source code file. The syntax highlighting works perfectly, so all keywords are highlighted correctly. Is there any way that I can use this fact to convert all keywords to uppercase, or do I have to do them all one by one? Thanks Marius

Turning abbreviations on and off

2006-09-25 Thread Marius Roets
Hi everybody, I have a in my plsql.vim filetype plugin a lot of abbreviations to the effect of : iabbrev buffer then THEN iabbrev buffer else ELSE ... etc. The idea is that some companies' coding standards expect me to use capitalized keywords. Personally I hate capitalized keywords (it reminds

cpp ftplugins not loaded

2006-09-10 Thread Marius Roets
Hi everybody, I have a quick question regarding ftplugins. I created a directory in my after/ftplugin directory for each filetype, with several plugins in each. Up to now I had a directory called c, which served to hold plugins for both c and c++ files, and this worked well. However I decided to

Re: cpp ftplugins not loaded

2006-09-10 Thread Marius Roets
Hi Yakov, On Sunday 10 September 2006 12:27, Yakov Lerner wrote: I created file ~/bat/my.dir.vim/after/ftplugin/c/xxx.vim containing line call input(This is after/ftplugin/c/xxx.vim) and file ~/bat/my.dir.vim/after/ftplugin/cpp/cpp_xyz.vim containing line call input(This is

Re: cpp ftplugins not loaded

2006-09-10 Thread Marius Roets
Hi Tony, On Sunday 10 September 2006 12:51, A.J.Mechelynck wrote: AFAIK both sets should be loaded. See: - BufRead and BufNewFile autocommands for the concerned file extension (*.c, *.cpp, *.c++, etc.) - FileType autocommand - function s:LoadFTPlugin in $VIMRUNTIME/ftplugin.vim - c

Re: Can I make my sesion forget it's a session

2006-08-31 Thread Marius Roets
On 8/30/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: A session is not only a number of settings, it's also one or more editfiles etc. To make a session forget all that makes it a session, use :qa followed by vim or gvim (the latter may be entered in an Alt-F2

Re: How to insert text via script/function call ?

2006-08-18 Thread Marius Roets
On 8/18/06, Meino Christian Cramer [EMAIL PROTECTED] 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

Re: Search all text files in a directory for text

2006-08-18 Thread Marius Roets
On 8/18/06, Jerin Joy [EMAIL PROTECTED] wrote: Hi, I have a lot of source code distributed over a directory hierarchy structure. I always need to find class declarations, instances where variables are set etc. Usually I just go to command line and run something like find . -name *.vr -print |

Re: Creating a syntax file with folding

2006-08-16 Thread Marius Roets
On 8/15/06, Charles E Campbell Jr [EMAIL PROTECTED] wrote: syn clear syn region xBlock transparent fold matchgroup=Delimiter start=begin end=end contains=xBlock Regards, Chip Campbell I do believe you are a genius. Thanks. Marius

Re: gP-confusion

2006-08-16 Thread Marius Roets
On 8/16/06, Meino Christian Cramer [EMAIL PROTECTED] wrote: Hi, finally I found (nearly) what I am searching for...but... I wanted a command which after doing a y$ from in the midth of a line, puts my yanked text after the end of the line and the cursor right after the put text. The help

Re: gP-confusion

2006-08-16 Thread Marius Roets
On 8/16/06, Marius Roets [EMAIL PROTECTED] wrote: On 8/16/06, Meino Christian Cramer [EMAIL PROTECTED] wrote: Hi, finally I found (nearly) what I am searching for...but... I wanted a command which after doing a y$ from in the midth of a line, puts my yanked text after the end

Re: gP-confusion

2006-08-16 Thread Marius Roets
On 8/16/06, Yakov Lerner [EMAIL PROTECTED] wrote: gp puts after the cursor, gP puts before the cursor. When you want to paste at the front of the line, you want gP, like 0gP. When you want to paste at the end of the line, you'll want to use $gp. So your command for yanking till end of line

Creating a syntax file with folding

2006-08-15 Thread Marius Roets
Hi everybody, I am trying to create a syntax file with folding. However after pouring over the documentation for hours, I seem to be stuck. I want to, for instance, fold a begin/end block. I have created a simple syntax file with just this line: syntax region xBlock start=begin end=end