Re: vim function not first-class variable? how to create an alias for vim function ?

2011-07-07 Thread Marko Mahnič
On Jul 5, 10:24 am, pansz pan.shi...@gmail.com wrote: I want to do some coding like this: :func! Foobar(...) :endf :let s:myfuncname = Foobar :call s:myfuncname(1,2,3,4,5) if function name is first-class variable this should work, however it does not work. then is there any method to

Re: Deleting duplicate lines _without_ sorting

2011-07-07 Thread rameo
Hi Stefan, I found this one a few weeks ago. It does the job without sorting. :g/^/kl \|if search('^'.escape(getline('.'),'\.*[]^$/').'$','bW') \|'ld Regards, Rameo -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For

Re: Deleting duplicate lines _without_ sorting

2011-07-07 Thread Tim Chase
If the file is large, but the number of resulting unduplicated lines is manageably small (say a couple megs), you can do it in O(N) rather than O(N^2) or O(N*M) where N is the number of lines and M the number of duplicates. Just store each line in a dict as you process them and then delete

Re: Caps Lock indication

2011-07-07 Thread Erik Christiansen
On 06.07.11 21:53, Михаил Голубев wrote: Nice advices! Thanks a lot! I did a bit of googling and I think it's time come to dismiss this naughty key) Especially on laptops, mapping it to escape is a significant convenience, because escape is usually tiny and far away. Eliminating CapsLock is

Encoding issue

2011-07-07 Thread Михаил Голубев
Another question to wizards) I run gvim on Windows 7 Professional x86 so my default encoding is set to native cp1251. To avoid problems when opening files with Unicode encoding ('fileencoding') I want to change 'encoding' value to utf-8. But when I do so some standard messages in command line

Changing elements of a color scheme

2011-07-07 Thread Eric Weir
I've discovered a color scheme that I like better than the one I've been using since starting with Vim/MacVim a few months ago. However, there's one element that clashes for me -- the color of the cursor. I know what color I'd like it to be, i.e., the color that CameCase words get in a plugin

Re: Changing elements of a color scheme

2011-07-07 Thread Reid Thompson
On Thu, 2011-07-07 at 10:26 -0400, Eric Weir wrote: I've discovered a color scheme that I like better than the one I've been using since starting with Vim/MacVim a few months ago. However, there's one element that clashes for me -- the color of the cursor. I know what color I'd like it to

Re: Changing elements of a color scheme

2011-07-07 Thread Charles Campbell
Eric Weir wrote: I've discovered a color scheme that I like better than the one I've been using since starting with Vim/MacVim a few months ago. However, there's one element that clashes for me -- the color of the cursor. I know what color I'd like it to be, i.e., the color that CameCase

Re: Encoding issue

2011-07-07 Thread Ben Fritz
On Jul 7, 7:49 am, Михаил Голубев qsolo...@gmail.com wrote: Another question to wizards) I run gvim on Windows 7 Professional x86 so my default encoding is set to native cp1251. To avoid problems when opening files with Unicode encoding ('fileencoding') I want to change 'encoding' value to

Re: Deleting duplicate lines _without_ sorting

2011-07-07 Thread Ben Fritz
On Jul 6, 4:02 am, Stefan Klein st.fankl...@googlemail.com wrote: Hi vim users, i got a longer SQL script with duplicate inserts :/ I'd like to remove those without sorting the whole file. It's possible to match the lines by a pattern. One solution might be to insert the line number at

Aw: Re: Aw: Re: vim function not first-class variable? how to create an alias for vim function ?

2011-07-07 Thread lith
Am Mittwoch, 6. Juli 2011 19:34:05 UTC+2 schrieb ZyX: There are anonymous functions (:h numbered-function): let s:F={} function s:F.func() echo Here endfunction . It is not possible to call anonymous function without a reference to it and you can't create the

Re: Aw: Re: Aw: Re: vim function not first-class variable? how to create an alias for vim function ?

2011-07-07 Thread ZyX
Reply to message «Aw: Re: Aw: Re: vim function not first-class variable? how to create an alias for vim function ?», sent 20:01:56 07 July 2011, Thursday by lith: Such anonymous dictionary functions a.k.a. numbered functions can be called by there name too. You can thus do the following: I

Re: Changing elements of a color scheme

2011-07-07 Thread Eric Weir
On Jul 7, 2011, at 11:14 AM, Charles Campbell wrote: May I suggest a few plugins: * to identify the name of the syntax item that you want to change colors for: hilinks.vim: http://mysite.verizon.net/astronaut/vim/index.html#HILINKS This one provides the :HLT! command -- with it

Re: Changing elements of a color scheme

2011-07-07 Thread Eric Weir
On Jul 7, 2011, at 11:14 AM, Charles Campbell wrote: May I suggest a few plugins: * to identify the name of the syntax item that you want to change colors for: hilinks.vim: http://mysite.verizon.net/astronaut/vim/index.html#HILINKS Charles, I don't see how to get the plugin. When I

Re: Changing elements of a color scheme

2011-07-07 Thread ZyX
Reply to message «Re: Changing elements of a color scheme», sent 23:10:24 07 July 2011, Thursday by Eric Weir: HiLinkTrace (header) is a link itself pointing to http://mysite.verizon.net/astronaut/vim/vbafiles/hilinks.vba.gz. Original message: On Jul 7, 2011, at 11:14 AM, Charles Campbell

Re: Changing elements of a color scheme

