Re: how can I add this feature to vim!!

2007-06-01 Thread Marc Weber
Hi jaywee, The simplest way is using a mapping inoremap { {cr}escO which should do what you want. But I myself find this terrible annying because it always inserts those closing braces. That's why I've written some kind of context sensitive completion

Re: embedable vim?

2007-05-17 Thread Marc Weber
either natively as (IIRC) kde applications do, or by means of an extensions (as seveal other posts mention doing for Firefox). Other browsers (such as IE IIRC) simply don't support any external editor. Shouldn't be that hard to tell AutoHotkey to copy paste the text to vim and back ..

Re: wish: allow a: in the function def

2007-04-25 Thread Marc Weber
So that the name is consistent everywhere. Makes it much easier to search. I would appreciate this addition, too. Example function! Test(param) echo a:param endfunction When you see param and want to know where it is used, all you have to do is pressing * (using set hlsearch or a plugin

Re: wish: allow a: in the function def

2007-04-25 Thread Marc Weber
So maybe one could make vimscript search a variable foo as l:foo, a:foo, (maybe also: w:foo, b:foo), s:foo, g:foo, and then throw an undefined variable name error if none exists. Or so. No. I don't want to go back to VB without using Option Explicit ;) Don't let vim find some value

Re: suggestion

2007-04-23 Thread Marc Weber
On Tue, Apr 17, 2007 at 10:35:14PM -0400, David Howland wrote: Dear Vim gods, Please consider adding the following command to Vim: :bc (for buffer close) It acts just like :bd , except that if the buffer is in a split window, it does not remove the window. Thank you. I've seen this

Re: Is it possible to source all scripts/plugins from VIM without leaving VIM?

2007-04-07 Thread Marc Weber
. When exiting you can write it. See :h mksession HTH Marc Weber

Re: Need help with error format

2007-04-07 Thread Marc Weber
F2 :w bar compiler! test bar cf errorcr and an error file error to speed up fixing your errorformat. HTH Marc Weber

Re: Mapping: Pick occurance of word under cursor, vim7-style

2007-03-20 Thread Marc Weber
On Thu, Feb 08, 2007 at 01:30:37PM +0100, Thomas Michael Engelke wrote: Hello! I am using the following mapping: map F4 [I:let nr = input(Match: )Barexe normal . nr .[\tCR I've now implemented a small outline utility based on regex At the moment it opens another window and shows a list

Re: Mapping to the numerical - and + and *

2007-02-28 Thread Marc Weber
On Wed, Feb 28, 2007 at 12:41:22PM +, Eric Leenman wrote: Hi, Is it possible to map the - and + and * keys on the nummerical section of a keyboard (in other words the keys in the group where the num-lock key is also) to functioan as cut, paste and copy? If so, how do you this? Have

VimTips spam protection - ideal case ? free hosting vs vim community driven own solution

2007-02-27 Thread Marc Weber
I've followed some of the emails of the thread Google Wiki Usefulness. One big point was: How to protect against spammers? = === I do not know that much about that topic so I'd like to ask you a) who does spam b) how to protect

Re: autom. ctags run

2007-02-27 Thread Marc Weber
On Tue, Feb 27, 2007 at 07:04:13PM +0100, Ralf Schmitt wrote: Hi list For now I've mapped the ctags command described in OmniCompletion plugin on a key to refresh project tags file. But very often I forget to update (press the hotkey) before I enter the omni completion. So it came to my

Re: add c/c++ snippets

2007-02-23 Thread Marc Weber
On Fri, Feb 23, 2007 at 11:36:40AM +0300, Alexey Vakhov wrote: I mean If I press enter end next press { system should to understand that it is new block and add right bracket also. But if I press Enter and start line with another symbol system should do nothing. Thanks for :inoremap tip. It's

Re: Advanced highlighting (using ctags for example)

2007-02-23 Thread Marc Weber
On Fri, Feb 23, 2007 at 10:52:52AM +0300, Alexey Vakhov wrote: Hi All, One question more ) Can i highlight words using for example ctags file and highlight wrong identifier like Visual Assist in Visual Studio. Thanks. Hi Alexey Thats possible. vim syntax highligthing is doing this. try :e

Re: Advanced highlighting (using ctags for example)

2007-02-23 Thread Marc Weber
On Fri, Feb 23, 2007 at 10:52:52AM +0300, Alexey Vakhov wrote: Hi All, One question more ) Can i highlight words using for example ctags file and highlight wrong identifier like Visual Assist in Visual Studio. Thanks. Yet another idea: try c-x[ which does tag completion. Than you have a

Re: search something from vim in certain directory

2007-02-23 Thread Marc Weber
On Fri, Feb 23, 2007 at 04:26:50PM +0300, Pavel Shevaev wrote: :vimgrep pattern directory/**/*.h Just an aside question - is there anything alike for find replace in files? Something like :%s/../../g glob could be very helpful... Especially it would be great to see replaced stuff in

Re: Highlighting keywords from C libraries

2007-02-21 Thread Marc Weber
Since projects won't have as many keywords as glibc, the only slow down will be with the syntax file (re)generation. ctags is reasonably fast Sorry. I haven't read your message thoroughly enough. I was talking about what you've written in your comment. /me hides ;) Marc

Re: indenting and json

2007-02-20 Thread Marc Weber
On Tue, Feb 20, 2007 at 02:08:31AM -0300, g b wrote: On 2/19/07, Marc Weber [EMAIL PROTECTED] wrote: On Sat, Feb 17, 2007 at 09:57:57PM -0200, g b wrote: Any way to indent json correctly on vim? Obj = { att1: 'val1', att2: 'val2', } I don't know. But it shouldn't be that hard

Re: indenting and json

2007-02-19 Thread Marc Weber
On Sat, Feb 17, 2007 at 09:57:57PM -0200, g b wrote: Any way to indent json correctly on vim? I recall that on 6.4 version we needed an external syntax file for javascript. Is it still the case? it's driving me nuts to have weird tabulation put allover the place... thanks ps: json

non-quoting version of f-args?

2007-02-08 Thread Marc Weber
Do I have missed a non quoting version of f-args ? Consider this example: function! T(...) for a in a:000 echom 'arg:'.string(a) endfor endfunction -- 8 -- 8 start test.vim -- 8 -- 8 -- 8 command! -nargs=* -buffer TestAddSeven :call T(7,f-args)

Re: non-quoting version of f-args?

2007-02-08 Thread Marc Weber
On Thu, Feb 08, 2007 at 11:56:21AM +0100, A.J.Mechelynck wrote: Marc Weber wrote: Do I have missed a non quoting version of f-args ? Consider this example: function! T(...) for a in a:000 echom 'arg:'.string(a) endfor endfunction -- 8 -- 8 start test.vim

Re: Mapping: Pick occurance of word under cursor, vim7-style

2007-02-08 Thread Marc Weber
On Thu, Feb 08, 2007 at 01:30:37PM +0100, Thomas Michael Engelke wrote: Can anybody give me a hint on how to rewrite the mapping so I get such a conext menu instead of a numbered list? Get the word under the cursor using expand('cword') See completion examples (:h complete-functions) to filter

Re: how do u visually select a search pattern?

2007-02-08 Thread Marc Weber
On Thu, Feb 08, 2007 at 09:59:52PM +0530, Sibin P. Thomas wrote: Hi all, How can one visually select a pattern which is searched for? You can use /searchpatterncrv/searcpattern/e to select it (/e means move to the end of match) than you can yank and read the @ register. There may be better

Re: editing function argument lists

2007-02-08 Thread Marc Weber
On Thu, Feb 08, 2007 at 09:56:52PM +, Tom Whittock wrote: Hi Vim users. I have a question: Given a standard function call block of text: func(arg1, arg2, arg3); how do people here deal with editing the argument list efficiently? I'm looking to try to create a custom motion to

Suggestion: numbers for completion menu?

2007-01-23 Thread Marc Weber
It would be convinient to get an item from the completion menu faster than downdown .. or typing more characters. What do you think of prepending each item with a number and add a key-mapping c-iidx to get the idxth item? so c-i4 would select the 4th. Would it be convinient to add another

Re: E316: ml_get: line ... not found, this my strace file... Can you help me to resolve my issue ?

2007-01-22 Thread Marc Weber
On Mon, Jan 22, 2007 at 03:36:25PM +0100, KLEIN St?phane wrote: 2007/1/22, KLEIN St?phane [EMAIL PROTECTED]: Hello, I sometime this error message in Vim : E316: ml_get: line ... not found (ligne ... introuvable in french) In this my strace file enclosed. What can I do to resolv my

Re: BOF Vim 8 - EncryptLine

2007-01-21 Thread Marc Weber
On Thu, Jan 18, 2007 at 02:15:36PM +1100, John Beckett wrote: Suggested new feature: Make an easy way to encrypt a secret within a line. Then you can have a simple text file to document stuff, with embedded secrets. On reading, you only need to enter a key if you want to see a secret. I

Re: help with multi environment vim on xp

2007-01-05 Thread Marc Weber
On Fri, Jan 05, 2007 at 12:35:57PM -0800, Marc Bernstein wrote: I have cygwin and xp needs for editing files on xp. In addition most of the scripts I edit are destined for use on unix and possibly windows as well (Perl).brbrAfter extensive search I am still looking for a cogent explanation

Re: some ideas

2006-12-14 Thread Marc Weber
On Mon, Dec 11, 2006 at 09:08:20PM -0200, Rodolfo Borges wrote: (1) When tab-completing on Vim :cmdline, start with the dir of the current file being edited, instead of the $PWD (use ./ for that). Yet another idea. I'm using many mappinngs like this to not change workinng directory (it seems

Re: question on gf and path

2006-12-01 Thread Marc Weber
/vl_ui_navigation_gfHandler_vim.html) isn't up to date because vim segfaults while creating it and I don't have the time to find the code causing it. If something doesn't work drop me a mail. HTH Marc Weber

Re: question on gf and path

2006-12-01 Thread Marc Weber
Include(includes/some.file) it's somewhat OK, but gf requires me to actually save the source file before it will accept the change from /includes... to includes. Do I have missed something or would set nocompatible first line in your .vimrc ! set hidden prevent vim

vim has quit unexpectedly

2006-11-11 Thread Marc Weber
How would you try to track this error down? Causing vimscript code: echo tag_text is echo tag_text echo if echo len(tag_text) if len(tag_text)0 echo in if output: tag_text is [] if 0 Then vim either

Re: new syntax file for vim

2006-11-11 Thread Marc Weber
On Sat, Nov 11, 2006 at 02:54:55PM +, Rui Gon?alves wrote: I'm creating a new syntax file for vim and i have some doubts: 1) how can i detect the end-of-file? (i need match the expression end [a-zA-Z][a-zA-Z0-9]* followed of an EOF) 2) how can i associate a syntax file to a extension?

Yet another c completion system

2006-11-11 Thread Marc Weber
features: uses vimscript/ cpp/ (exuberant-)ctags only. cpp preprocessor is run on current buffer. From that file tags are generated which are used for comletion. completion can be customized in the way that you can specify a function which returns a regular expression from the given text. default

Re: vim has quit unexpectedly

2006-11-11 Thread Marc Weber
On Sat, Nov 11, 2006 at 04:27:50PM +0100, A.J.Mechelynck wrote: Marc Weber wrote: How would you try to track this error down? Causing vimscript code: echo tag_text is echo tag_text echo if echo len(tag_text) if len(tag_text)0 echo

Howto inserting multiline completefunc text?

2006-11-07 Thread Marc Weber
I want the first completion entering abc def and the second entering 2nd example 2nd lne How to do this? example (source this the following lines) function! CompleteExample(findstart, base) if a:findstart locate the start of the word let [bc,ac] =

let s:F=function('foo#func_in_this_file') ?

2006-11-06 Thread Marc Weber
Imagine having the files: -- 8 -- 8 autoload/test.vim - 8 -- 8 -- 8 function test#DoTest(a) if a == 1 call s:F1() else call s:F2() endif endfunction function test#Test() echo test#Test() endfunction let

solved - Re: let s:F=function('foo#func_in_this_file') ?

2006-11-06 Thread Marc Weber
-- 8 -- 8 autoload/test.vim - 8 -- 8 -- 8 function test#DoTest(a) if a == 1 call s:F1() else call s:F2() endif endfunction I'm sorry. It does work. The solution is to use something like let G=s:F1 call

no special treatment of and ~ in substitute? possible?

2006-10-30 Thread Marc Weber
How can I tell vim to not tread and ~ in a special way when using substitute? compare echo substitute(substitute('a','a','b',''),'b','c ','') and echo substitute(substitute('a','a','b',''),'b',substitute('c ','\V\(\|~\)','\\\1','g'),'') using substitute works but seems to be

Re: compilation of regular expressions/ enhancement?

2006-10-03 Thread Marc Weber
Hi Tony. Of course this was a trivial example. I was grepping the output of jar - content-texfile to find the packages of a java-class. Currently I'm using this function. I'm invoking this function for up to 40 files or more.. That depends on how many modules I have imported. let type_pattern =

Re: When I open foo.zcml I would like xml type syntax

2006-09-29 Thread Marc Weber
On Fri, Sep 29, 2006 at 10:35:04AM +0200, KLEIN St?phane wrote: Hi, How can I configure vim to use XML syntax when I open *.zcml file ? See :h autocmd put this into a a file which is sourced on startup (eg .vimrc or a plugin-file) autocmd BufRead,BufNewFile *.zcml :set ft=xml Marc

Re: Progressive quickfix buffer / background compilations

2006-09-29 Thread Marc Weber
! cmd might help HTH a little bit. Marc Weber

Re: half of hlsearch

2006-08-11 Thread Marc Weber
noremap leaderdt :diffthiscr noremap leaderdo :diffoffcr noremap leaderdg :diffgetcr But perhaps someone else has another idea? Marc Weber

Re: Tips for advance use of Vim

2006-08-11 Thread Marc Weber
spammers wiping out existing tips' contents and inserting their garbage. Of course, I'm not a wiki The wmii people tried tackling this problem by introducing a wiki password which you can get at their chatroom.. Marc

Re: Tips for advance use of Vim

2006-08-10 Thread Marc Weber
On Thu, Aug 10, 2006 at 10:22:11AM +0800, Vincent Wang wrote: Good idea and I am sure it will help many persons! One suggestion, why not put your tips to www.vim.org's tips page and post a notification in this maillist? That will make your tip well archived and easier to reach. This tip had

Re: changed-yet-not-saved-lines highlighting feature

2006-08-10 Thread Marc Weber
it would be better to save to tempname() because those files will be deleted automatically.. Another waay would be : do u until vim no longer shows the modified tag ;) u will also show you what you've done. Marc Weber

