Executing multiple commands in one shot

2009-05-22 Thread Mahendra Ladhe
Hi,   I've opened say 20 files using one vim instance. I want to do the same sequence of operations on all files as below. 1. Replace occurrences of one word by some other word 2. Save the file 3. Delete it from buffer so that some other file becomes current. Repeat above process till buffer

Re: Executing multiple commands in one shot

2009-05-22 Thread Raúl Núñez de Arenas Coronado
Saluton Mahendra :) On Fri 22 May 2009 08:46 +0200, Mahendra Ladhe l...@yahoo.com dixit:   I've opened say 20 files using one vim instance. I want to do the same sequence of operations on all files as below. 1. Replace occurrences of one word by some other word 2.. Save the file 3. Delete

RE: Executing multiple commands in one shot

2009-05-22 Thread John Beckett
Mahendra Ladhe wrote: I've opened say 20 files using one vim instance. I want to do the same sequence of operations on all files as below. 1. Replace occurrences of one word by some other word 2.. Save the file 3. Delete it from buffer so that some other file becomes current. Repeat above

Re: Executing multiple commands in one shot

2009-05-22 Thread Raúl Núñez de Arenas Coronado
Saluton John :) On Fri 22 May 2009 09:15 +0200, John Beckett j...@gmail.com dixit: Mahendra Ladhe wrote: Repeat above process till buffer becomes empty. Can I club all these actions at vim command line? something like :s/one_word/another_word/g;w;bd [...] To substitute in all buffers:  

Using vim as interface to Wikipedia