2011-07-07 Thread Benjamin R. Haskell
On Thu, 7 Jul 2011, Eric Weir wrote: On Jul 7, 2011, at 11:14 AM, Charles Campbell wrote: May I suggest a few plugins: * to identify the name of the syntax item that you want to change colors for: hilinks.vim: http://mysite.verizon.net/astronaut/vim/index.html#HILINKS Charles, I don't

Re: Changing elements of a color scheme

2011-07-07 Thread Eric Weir
On Jul 7, 2011, at 3:25 PM, Benjamin R. Haskell wrote: On Thu, 7 Jul 2011, Eric Weir wrote: On Jul 7, 2011, at 11:14 AM, Charles Campbell wrote: May I suggest a few plugins: * to identify the name of the syntax item that you want to change colors for: hilinks.vim:

Re: Changing elements of a color scheme

2011-07-07 Thread Benjamin R. Haskell
On Thu, 7 Jul 2011, Eric Weir wrote: On Jul 7, 2011, at 3:25 PM, Benjamin R. Haskell wrote: On Thu, 7 Jul 2011, Eric Weir wrote: On Jul 7, 2011, at 11:14 AM, Charles Campbell wrote: hilinks.vim: http://mysite.verizon.net/astronaut/vim/index.html#HILINKS Thanks, Ben. I'm confused. I was

Announcing ri.vim interactive ri mode for Vim

2011-07-07 Thread Daniel Choi
Hi everyone, I published a new Vim plugin / Ruby gem, ri.vim. It's an interactive ri mode for Vim. ri is the command line documentation printer for Ruby. http://danielchoi.com/software/ri_vim.html Beta-tester feedback would be great. Many thanks, -- You received this message from the vim_use

Re: Python plugin using PyWin32

2011-07-07 Thread Alexandre Martani
On Wednesday, July 06, 2011 7:35:21 PM, Vlad Irnov wrote: On Jun 30, 10:35 am, Alexandre Martanialexandre.mart...@gdx.com.br wrote: Hello all, I am trying to use Vim R plugin [1], which is a Python plugin that uses PyWin32 on Windows. I have installed Python 2.7.1 and PyWin32. It is installed

Re: Announcing ri.vim interactive ri mode for Vim

2011-07-07 Thread Sung Pae
On Thu, Jul 7, 2011 at 2:55 PM, Daniel Choi dhc...@gmail.com wrote: I published a new Vim plugin / Ruby gem, ri.vim. It's an interactive ri mode for Vim. ri is the command line documentation printer for Ruby. http://danielchoi.com/software/ri_vim.html Beta-tester feedback would be great.

Go to start/end of a method in C++?

2011-07-07 Thread Toby Walsh
Hi, First post to the list so be easy on me. I'm trying to write some functions to automate my commenting process in C++. Reading the help, I would like to use the motion commands ]m, ]M, [m and/or [M for jumping around to starts and ends of function definitions. If I define all my functions

Re: Vim statusline examples with screenshots?

2011-07-07 Thread Jacky Liu
Jason Timrod wrote: Hi all, I'm curious to know how people pimp their Vim statusline perhaps with useful information?  So far, the only thing I've added to it is the current git branch I'm on.  Yet I know there's probably other really cool bits of information I'm missing, besides the

Re: Announcing ri.vim interactive ri mode for Vim

2011-07-07 Thread Daniel Choi
Thank you very much for the feedback. It's very valuable. I'll look into the other installation method. I thought `gem install` was more convenient than finding the plugin on the website and then downloading it manually. Maybe I'm wrong. OK I mapped the K command on loading any *.rb file. It's

Is there any __FILE__, __FUNCTION__, __LINE__ equivalent for vim script?

2011-07-07 Thread pansz
For debug reason we often need to print the current script name, function name and line number. suppose vim script is a program, is it possible to get the current script name and the current execution line in vim script? is there any functions of macros to get them? -- You received this message

Re: Python plugin using PyWin32

2011-07-07 Thread Vlad Irnov
On Jul 7, 4:40 pm, Alexandre Martani alexandre.mart...@gdx.com.br wrote: On Wednesday, July 06, 2011 7:35:21 PM, Vlad Irnov wrote: On Jun 30, 10:35 am, Alexandre Martanialexandre.mart...@gdx.com.br wrote: Hello all, I am trying to use Vim R plugin [1], which is a Python plugin that

Re: Is there any __FILE__, __FUNCTION__, __LINE__ equivalent for vim script?

2011-07-07 Thread Ben Fritz
On Jul 7, 8:39 pm, pansz pan.shi...@gmail.com wrote: For debug reason we often need to print the current script name, function name and line number. suppose vim script is a program, is it possible to get the current script name and the current execution line in vim script? is there any

Re: Is there any __FILE__, __FUNCTION__, __LINE__ equivalent for vim script?

2011-07-07 Thread Benjamin R. Haskell
On Fri, 8 Jul 2011, ZyX wrote: Reply to message «Re: Is there any __FILE__, __FUNCTION__, __LINE__ equivalent for vim script?», sent 07:17:03 08 July 2011, Friday by Ben Fritz: sfile and slnum will give you __FILE__ and __LINE__. I don't think there's a __FUNCTION__ but I could be wrong.

Re: Vim statusline examples with screenshots?

2011-07-07 Thread Jeffrey 'jf' Lim
On Thu, Jul 7, 2011 at 11:11 AM, Steve Hall digit...@dancingpaper.comwrote: Mine shows 21 items in logical groupings that are still easily readable. A number of these features are particular to our customization, but all are extrapolations of basic Vim capabilities: