C-{ and C-} to change buffer

2 views
Skip to first unread message

matias

unread,
Nov 16, 2009, 9:41:56 AM11/16/09
to vim_mac
Hi!

Congratulations from MacVim, is a fantastic software!

I am far more used to use 'buffers' than to 'tabs' in VIM. Is there
any way to change the default mapping of C-{ and C-} to switch between
buffers instead of tabs?

I tried:

map! <D-{> :bnext <CR>
map! <D-}> :bprev <CR>

in my ~/.vimrc

with no luck.

thanks!
matias

björn

unread,
Nov 17, 2009, 12:11:32 PM11/17/09
to vim...@googlegroups.com
2009/11/16 matias:

>
> I am far more used to use 'buffers' than to 'tabs' in VIM.  Is there
> any way to change the default mapping of C-{ and C-} to switch between
> buffers instead of tabs?
>
> I tried:
>
> map! <D-{>      :bnext <CR>
> map! <D-}>      :bprev <CR>
>
> in my ~/.vimrc
>
> with no luck.

Hi Matias,

When a key is bound to a menu you first need to clear the menu binding
and this can only be done inside .gvimrc (_not_ .vimrc ... uh, at
least I don't think .vimrc will work). See ":h :macm" on how this is
done. Something like this should work (not tested):

macm Window.Select\ Next\ Tab key=nop
nmap <D-}> :bnext<CR>

macm Window.Select\ Previous\ Tab key=nop
nmap <D-{> :bprev<CR>


Björn

Matias Alejo Garcia

unread,
Nov 17, 2009, 1:17:36 PM11/17/09
to vim...@googlegroups.com


Thanks a lot!!

I worked fine, I just modified some small errors in the syntax:

macm  Window.Select\ Next\ Tab key=<nop>

nmap <D-}> :bnext<CR>

macm Window.Select\ Previous\ Tab key=<nop>
nmap <D-{> :bprev<CR>

in .gvimrc
Thanks a lot!!!

matías

PD: I found this biddings also great!
map <D-\|> :blast <CR>
map <D-+>  :BufExplorer<CR>
map <D-S-BS> :bdelete<CR>






 




--
Ing. Matías Alejo Garcia
@ematiu -  blog.matiu.com.ar
:wq
Reply all
Reply to author
Forward
0 new messages