2009-05-22 Thread Andrey Zhidenkov
Hello, all. I want to use vim to edit Wikipedia articles. I found a syntax file for .wiki (http://www.vim.org/scripts/script.php?script_id=1787), but this is a syntax highlighting only. It will be great if there was a plugin or script wich would do some cool stuff: 1. Fetch an article from

period in java block comment messes up syntax highlighting after it in the comment

2009-05-22 Thread David Lam
hmm i was just wondering randomely if anyone already patched their java.vim syntax file for this... im usin 7.2.182 GTK2 basically, in a block comment, text after a period loses its highlighting Ex. (i use the 'desert' color scheme) /** * This is the normal highlight color. And this

Including \k in a character collection in a pattern

2009-05-22 Thread A. S. Budden
When using patterns in vim, I often make use of the \k pattern to match any part of the keyword. Is it possible to make a character collection that includes \k and other characters? To clarify by way of an example: If I want to match any alphabetic character, I can use \a. If I want to match

Re: Measuring file edit time

2009-05-22 Thread J.A.J. Pater
take a look at the |:profile| command. However, it requires the |+profile| feature, which means a Huge build, which in turn probably means compiling Vim yourself Cool. Gvim in Ubuntu 9.04 _seems_ to be compiled +profile. So thanks! --~--~-~--~~~---~--~~

Emulate a typewriter

2009-05-22 Thread Tom Link
Hi, What would be the best way to emulate this in vim: http://lifehacker.com/5263560/typewriter-forces-you-to-focus-while-you-write http://www.lifehackingmovie.com/2009/05/18/typewriter-minimal-text-editor-freeware/ I was thinking of putting vim into insert mode and of remapping all keys that

Re: period in java block comment messes up syntax highlighting after it in the comment

2009-05-22 Thread Dennis Benzinger
Am 22.05.2009 10:15, David Lam schrieb: hmm i was just wondering randomely if anyone already patched their java.vim syntax file for this... im usin 7.2.182 GTK2 basically, in a block comment, text after a period loses its highlighting Ex. (i use the 'desert' color scheme) /** *

Re: Strange errors with XP Template

2009-05-22 Thread Tony Mechelynck
On 14/05/09 18:14, Mr.SpOOn wrote: Hi, today I tried for the first time the XPT plugin. It is great. On my machine is working perfectly. On a server machine, when I give the command to load the snippet I get a lot of error: =XPTemplateStart(0) Error detected while processing function

Session restore multiple buffers

2009-05-22 Thread molecula21
Hi, i have the following map on my .vimrc (latest vim on linux): :map F5 :mks! ~/.vim/sessions/defaultsession.vim CR :map F6 :enewBARonly!BARsource ~/.vim/sessions/ defaultsession.vim CR if i have multiple tabs with files from different directories, after hittinh F5 and restart vim/gvim , when

Re: Using vim as interface to Wikipedia

2009-05-22 Thread Equinox86
you try to do yourself 2009/5/22 Andrey Zhidenkov andrey.zhiden...@gmail.com Hello, all. I want to use vim to edit Wikipedia articles. I found a syntax file for .wiki (http://www.vim.org/scripts/script.php?script_id=1787), but this is a syntax highlighting only. It will be great if there

Re: Using vim as interface to Wikipedia

2009-05-22 Thread vimml
Hello, your might want to check out Vimperator (http://vimperator.org/trac/wiki/Vimperator). Hitting C-I on any input fields opens up gvim. Regards, Kai -- All mail clients suck. This one just sucks less. --~--~-~--~~~---~--~~ You received this

Re: Including \k in a character collection in a pattern

2009-05-22 Thread A. S. Budden
2009/5/22 Equinox86 equino...@gmail.com: mmm this not work? [[...@] ? or this? [...@] ? I'm not sure what [[...@] translates as (it matches absolutely nothing in my source file!), but [...@] translates as either a k, an @ or a backslash, which is not what I intended. Al

Re: Including \k in a character collection in a pattern

2009-05-22 Thread Matt Wozniski
On Fri, May 22, 2009 at 4:23 AM, A. S. Budden wrote: When using patterns in vim, I often make use of the \k pattern to match any part of the keyword.  Is it possible to make a character collection that includes \k and other characters?  To clarify by way of an example: If I want to match

Re: Including \k in a character collection in a pattern

2009-05-22 Thread Andy Wokula
A. S. Budden schrieb: When using patterns in vim, I often make use of the \k pattern to match any part of the keyword. Is it possible to make a character collection that includes \k and other characters? sorry, you can't. instead of /foo[\k...]*bar you have to do

Re: Emulate a typewriter

2009-05-22 Thread Andy Wokula
Tom Link schrieb: Hi, What would be the best way to emulate this in vim: http://lifehacker.com/5263560/typewriter-forces-you-to-focus-while-you-write http://www.lifehackingmovie.com/2009/05/18/typewriter-minimal-text-editor-freeware/ I was thinking of putting vim into insert mode and

Re: Including \k in a character collection in a pattern

2009-05-22 Thread A. S. Budden
2009/5/22 Matt Wozniski m...@drexel.edu: On Fri, May 22, 2009 at 4:23 AM, A. S. Budden wrote: When using patterns in vim, I often make use of the \k pattern to match any part of the keyword.  Is it possible to make a character collection that includes \k and other characters?  To clarify by

Re: Including \k in a character collection in a pattern

2009-05-22 Thread A. S. Budden
2009/5/22 Andy Wokula anw...@yahoo.de: A. S. Budden schrieb: When using patterns in vim, I often make use of the \k pattern to match any part of the keyword.  Is it possible to make a character collection that includes \k and other characters? sorry, you can't.  instead of  

How to remap surrond.vim mappings (was Re: Hi,How to do it!)

2009-05-22 Thread Jeri Raye
Hi this is really usefull. But how do you remap the mappings from this surrond.vim ? I managed to get the mapping ysiw and then here the surrouding character working in gvim 7.2 on WinXP. (for some reason cs' doens't work] So Hello world changes in [ Hello ] world when I press ysiw[ But

Re: Change the size of buffers in vimdiff

2009-05-22 Thread Ben Fritz
On May 21, 5:42 am, Tony Mechelynck antoine.mechely...@gmail.com wrote: If you are on Windows (including Cygwin), you may also want to replace vimdiff in the above command by either vim.exe -d or gvim.exe -d with the .exe extension in order to bypass any *.bat wrappers. The single quotes

Re: sourcing of plugins in wrong order

2009-05-22 Thread Erik Wognsen
It makes me wonder: Does it ever serve a purpose to use ~/.vim/ftplugin/ instead of ~/.vim/after/ftplugin/ ? The only purpose I can think of would be to _replace_ a global filetype plugin with either your own or a more recent version from vim.sf.net.  By adding the appropriate code to a

Character encoding errors from latin-1 to utf-8

2009-05-22 Thread Tuomas Pyyhtiä
A friend of mine sent me text file containing some special glyphs I can't seem to get to display right on my system. We both use Vim 7.2. The main difference is that I have Vim (vim-gtk) installed on Kubuntu 9.04 whereas he has the default windows executable downloaded and configured under

Re: Emulate a typewriter

2009-05-22 Thread Erik Falor
On Fri, May 22, 2009 at 02:17:15AM -0700, Tom Link wrote: Hi, What would be the best way to emulate this in vim: http://lifehacker.com/5263560/typewriter-forces-you-to-focus-while-you-write http://www.lifehackingmovie.com/2009/05/18/typewriter-minimal-text-editor-freeware/ I was

Re: Change the size of buffers in vimdiff

2009-05-22 Thread Markus Heidelberg
Ben Fritz, 22.05.2009: On May 21, 5:42 am, Tony Mechelynck antoine.mechely...@gmail.com wrote: If you are on Windows (including Cygwin), you may also want to replace vimdiff in the above command by either vim.exe -d or gvim.exe -d with the .exe extension in order to bypass any *.bat

Searching/replacing a yanked chunk of code.

2009-05-22 Thread Leandro Camargo
Is there a way of replacing a term yanked in my buffer? Lets say I yanked this string yada yada yada to the 0 register (default). How can I use the content of register 0 to search or replace? Would be nice if I could do this: :%s/0//gc Any tips? Is that possible?

Re: Announcement: Vim Recipes - Free Cookbook

2009-05-22 Thread Matthew Winn
On Thu, 21 May 2009 17:28:57 -0700, Charlie Kester corky1...@comcast.net wrote: On Thu 21 May 2009 at 11:15:55 PDT Matthew Winn wrote: On Tue, 19 May 2009 14:29:33 -0700, Charlie Kester corky1...@comcast.net wrote: Another one that took a long time for me to learn was ^] which doesn't

Re: Searching/replacing a yanked chunk of code.

2009-05-22 Thread Kent Sibilev
On Fri, May 22, 2009 at 1:45 PM, Leandro Camargo leandro...@gmail.com wrote: Is there a way of replacing a term yanked in my buffer? Lets say I yanked this string yada yada yada to the 0 register (default). How can I use the content of register 0 to search or replace? Would be nice if I

Re: Searching/replacing a yanked chunk of code.

2009-05-22 Thread Leandro Camargo
Yah. I guess this is a good solution. Thanks, man! =] On Fri, May 22, 2009 at 2:52 PM, Kent Sibilev ksr...@gmail.com wrote: On Fri, May 22, 2009 at 1:45 PM, Leandro Camargo leandro...@gmail.com wrote: Is there a way of replacing a term yanked in my buffer? Lets say I yanked this string yada

Re: Character encoding errors from latin-1 to utf-8

2009-05-22 Thread Raúl Núñez de Arenas Coronado
Saluton Tuomas :) On Fri 22 May 2009 18:26 +0200, Tuomas Pyyhtiä t...@iki.fi dixit: 'Fileencodings' setting in my gvimrc is set as: set fileencodings=ucs-bom,utf-8,latin1 When I do :fileencoding? after have opened the file, I get latin1 as should. Of course, because cp1250 is a monobyte

Re: Searching/replacing a yanked chunk of code.

2009-05-22 Thread Tim Chase
Is there a way of replacing a term yanked in my buffer? Lets say I yanked this string yada yada yada to the 0 register (default). How can I use the content of register 0 to search or replace? Would be nice if I could do this: :%s/0//gc Any tips? Is that possible? Yes, you want the

Re: Character encoding errors from latin-1 to utf-8

2009-05-22 Thread Raúl Núñez de Arenas Coronado
Saluton Tuomas :) To open it correctly (and it worked for me), I launched Vim and issued :e ++enc=cp1250 AE.txt. I don't know how to do this on the command line, but if you have to work with a lot of cp1250 files you would have to add cp1250 to the list in fileencodings, before latin1.

Re: Searching/replacing a yanked chunk of code.

2009-05-22 Thread Leandro Camargo
Thanks, Tim! On Fri, May 22, 2009 at 2:59 PM, Tim Chase v...@tim.thechases.com wrote: Is there a way of replacing a term yanked in my buffer? Lets say I yanked this string yada yada yada to the 0 register (default). How can I use the content of register 0 to search or replace? Would be

Synchronized block mode insert

2009-05-22 Thread Erik Wognsen
I've seen this in the Mac editor TextMate: Block mode insert inserts the characters in all relevant lines _as you type_! It's by no means an important feature, but would look spiffy. I figured that when vim keeps different buffers for the same file synchronized as you type, doing this with lines

Re: Searching/replacing a yanked chunk of code.

2009-05-22 Thread David Fishburn
... However, it only dumps it in as if you typed it, so if you have metachars such as ., /, *, etc, you'd have to then go back and escape them.  For fixed text/space strings, it tends to work well, but if you have multiline or extra punctuation characters, you have to jump through some

Re: Character encoding errors from latin-1 to utf-8

2009-05-22 Thread Tuomas Pyyhtiä
On Fri, 22 May 2009 21:07:15 +0300, Raúl Núñez de Arenas Coronado raul...@gmail.com wrote: Saluton Tuomas :) Terve Raúl! To open it correctly (and it worked for me), I launched Vim and issued :e ++enc=cp1250 AE.txt. I don't know how to do this on the command line, but if you have to work

Re: Character encoding errors from latin-1 to utf-8

2009-05-22 Thread Raúl Núñez de Arenas Coronado
Terve Tuomas :) On Fri 22 May 2009 21:35 +0200, Tuomas Pyyhtiä t...@iki.fi dixit: On Fri, 22 May 2009 21:07:15 +0300, Raúl Núñez de Arenas Coronado raul...@gmail.com wrote: Terve Raúl! Thanks! I didn't know how to say hello in Finnish (I had to Google terve) :) And for the time

Re: Enable sql syntax in Shell script

2009-05-22 Thread KKde
Can someone please help here?? On May 21, 1:23 am, KKde khekadestro...@gmail.com wrote: Hi all, In our projects I write lot of sql's in shell script using slqplus command. Problem is sql syntax is not highlighted and it's difficult to read for me. The sql's are feeded to sqlplus using

Re: Enable sql syntax in Shell script

2009-05-22 Thread David Fishburn
On Wed, May 20, 2009 at 4:23 PM, KKde khekadestro...@gmail.com wrote: Hi all, In our projects I write lot of sql's in shell script using slqplus command. Problem is sql syntax is not highlighted and it's difficult to read for me. The sql's are feeded to sqlplus using heredoc's. Perhaps if

Re: Synchronized block mode insert

2009-05-22 Thread Andy Wokula
Erik Wognsen schrieb: I've seen this in the Mac editor TextMate: Block mode insert inserts the characters in all relevant lines _as you type_! It's by no means an important feature, but would look spiffy. I figured that when vim keeps different buffers for the same file synchronized as you

Re: Enable sql syntax in Shell script

2009-05-22 Thread Charles Campbell
KKde wrote: Hi all, In our projects I write lot of sql's in shell script using slqplus command. Problem is sql syntax is not highlighted and it's difficult to read for me. The sql's are feeded to sqlplus using heredoc's. 1. Does anyone tried to enable sql syntax in shell script??? 2. I

Re: Using vim as interface to Wikipedia

2009-05-22 Thread Marc Chantreux
On Fri, May 22, 2009 at 11:49:34AM +0400, Andrey Zhidenkov wrote: Hello, all. hello, i didn't tested it but i would try http://wikipediafs.sourceforge.net/ in your case. regards, marc --~--~-~--~~~---~--~~ You received this message from the vim_use maillist.

Re: Measuring file edit time

2009-05-22 Thread Steve Hall
On Thu, 2009-05-21 at 23:27 +0200, Tony Mechelynck wrote: In addition to everything suggested by other people, you might want to take a look at the |:profile| command. However, it requires the |+profile| feature, which means a Huge build, which in turn probably means compiling Vim

Re: Announcement: Vim Recipes - Free Cookbook

2009-05-22 Thread Charlie Kester
On Fri 22 May 2009 at 10:51:48 PDT Matthew Winn wrote: I'll say that again: It's a RIGHT bracket, and it takes you RIGHT to the definition of a function. Thanks, I get it now. Sorry for being dense! --~--~-~--~~~---~--~~ You received this message from the