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

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 you

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: 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.

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 a

Re: Enable sql syntax in Shell script

2009-05-22 Thread David Fishburn
On Wed, May 20, 2009 at 4:23 PM, 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. Perhaps if you gave an example o

Re: Enable sql syntax in Shell script

2009-05-22 Thread KKde
Can someone please help here?? On May 21, 1:23 am, 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 anyo

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ä dixit: > On Fri, 22 May 2009 21:07:15 +0300, Raúl Núñez de Arenas Coronado > wrote: > > Terve Raúl! Thanks! I didn't know how to say "hello" in Finnish (I had to Google "terve") :) > And for the time being, I'm going to add c

Re: Can I disable clear auto-indent on enter?

2009-05-22 Thread sergio
:h pastetogle nnoremap :set invpaste paste? imap :set invpaste paste?a set pastetoggle= On 16 maio, 00:10, Gaarai wrote: > Great information Gary. Even though I've used Vim for a number of years > now, I still know so little about it. > > Chris Jeanhttp://gaarai.com/http://wp-roadmap.com/ >

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 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 with a

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

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 Leandro Camargo
Thanks, Tim! On Fri, May 22, 2009 at 2:59 PM, Tim Chase 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 cou

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 "lat

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 w

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ä 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 encoding and

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 wrote: > > On Fri, May 22, 2009 at 1:45 PM, Leandro Camargo 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 registe

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 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 could do this: >

Re: Announcement: Vim Recipes - Free Cookbook

2009-05-22 Thread Matthew Winn
On Thu, 21 May 2009 17:28:57 -0700, Charlie Kester 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 > > wrote: > > > >> Another one that took a long time for me to learn was ^] which doesn't > >> seem to have any obvious co

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: 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 > 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 > >

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

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 Win

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 t

Re: Change the size of buffers in vimdiff

2009-05-22 Thread Ben Fritz
On May 21, 5:42 am, Tony Mechelynck 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 are essential on Unix

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 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 I would like to remap ysiw to And then

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

2009-05-22 Thread A. S. Budden
2009/5/22 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 >

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

2009-05-22 Thread A. S. Budden
2009/5/22 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 >

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 mod

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 /foo\%(\k\|[...]\)

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 m

Re: Using vim as interface to Wikipedia

2009-05-22 Thread Andrey Zhidenkov
Ok. So what about vim plugins? I found CPAN modele for Perl, called CMS:MediaWiki, it's very nice. So I want to write some Perl scripts to aumomate task I wrote before. On Fri, May 22, 2009 at 01:55:45PM +0200, Equinox86 wrote: > you try to do yourself > > 2009/5/22 Andrey Zhidenkov > > >

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

2009-05-22 Thread A. S. Budden
2009/5/22 Equinox86 : > 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: 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 on any input fields opens up gvim. Regards, Kai -- All mail clients suck. This one just sucks less. --~--~-~--~~~---~--~~ You received this message

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

2009-05-22 Thread Equinox86
mmm this not work? [[...@] ? or this? [...@] ? 2009/5/22 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

Re: Using vim as interface to Wikipedia

2009-05-22 Thread Equinox86
you try to do yourself 2009/5/22 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 sc

Session restore multiple buffers

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

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 functi

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) > > /*

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 w

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! --~--~-~--~~~---~--~~

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 a

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 tex

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 Wikip

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 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: > >  :buf

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

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 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 it from buf