Which is the best way of doing some mapping reuse?

2010-05-02 Thread Raúl Núñez de Arenas Coronado
Hi all :) Usually in my scripts I use constructs like this (just an example): nnoremap silentbuffer LocalLeaderKEY m'gg+yG'' imap silentbuffer LocalLeaderKEY C-\C-OLocalLeaderKEY ...maybe more mappings here for other modes... This way I put the logic only in one map (the nnoremap) one, and

Zen-coding for Vim?

2010-05-02 Thread Kim Schulz
Hi, I just came across a site about Zen-Coding today. http://code.google.com/p/zen-coding/ Basically it is some quite clever abbreviations to use in textMate and Netbeans and many others. Does anyone know if something similar exists for vim (not just abbr which I know exist, but the full package).

Re: Which is the best way of doing some mapping reuse?

2010-05-02 Thread John Little
On May 2, 10:45 pm, Raúl Núñez de Arenas Coronado raul...@gmail.com wrote: First one is copying and pasting the map... How about a level of indirection using :exe : let mapped = silentbuffer LocalLeaderKEY let mapping = m'gg\+yG\ exe 'nnoremap ' . mapped . mapping exe 'inoremap ' . mapped .

Re: Zen-coding for Vim?

2010-05-02 Thread Gregor Uhlenheuer
On 05/02/2010 01:52 PM, Kim Schulz wrote: Hi, I just came across a site about Zen-Coding today. http://code.google.com/p/zen-coding/ Basically it is some quite clever abbreviations to use in textMate and Netbeans and many others. Does anyone know if something similar exists for vim (not just

Re: Which is the best way of doing some mapping reuse?

2010-05-02 Thread Raúl Núñez de Arenas Coronado
On Sun, May 2, 2010 at 14:16, John Little john.b.lit...@gmail.com wrote: On May 2, 10:45 pm, Raúl Núñez de Arenas Coronado raul...@gmail.com wrote: First one is copying and pasting the map... How about a level of indirection using :exe : let mapped = silentbuffer LocalLeaderKEY let

Stair stepping

2010-05-02 Thread Harry Putnam
My setup: Linux (gentoo) 2.6.33-gentoo vim VIM - Vi IMproved 7.2 compile info inlined at the end of this post For some time now I've been noticing when I paste scripting code into vim I'm getting the stair stepping effect. It didn't used to a few mnts back.. I know about

Re: Problem with VIM syntax coloring

2010-05-02 Thread Tony Mechelynck
On 02/05/10 01:31, Jack Ripper wrote: Tony, My first reply was too quick. I noted that the curly braces are all colored correctly, but the parenthesis and brackets still are not colored. I'm wondering if the syntax of the vim file might be in error. I used syn match Brackets '[](){}' Any

Re: Problem with VIM syntax coloring

2010-05-02 Thread Tony Mechelynck
On 02/05/10 00:37, Peter Vanderhaden wrote: Tony, Thanks for the tip! I put the syn braces into the java.vim file, and it works perfectly! Peter V. Beware that you should NEVER change ANYTHING in the $VIMRUNTIME directory tree (i.e. in the $VIMRUNTIME directory or under it at any depth),

Re: Stair stepping

2010-05-02 Thread Tony Mechelynck
On 02/05/10 16:41, Harry Putnam wrote: My setup: Linux (gentoo) 2.6.33-gentoo vim VIM - Vi IMproved 7.2 compile info inlined at the end of this post For some time now I've been noticing when I paste scripting code into vim I'm getting the stair stepping effect. It

Re: Strange problem with netrw in vim 7.2 windows

2010-05-02 Thread Jack Donohue
- Original Message - From: Charles E Campbell Jr drc...@campbellfamily.biz To: vim_use@googlegroups.com Sent: Friday, April 30, 2010 10:44 PM Subject: Re: Strange problem with netrw in vim 7.2 windows Jack Donohue wrote: I use the x (execute) command a lot Netrw Directory Listing

Re: Windows 7 64bit - use 32bit or 64bit Vim?

2010-05-02 Thread Bram Moolenaar
George V. Reilly wrote: I regularily build my on Vim using VS 2008. I have just been upgraded to Windows 7 64bit and am beginning to set it up. Seems you always have to choose if you want (or can use) the 32bit version of software or find a 64bit version. Now, since I build my

Re: How to :new a window below the current window?

2010-05-02 Thread Tony Mechelynck
On 02/05/10 01:49, Peng Yu wrote: On May 1, 6:13 pm, Tim Chasev...@tim.thechases.com wrote: On 05/01/2010 05:59 PM, Peng Yu wrote: :new by default open a window above the current window. Is there a command to open a new window below the current one? You can use :below new which you

Re: Strange problem with netrw in vim 7.2 windows

2010-05-02 Thread Jack Donohue
Jack Donohue wrote: I use the x (execute) command a lot Netrw Directory Listing(netrw v132) Sorted by time Quick Help: F1:help -:go up dir D:delete R:rename s:sort-by x:exec

Re: automatically move cursor to after comment leader

2010-05-02 Thread Paul
I've never scripted Vim before, but I took a stab at this. Here's a version I put in my after/mail.vim. Could be better, especially the fudged detection of whether or not the cursor is currently after the comment leader, but it seems to work for now. let g:linelist = [1] :autocmd! :autocmd

set fo ignored in .vimrc

2010-05-02 Thread Aryeh M. Friedman
I am able to on a per file basis turn off the *(^*^( leading comment and such autoinsert feature (i.e. when editting do :set fo=) but when I do the same in my .vimrc it is completely ignored... -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the

Re: How to :new a window below the current window?

2010-05-02 Thread Peng Yu
On May 2, 12:52 pm, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 02/05/10 01:49, Peng Yu wrote: On May 1, 6:13 pm, Tim Chasev...@tim.thechases.com  wrote: On 05/01/2010 05:59 PM, Peng Yu wrote: :new by default open a window above the current window. Is there a command to

Re: How to :new a window below the current window?

2010-05-02 Thread Tony Mechelynck
On 02/05/10 22:35, Peng Yu wrote: On May 2, 12:52 pm, Tony Mechelynckantoine.mechely...@gmail.com wrote: On 02/05/10 01:49, Peng Yu wrote: On May 1, 6:13 pm, Tim Chasev...@tim.thechases.comwrote: On 05/01/2010 05:59 PM, Peng Yu wrote: :new by default open a window above the

Re: Vim Tip 1530

2010-05-02 Thread Tony Mechelynck
On 10/03/10 00:00, Paul wrote: On Tue, Mar 09, 2010 at 05:44:58PM +1100, John Beckett wrote: (2) See if you can make any map work: nnoremap \/ :echo 'This is the mapping'CR In Vim, select the above line and press y to copy it. Then type :@ to execute the line. Then type \/ You should see the

switch the line above the cursor and the line below the cursor

2010-05-02 Thread Peng Yu
I want to define a key shortcut switch the line above the cursor and the line below the cursor without affecting what is in the buffer (I mean the things copied by say 'yy'). Could you show me how to do it? Regards, Peng -- You received this message from the vim_use maillist. Do not top-post!

Re: switch the line above the cursor and the line below the cursor

2010-05-02 Thread Tim Chase
On 05/02/2010 06:55 PM, Peng Yu wrote: I want to define a key shortcut switch the line above the cursor and the line below the cursor without affecting what is in the buffer (I mean the things copied by say 'yy'). Could you show me how to do it? I usually use the following Ex :move commands:

naming convention of shortcut keys in vim

2010-05-02 Thread Peng Yu
I'm wondering where if there is any guideline in defining commands in vim. I've looked at index.txt. Although I could come up a command name and check it against index.txt, I'd like to stick to the naming convention in vim. Could you let me know what is the naming convention? -- You received

How to edit in the minibuffer?

2010-05-02 Thread xiaweitang
Hi, I have been using vim, then emacs, now vim again. In emacs, I can still use the editing commands like Alt+B in the command windows (mini buffer), but in vim I can't use the normal editting command. Am I missing something here? -- View this message in context:

Re: How to edit in the minibuffer?

2010-05-02 Thread Stahlman Family
xiaweitang wrote: Hi, I have been using vim, then emacs, now vim again. In emacs, I can still use the editing commands like Alt+B in the command windows (mini buffer), but in vim I can't use the normal editting command. Am I missing something here? :help cmdline-window Hope it helps...

Re: How to edit in the minibuffer?

2010-05-02 Thread Marc Weber
Excerpts from xiaweitang's message of Mon May 03 02:39:40 +0200 2010: Hi, I have been using vim, then emacs, now vim again. In emacs, I can still use the editing commands like Alt+B in the command windows (mini buffer), but in vim I can't use the normal editting command. Am I missing

\afnc map defined in align.vim plugin doesn't work as expected

2010-05-02 Thread KKde
Hi, \afnc map defined in Dr. chip's align.vim plugin doesn't work as expected. when I execute the map vim hangs. I need to press CTRL-c to unhang it. does anyone faced similar problem?? Regards, Kkde -- You received this message from the vim_use maillist. Do not top-post! Type your reply

Fwd: You have joined the group vim_use@googlegroups.com

2010-05-02 Thread Lissa Aguilar
-- Forwarded message -- From: Lissa Aguilar lissa.agui...@gmail.com Date: Sun, May 2, 2010 at 10:04 PM Subject: Re: You have joined the group vim_use@googlegroups.com To: vim_use vim_use+subconf...@googlegroups.com, v...@vim.org I have a question about the temporary files created

Re: You have joined the group vim_use@googlegroups.com

2010-05-02 Thread kp
Hi Lissa, You can set set nobackup in the .cshrc or _cshrc file. Then the backup files won't be created. Cheers, Krishna On Mon, May 3, 2010 at 7:37 AM, Lissa Aguilar lissa.agui...@gmail.comwrote: -- Forwarded message -- From: Lissa Aguilar lissa.agui...@gmail.com Date: Sun,

Re: Temporary files (was:Fwd: You have joined the group vim_use@googlegroups.com)

2010-05-02 Thread Tony Mechelynck
On 03/05/10 04:07, Lissa Aguilar wrote: -- Forwarded message -- From: Lissa Aguilarlissa.agui...@gmail.com Date: Sun, May 2, 2010 at 10:04 PM Subject: Re: You have joined the group vim_use@googlegroups.com To: vim_usevim_use+subconf...@googlegroups.com, v...@vim.org I have a