How to center text in a comment box

2010-06-14 Thread Robbo
Hello, if I select a text area via visual mode, how to draw a 80 chars width comment box and center the selected text in it? For example: If I select the following text: GODMORING GUYS I obtain / *** * GOODMORING

Re: How to center text in a comment box

2010-06-14 Thread Ben Fritz
On Jun 14, 5:42 am, Robbo house...@gmail.com wrote: if I select a text area via visual mode, how to draw a 80 chars width comment box and center the selected text in it? Well, there's the DrawIt plugin, which may help with your task: http://www.vim.org/scripts/script.php?script_id=40 I

Re: how to count # of paragraphs

2010-06-14 Thread yosi izaq
:%s/\(\[\_p\{-}]\)\|\(\%^\|^\n\)\@=\(\p\+\n\)\{-1,}\ze\(^\n\|\%$\)//n BTW, I tested both :%s/\(\[\_p\{-}]\)\|\(\%^\|^\n\)\@=\(\p\+\n\)\{-1,}\ze\(^\n\|\%$\)//n and :%s/\(\[\_p\{-}]\)//n Both worked well for my file and returned the same number. Why do you need all the or part, match start and

Advice for easily switching ~/.vim?

2010-06-14 Thread Nathan Neff
Hello, Does anyone have a quick way to open Vim with a bare-bones ~/.vim directory and ~/.vimrc, etc? I'm developing a plugin, and before I publish a new version of the plugin, I like to test the plugin using a bare-bones ~./vimrc with my plugin installed. Currently, I use a shell-script to

Re: Advice for easily switching ~/.vim?

2010-06-14 Thread AK
On 06/14/2010 12:40 PM, Nathan Neff wrote: Hello, Does anyone have a quick way to open Vim with a bare-bones ~/.vim directory and ~/.vimrc, etc? I'm developing a plugin, and before I publish a new version of the plugin, I like to test the plugin using a bare-bones ~./vimrc with my plugin

Plugins - Accepted practices mapping conflicts

2010-06-14 Thread Nathan Neff
What are some good guidelines to follow when trying to map keys in a plugin? Currently I have the following setup in my plugin: I define a g:GrailsVimMapleader which defaults to leaderg Currently, all my plugin's commands are mapped to g:GrailsVimMapLeader + another character. This should help

Re: Plugins - Accepted practices mapping conflicts

2010-06-14 Thread Brett Stahlman
On Jun 14, 11:50 am, Nathan Neff nathan.n...@gmail.com wrote: What are some good guidelines to follow when trying to map keys in a plugin? Currently I have the following setup in my plugin: I define a g:GrailsVimMapleader which defaults to leaderg Currently, all my plugin's commands are

Re: Advice for easily switching ~/.vim?

2010-06-14 Thread Nathan Neff
On Mon, Jun 14, 2010 at 11:33 AM, AK andrei@gmail.com wrote: On 06/14/2010 12:40 PM, Nathan Neff wrote: Hello, Does anyone have a quick way to open Vim with a bare-bones ~/.vim directory and ~/.vimrc, etc? I'm developing a plugin, and before I publish a new version of the plugin, I

Re: Plugins - Accepted practices mapping conflicts

2010-06-14 Thread sc
On Monday 14 June 2010 11:50:18 Nathan Neff wrote: What are some good guidelines to follow when trying to map keys in a plugin? Currently I have the following setup in my plugin: I define a g:GrailsVimMapleader which defaults to leaderg Currently, all my plugin's commands are mapped

Re: Plugins - Accepted practices mapping conflicts

2010-06-14 Thread Nathan Neff
On Mon, Jun 14, 2010 at 12:36 PM, sc tooth...@swbell.net wrote: On Monday 14 June 2010 11:50:18 Nathan Neff wrote: What are some good guidelines to follow when trying to map keys in a plugin? Currently I have the following setup in my plugin: I define a g:GrailsVimMapleader which defaults

# in function/command name?

2010-06-14 Thread Nathan Neff
I've seen several plugins that use the pound character in the names of functions. Is there a special meaning of the pound character in function names? Thanks, --Nate -- 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: # in function/command name?

2010-06-14 Thread Erik Falor
On Mon, Jun 14, 2010 at 01:16:00PM -0500, Nathan Neff wrote: I've seen several plugins that use the pound character in the names of functions. Is there a special meaning of the pound character in function names? It has to do with autoloaded functions and variables. Read all about it at :he

show what I type in another window

2010-06-14 Thread Javier Rojas
Hi list, I'm going to make a presentation about vim, and I'd like to make a live demonstration of its functionality. Besides of typing and showing vim's marvels, I'd like the audience to see in some way what I'm typing. Do you know of any tool to do this? I Imagine such a tool as a multiplier of

Re: Advice for easily switching ~/.vim?

2010-06-14 Thread Joan Miquel Torres Rigo
2010/6/14 Nathan Neff nathan.n...@gmail.com: On Mon, Jun 14, 2010 at 11:33 AM, AK andrei@gmail.com wrote: [...] I just set the same thing up yesterday. I have a ~/.bvimrc, and ~/.testvim/, I run gvim -u ~/.bvimrc, and in .bvimrc I have this: set

Re: show what I type in another window

2010-06-14 Thread Joan Miquel Torres Rigo
GNU Screen is for you. http://www.gnu.org/software/screen/manual/ Look for the '-x' option (man screencr/-x). But be carefull because this way all clients could write to your terminal. I know there is another application that do the same but in read-only mode, but I don't remember its name

Re: Advice for easily switching ~/.vim?

2010-06-14 Thread Nathan Neff
On Mon, Jun 14, 2010 at 3:48 PM, Joan Miquel Torres Rigo joanmiq...@mallorcaweb.net wrote: 2010/6/14 Nathan Neff nathan.n...@gmail.com: On Mon, Jun 14, 2010 at 11:33 AM, AK andrei@gmail.com wrote: [...] I just set the same thing up yesterday. I have a ~/.bvimrc, and ~/.testvim/, I run

map C-1,C-2...C-= can't work except C-6, why? Vista+gVim V7.2

2010-06-14 Thread William Fugy
Hi list, Does anyone know why the following mapping can't work, and how to make it enable? Windows Vista + gVim V7.2 :map C-- C-Ww- :map C-= C-Ww+ ':map C--/C-=' and ':verbose map C--/C--=', it's OK. i.e. it's in the map list and hasn't been modified by others map.

Possible to make the + Register the default?

2010-06-14 Thread gustaffi
Hello Everybody, everytime I copy or paste something to another app or to vim in another terminal, I hit + to switch to the register the gnome apps can access. Is it possible to make that the defaiut register, so I can stop typing + all the time? Thanks, Gustaf -- View this message in context:

Re: Possible to make the + Register the default?

2010-06-14 Thread Christian Brabandt
On Tue, June 15, 2010 7:26 am, gustaffi wrote: everytime I copy or paste something to another app or to vim in another terminal, I hit + to switch to the register the gnome apps can access. Is it possible to make that the defaiut register, so I can stop typing + all the time? :h 'clipboard'

Re: Possible to make the + Register the default?

2010-06-14 Thread gustaffi
:h 'clipboard' Hmm.. this really explains how to make + the default register? If so, i dont get it. Christian Brabandt-3 wrote: On Tue, June 15, 2010 7:26 am, gustaffi wrote: everytime I copy or paste something to another app or to vim in another terminal, I hit + to switch to the