Re: using syntax match two time in one line? fst blocks snd?

2006-08-10 Thread Marc Weber
that they don't start on their own (because foo isn't defined and nextgroup overrides this behaviourr anyway) But all I can see is the line beeing highlighted in Error (the color of the dummy start line syntax area) Try it out by using :source|InsertTestline Do you see what I've done wrong? Marc Weber

Re: Search pattern - without keywords

2006-07-27 Thread Marc Weber
, not to pick up any keyword. See :h @! The if then example. (3. one) This sequence matches any character which doesn't start the then word. you have to replace any character by any word and then by any keyword.. \(then\)[EMAIL PROTECTED] Hope this helps Marc Weber

Re: Clickable error messages

2006-07-27 Thread Marc Weber
:Robert See :h quickfix ;) Brief: :compiler perl :set makeprg=perl :make test.pl) If you want to add options to perl use set makeprg=perl\ --option\ blah (escape whitespaces) The quickfix cycle might remove some output.. depending on errorformat. I was waiting for this question because :!perl

vim server ? security hole?

2006-07-26 Thread Marc Weber
this shuold be the case by default. In my case it does what I want but.. Did I miss anything? Cheers Marc Weber

Re: vim server ? security hole?

2006-07-26 Thread Marc Weber
Marc, In case you are talking X11: D you have x11 authorization enabled or disabled ? I've been taking x11. I did modify xhost because I wanted a php script be able to launch vim. But I've restarted X now and xhost - shows the same as xhost. It still works. So c-rsystem('xhost') inserts:

using syntax match two time in one line? fst blocks snd?

2006-07-24 Thread Marc Weber
background: I want to highlight columns in a table differently (database output) So 1 and 2 will be substituted by either \t or |. = syntax file == hi def link Color1 Macro hi def link Color2 Error Show colors of Color1, Color2 syn

Re: How do I stop a mapping from looking like a mapping?

2006-07-13 Thread Marc Weber
I'm even to lazy to type foreach. Thus I've defined mappings like this: inoremap buffer m-fm-e foreachspace... Makes total of 2 keys+ meta key. ;) with this mapping opens the ftp plugin file with _mw appended map m-s-fm-s-tm-s-p :exec 'e

Re: VIM 7.0 scripts, ctags and taglist.vim

2006-07-11 Thread Marc Weber
Such a behavior most likely is far from one's expectations. Though, there is no any riddle here, just the latest version of exuberant ctags cannot parse new extensions to VIM script. It can't parse function autoload#blah#foo#method, either. So if you want to include this into your patch,

Script to surround text with (),.. what's wrong?

2006-07-10 Thread Marc Weber
This is my attempt to write script which can surround text (either a word or the text selected in visual mode) with some characters such as ' ... But it doesn't work everytime. Do you see another solution than using @- (:h registers shows that this register is only used for text beeing less than

Re: Script to surround text with (),.. what's wrong?

2006-07-10 Thread Marc Weber
It is also available on SF, however I haven't updated it for a coupled of years. HTH, Do you still remember some keyword to find the functionality I'm looking for or the filename? I'm not sure where to start. Usage like this? runtimepath+=lh-cpp/ Thx Marc

Re: Script to surround text with (),.. -- solved

2006-07-10 Thread Marc Weber
But it doesn't work everytime. This was my fault. exec @- did uses the deleted text before this deletion. Why don't you use :imap and :vmap separately ? Seems to be a working idea. Now I've managed to get it working. The trick was to use only one normal command. = surround.vim

Re: Motion for Cammel Notation

2006-07-03 Thread Marc Weber
On Mon, Jul 03, 2006 at 12:20:37PM +0300, Giorgos Gaganis wrote: Hello I was wondering if it is possible to have a motion command that would be aware of the Cammel Notation (eg BufferedInputStreamReader) so that the cursor would stop on the capital letters. I would particularly want to

Re: Using tags to quick complete funtion names

2006-06-24 Thread Marc Weber
Here is a enhanced regular expression which is more useful this is tricky, either , or or lower to Upper change or Upper Upper lower will trigger inserting .* you type - regex to match tags inP - in.*P Aab - Aab ABab - AB.*ab A,ab - A.*ab let pattern =

Re: how to detect c99 vs c89 (//-comments vs /*-comments)

2006-06-22 Thread Marc Weber
Then you can use plugins like project.vim or local_vimrc.vim With local_vimrc.vim (I know 2 very similar plugins with this name, I'm maintaining one of them), add a _vimrc_local.vim (the filename expected I couldn't find them.. I've implemented something similar which loads a current working

Re: Network access from vim

2006-06-22 Thread Marc Weber
Upon closer inspection, netrw delegates network activity to wget/fetch/rsync and friends anyway, so I guess I'll do the same. It's given me some direction on how to handle different operatings systems -- 'if has(win32)' etc. It's not a robust solution, but we work within our confines, right?

Re: Extra spaces after reformatting.

2006-06-22 Thread Marc Weber
For example: Original text: a...b c...d d...e Reformatted text: a...b c...d d...e Is there an option that I can override this behavior? I don't know.. There are M and B options (see :h fo-table but they didn't have the desired effect..) Perhaps you can also use :','s/\n// ? What do

Re: Patches

2006-06-21 Thread Marc Weber
VIM 7 currently has 22 patches. I just installed 7.0 yesterday, and now I'd like to install the patches. How might I go about doing that? See vim.org Download - patches Download - developement aap should be able to do this for you. Marc

vim documentation about marks/file-marks

2006-06-12 Thread Marc Weber
Suggestion: change === *m* *mark* *Mark* m{a-zA-Z} Set mark {a-zA-Z} at cursor position (does not move the cursor, this is not a motion

Segfault using errorformat and errorfile

2006-06-11 Thread Marc Weber
Hi. I don't know much about errorformats in vim yet, I didn't manage to match these errors but I get a crash ;) It doesn't crash when removing the none error marker lines. Can you help me with finding a errorformat string ? Or should I write another parser to remove the other lines (grep, ..) ?

Re: Segfault using errorformat and errorfile

2006-06-11 Thread Marc Weber
Can you help me with finding a errorformat string ? Or should I write another parser to remove the other lines (grep, ..) ? grep did work. I'm now using CompilerSet errorformat=%I\\[INFO]%m,%Z, \%E%f:\\[%l\\,%c]%m,%Csymbol%s,%Clocation%s,%Z, which works without grep (doesn't

Re: Simple move/rename command with cursor placement, howto?

2006-06-10 Thread Marc Weber
Yakov How would you implement bash Ctrl-k behaviour ? Delete from cursor till the end of line? noremap : q:i ? ;-) Marc

Did you know vim can multitask? Nearly.. ;)

2006-06-10 Thread Marc Weber
Hi. I've written another little script.. But by now you need sh and a client-server version. Perhaps you like it? just run gvim --servername MYSERVERNAME and run a backgroundtask, eg takealotoftime.sh = #!/bin/sh sleep 2 echo I'm ready soon sleep 3 echo I will take long sleep 1

Re: navigation using fchar or Fchar

2006-06-10 Thread Marc Weber
Is this what you want ?: remap f,F to be multi-line noremap silentf :call OneCharSearch(1)CR noremap silentF :call OneCharSearch(0)cr noremap ; n noremap , N function! OneCharSearch(forward) op is '/' or '?' let x= getchar() let c=nr2char(x) echo 'c='.c if x == 27 |

Re: navigation using fchar or Fchar

2006-06-10 Thread Marc Weber
On Sat, Jun 10, 2006 at 09:27:50PM +0200, Yakov Lerner wrote: remap f,F to be multi-line. Supports counter before f,F. finds special chars properly. Yakov Lerner noremap silentf :call OneCharSearch(1)CR noremap silentF :call OneCharSearch(0)cr noremap ; n noremap , N function!

Re: navigation using fchar or Fchar

2006-06-10 Thread Marc Weber
On Sat, Jun 10, 2006 at 11:13:02PM +0200, Thor Andreassen wrote: On Sat, Jun 10, 2006 at 10:51:24PM +0200, Marc Weber wrote: [...] Can you do 3f{ this way ? Don't know if this is relevant, but you can do similar movements with ]} and [{, which jump to enclosing } or { respectively

colseb_a.vim script, closign tags for vim /java.?

2006-06-10 Thread Marc Weber
I want the script to automatically close function with endfunction while with endwhile for with endfor Using it with java I could imagine to complete try { with } catch () { } or } finally () { } But I don't know exactly what to put in here? This is my attempt which didn't work yet. Can

Re: New feature: bind layout of windows to keys?

2006-06-09 Thread Marc Weber
:help tabpage.txt See also :h mksession .. That is was ZoomWin.vim (from Charles E. Campbell) is using.. You can get it on vim.org Marc

Re: How to go to the next matched tag? (vim/cscope/ctags)

2006-05-28 Thread Marc Weber
On Mon, May 29, 2006 at 01:47:55AM +1000, Dancefire wrote: (1 of 3): thread struct thread; How can I go to the other matched tags? I have tried n, but it doesn't work. n is used for searching only try :tnext :tprevious :tlast see also :h ptag :h tselect ... vim help is your friend ;) ps:

Re: Moving windows horizontally from col to col

2006-05-16 Thread Marc Weber
On Mon, May 15, 2006 at 03:43:40PM -0700, Gerald Lai wrote: On Tue, 16 May 2006, Marc Weber wrote: I like the way you can move windows in wmii. 1 | 2 --+-- 3 | 4 if your cursor is in window 1 and you move the window to the right you get | 1 3 | 2 | 4 [improved

Moving windows horizontally from col to col

2006-05-15 Thread Marc Weber
I like the way you can move windows in wmii. 1 | 2 - 3 | 4 if your cursor is in window 1 and you move the window to the right you get | 1 3 ||2 | 4 So I've tried to implement this in vim.. It works (not for preview window) and is ugly.. Perhaps you want to try it out or have some