Mapping Keys - What am I missing?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapping Keys - What am I missing?

Gavin Tomlins
Greetings All,
 
I'm embarrassed, but I'm not able to get map to work. I'm trying to
implement tip #28 and bind line numbering to Alt+N. I try both via command
mode (correct terminology??) and within the _vimrc file, though I'm unable
to produce the desired result.
 
Eg.
 
Example key bindings
 
map <F10> <ESC>:e "e:\program files\vim\_vimrc."<CR>
map <A-N> <ESC>:exe "s/^/."line(".")."/<CR>
 
 
I've tried the above with and without ESC etc, but to no avail eg.
map <A-N> :exe "s/^/."line(".")."/
 
Either mapping results in the menu obtaining focus, though it still does not
generate the desired results. Other key bindings appear to work eg. map <F6>
<C-W>w
 
If I type map <A-N> in the command mode, it correctly displays the string as
I think should work.
 
I'm running GVIM 6.3
OS is WinXP SP2
Vim plugins are BufExplorer, WinFileExplorer, WinManager, ZoomWin + default
plugins.
VIM directory is e:\program files\vim
 
 
Any insights would be greatly appreciated.
 
Regards
 
Gavin


Reply | Threaded
Open this post in threaded view
|

Re: Mapping Keys - What am I missing?

Michael Naumann
Gavin,


On Wednesday 17 August 2005 02:41, Gavin Tomlins wrote:

> Greetings All,
> ?
> I'm embarrassed, but I'm not able to get map to work. I'm trying to
> implement tip #28 and bind line numbering to Alt+N. I try both via command
> mode (correct terminology??) and within the _vimrc file, though I'm unable
> to produce the desired result.
> ?
> Eg.
> ?
> Example key bindings
> ?
> map <F10> <ESC>:e "e:\program files\vim\_vimrc."<CR>
> map <A-N> <ESC>:exe "s/^/."line(".")."/<CR>
> ?
> ?
> I've tried the above with and without ESC etc, but to no avail eg.
> map <A-N> :exe "s/^/."line(".")."/

1) are you aware that <A-N> is Alt-Shift-n ?
2) do not start them with <ESC>
3) do not put a filename inside stringquotes.
4) check your mapping with :map <A-N>, compare them to :map <A-n>

> ?
> Either mapping results in the menu obtaining focus, though it still does not
> generate the desired results. Other key bindings appear to work eg. map <F6>
> <C-W>w
> ?
> If I type map <A-N> in the command mode, it correctly displays the string as
> I think should work.

I do not know what you mean by this. "command mode" is the mode you are
in after you press <esc>. Where is what displayed?

> ?
> I'm running GVIM 6.3
> OS is WinXP SP2
> Vim plugins are BufExplorer, WinFileExplorer, WinManager, ZoomWin + default
> plugins.
> VIM directory is e:\program files\vim
> ?
> ?
> Any insights would be greatly appreciated.
> ?
> Regards
> ?
> Gavin
>
>
>

HTH, Michael


Reply | Threaded
Open this post in threaded view
|

Newbie: Question about abbreviate

Vu The Cuong
In reply to this post by Gavin Tomlins
I like the abbreviate feature of vim. But i'm still cofusing as following:
Ex:
First I register word: abbreviate da database
And then I only typed da+space then the "database" word appeared.
Then I saved and closed this file.
But when I reopen this file and retype da+space, the "database" word don't
appeared.
Could anyone teach me in detail how can I solve this problem.
I mean, once register a word with abbreviate, I want to use that registered
word forever on this file
and other files.
many thanks

Reply | Threaded
Open this post in threaded view
|

Re: Mapping Keys - What am I missing?

A.J.Mechelynck
In reply to this post by Gavin Tomlins
----- Original Message -----
From: "Gavin Tomlins" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 2:41 AM
Subject: Mapping Keys - What am I missing?


> Greetings All,
>
> I'm embarrassed, but I'm not able to get map to work. I'm trying to
> implement tip #28 and bind line numbering to Alt+N. I try both via command
> mode (correct terminology??) and within the _vimrc file, though I'm unable
> to produce the desired result.
>
> Eg.
>
> Example key bindings
>
> map <F10> <ESC>:e "e:\program files\vim\_vimrc."<CR>
> map <A-N> <ESC>:exe "s/^/."line(".")."/<CR>
>
>
> I've tried the above with and without ESC etc, but to no avail eg.
> map <A-N> :exe "s/^/."line(".")."/
>
> Either mapping results in the menu obtaining focus, though it still does
> not
> generate the desired results. Other key bindings appear to work eg. map
> <F6>
> <C-W>w
>
> If I type map <A-N> in the command mode, it correctly displays the string
> as
> I think should work.
>
> I'm running GVIM 6.3
> OS is WinXP SP2
> Vim plugins are BufExplorer, WinFileExplorer, WinManager, ZoomWin +
> default
> plugins.
> VIM directory is e:\program files\vim
>
>
> Any insights would be greatly appreciated.
>
> Regards
>
> Gavin

* "Alt+letter" key combinations are not reliably recognisable across all
OSs. First, try to map the same {rhs} to some portable {lhs} like <F5>. If
that works, then your {rhs} is correct. You may then try and see if the
'winaltkeys' option setting is not interfering with your Alt+N mapping.
* To execute a single Ex-command from Normal mode, no <Esc> is necessary.
From Insert mode, prefix it with <C-O>
* The syntax of your exe/substitute statement looks fishy. Referring back to
the original Tip #28, I see you swapped the first concatenation operator
with a quotation mark. Here is the original {rhs}with another {lhs}. Paste
it straight from this email and see if it works:

    :map    <F5>    :exe ":s/^/" . line(".") . "/"<CR>


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Question about abbreviate

Chris Allen
In reply to this post by Vu The Cuong
On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> I like the abbreviate feature of vim. But i'm still cofusing as following:
> Ex:
> First I register word: abbreviate da database
> And then I only typed da+space then the "database" word appeared.
> Then I saved and closed this file.
> But when I reopen this file and retype da+space, the "database" word don't
> appeared.

Commands typed/run while VIm is running only last as long as that
instance of Vim.  If you wish to make a setting persistent then it
must go in your vimrc file.  To add it to your vimrc you will need to
edit your vimrc.  The location of this file is operating system
dependent, so check ":help vimrc" in the online help for details on
where you need to create this file.  (Start vim and type ":help vimrc"
and hit return.)

Once you have your vimrc open you just need to add the command to it verbatim:

    abbreviate da database

And write the file.  The abbreviation will then work automatically in
the future.

Hope that helps,
Chris Allen
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Question about abbreviate

Vu The Cuong
It works immeadiately. many thanks.:)
----- Original Message -----
From: "Chris Allen" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, August 17, 2005 11:01 AM
Subject: Re: Newbie: Question about abbreviate


On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> I like the abbreviate feature of vim. But i'm still cofusing as following:
> Ex:
> First I register word: abbreviate da database
> And then I only typed da+space then the "database" word appeared.
> Then I saved and closed this file.
> But when I reopen this file and retype da+space, the "database" word don't
> appeared.

Commands typed/run while VIm is running only last as long as that
instance of Vim.  If you wish to make a setting persistent then it
must go in your vimrc file.  To add it to your vimrc you will need to
edit your vimrc.  The location of this file is operating system
dependent, so check ":help vimrc" in the online help for details on
where you need to create this file.  (Start vim and type ":help vimrc"
and hit return.)

Once you have your vimrc open you just need to add the command to it
verbatim:

    abbreviate da database

And write the file.  The abbreviation will then work automatically in
the future.

Hope that helps,
Chris Allen

Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Question about abbreviate

A.J.Mechelynck
In reply to this post by Vu The Cuong
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 3:24 AM
Subject: Newbie: Question about abbreviate


>I like the abbreviate feature of vim. But i'm still cofusing as following:
> Ex:
> First I register word: abbreviate da database
> And then I only typed da+space then the "database" word appeared.
> Then I saved and closed this file.
> But when I reopen this file and retype da+space, the "database" word don't
> appeared.
> Could anyone teach me in detail how can I solve this problem.
> I mean, once register a word with abbreviate, I want to use that
> registered
> word forever on this file
> and other files.
> many thanks

If you type

    :abbr da database

inside Vim, it will apply until you close Vim.

If you edit your vimrc file to add the line

    abbr da database

near its end, it will apply to all Vim sessions _started_ from then on.

If you don't yet have a vimrc, do

    :echo $HOME

inside Vim; the answer should be the name of a directory which, on multiuser
machines, should be "private" to your username (aka login name). Then, in
that directory, create a file named _vimrc or .vimrc (the dot is preferred
on Unix, the underscore on Windows, but if one of them isn't found Vim will
try the other). Here is a "starting stub" which you can then customize
according to your wishes:

    set nocompatible
    " uncomment the following if you want error messages
    " in English rather than in your "locale" language:
    " if has("unix")
    "     language messages C
    " else
    "     language messages en
    " endif
    runtime vimrc_example.vim
    " add your own customizations below

See also ":help vimrc"

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Question about abbreviate

Vu The Cuong
Thanks for your reply. It also worked for me.
And I have another question related to this:
If I register about 1000 words with abbreviate in vimrc file. This could
affects vim's startup speed
and operation speed?
If so is there another way to register without affect vim? I'm totally new
to vim so I don't know much.
many thanks.

----- Original Message -----
From: "Tony Mechelynck" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 11:14 AM
Subject: Re: Newbie: Question about abbreviate


> ----- Original Message -----
> From: "Vu The Cuong" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, August 17, 2005 3:24 AM
> Subject: Newbie: Question about abbreviate
>
>
> >I like the abbreviate feature of vim. But i'm still cofusing as
following:
> > Ex:
> > First I register word: abbreviate da database
> > And then I only typed da+space then the "database" word appeared.
> > Then I saved and closed this file.
> > But when I reopen this file and retype da+space, the "database" word
don't

> > appeared.
> > Could anyone teach me in detail how can I solve this problem.
> > I mean, once register a word with abbreviate, I want to use that
> > registered
> > word forever on this file
> > and other files.
> > many thanks
>
> If you type
>
>     :abbr da database
>
> inside Vim, it will apply until you close Vim.
>
> If you edit your vimrc file to add the line
>
>     abbr da database
>
> near its end, it will apply to all Vim sessions _started_ from then on.
>
> If you don't yet have a vimrc, do
>
>     :echo $HOME
>
> inside Vim; the answer should be the name of a directory which, on
multiuser
> machines, should be "private" to your username (aka login name). Then, in
> that directory, create a file named _vimrc or .vimrc (the dot is preferred
> on Unix, the underscore on Windows, but if one of them isn't found Vim
will

> try the other). Here is a "starting stub" which you can then customize
> according to your wishes:
>
>     set nocompatible
>     " uncomment the following if you want error messages
>     " in English rather than in your "locale" language:
>     " if has("unix")
>     "     language messages C
>     " else
>     "     language messages en
>     " endif
>     runtime vimrc_example.vim
>     " add your own customizations below
>
> See also ":help vimrc"
>
> Best regards,
> Tony.
>
>

Reply | Threaded
Open this post in threaded view
|

newbie: navigation opening file by Tab browse like ultraedit

Vu The Cuong
In reply to this post by Vu The Cuong
first. I'm sorry for my bad English.

I like the visual tab of ultraedit. which use to navigation to other file.
When you open multifiles, you only hit ctrl+tab and you can navigate to
other file.
is it possible to do that in VIm?
many thanks
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: "Chris Allen" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, August 17, 2005 11:05 AM
Subject: Re: Newbie: Question about abbreviate


> It works immeadiately. many thanks.:)
> ----- Original Message -----
> From: "Chris Allen" <[hidden email]>
> To: "Vu The Cuong" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Wednesday, August 17, 2005 11:01 AM
> Subject: Re: Newbie: Question about abbreviate
>
>
> On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> > I like the abbreviate feature of vim. But i'm still cofusing as
following:
> > Ex:
> > First I register word: abbreviate da database
> > And then I only typed da+space then the "database" word appeared.
> > Then I saved and closed this file.
> > But when I reopen this file and retype da+space, the "database" word
don't

> > appeared.
>
> Commands typed/run while VIm is running only last as long as that
> instance of Vim.  If you wish to make a setting persistent then it
> must go in your vimrc file.  To add it to your vimrc you will need to
> edit your vimrc.  The location of this file is operating system
> dependent, so check ":help vimrc" in the online help for details on
> where you need to create this file.  (Start vim and type ":help vimrc"
> and hit return.)
>
> Once you have your vimrc open you just need to add the command to it
> verbatim:
>
>     abbreviate da database
>
> And write the file.  The abbreviation will then work automatically in
> the future.
>
> Hope that helps,
> Chris Allen
>

Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

A.J.Mechelynck
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 4:37 AM
Subject: newbie: navigation opening file by Tab browse like ultraedit


> first. I'm sorry for my bad English.
>
> I like the visual tab of ultraedit. which use to navigation to other file.
> When you open multifiles, you only hit ctrl+tab and you can navigate to
> other file.
> is it possible to do that in VIm?
> many thanks
[...]

There is a project to alter the source to provide "tabbed editing". With the
existing ("official") versions of Vim; I use what I call "Rolodex Vim". To
use it, add

    set noequalalways winminheight=0 winheight=99999

to your vimrc. When in split-window mode, the current window will now expand
full-height, reducing and all other windows to a status line and nothing
else. These status lines are on top and bottom, like the tabs of an open
Rolodex.

- To open a "tab" with the mouse: click on it.
- To open the {count}th "tab" from top with the keyboard: {count}^Ww
- To go to the next "tab" (or from the last to the first): ^Ww
- To go to the previous "tab" (or from the first to the last): ^WW

where ^W means "press and hold Ctrl, press and release W, release Ctrl".

If Vim recognises the Ctrl-Tab and Ctrl-Shift-Tab combinations, you can map

    :map    <C-Tab>    <C-W>w
    :map    <C-S-Tab>    <C-W>W
    :imap    <C-Tab>    <C-O><C-W>w
    :imap    <C-S-Tab>    <C-O><C-W>W

If it doesn't recognise them, use other {lhs}es. I use F11 instead of
Ctrl-Tab and Shift-F11 instead of Ctrl-Shift-Tab.

HTH,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

Vu The Cuong
thanks. I'll try it now
----- Original Message -----
From: "Tony Mechelynck" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 12:24 PM
Subject: Re: newbie: navigation opening file by Tab browse like ultraedit


> ----- Original Message -----
> From: "Vu The Cuong" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, August 17, 2005 4:37 AM
> Subject: newbie: navigation opening file by Tab browse like ultraedit
>
>
> > first. I'm sorry for my bad English.
> >
> > I like the visual tab of ultraedit. which use to navigation to other
file.
> > When you open multifiles, you only hit ctrl+tab and you can navigate to
> > other file.
> > is it possible to do that in VIm?
> > many thanks
> [...]
>
> There is a project to alter the source to provide "tabbed editing". With
the
> existing ("official") versions of Vim; I use what I call "Rolodex Vim". To
> use it, add
>
>     set noequalalways winminheight=0 winheight=99999
>
> to your vimrc. When in split-window mode, the current window will now
expand

> full-height, reducing and all other windows to a status line and nothing
> else. These status lines are on top and bottom, like the tabs of an open
> Rolodex.
>
> - To open a "tab" with the mouse: click on it.
> - To open the {count}th "tab" from top with the keyboard: {count}^Ww
> - To go to the next "tab" (or from the last to the first): ^Ww
> - To go to the previous "tab" (or from the first to the last): ^WW
>
> where ^W means "press and hold Ctrl, press and release W, release Ctrl".
>
> If Vim recognises the Ctrl-Tab and Ctrl-Shift-Tab combinations, you can
map

>
>     :map    <C-Tab>    <C-W>w
>     :map    <C-S-Tab>    <C-W>W
>     :imap    <C-Tab>    <C-O><C-W>w
>     :imap    <C-S-Tab>    <C-O><C-W>W
>
> If it doesn't recognise them, use other {lhs}es. I use F11 instead of
> Ctrl-Tab and Shift-F11 instead of Ctrl-Shift-Tab.
>
> HTH,
> Tony.
>
>

Reply | Threaded
Open this post in threaded view
|

RE: newbie: navigation opening file by Tab browse like ultraedit

Bouckaert, Hugo
In reply to this post by Vu The Cuong
Hi

I just had a look at this option:

set noequalalways winminheight=0 winheight=99999

And implemented it in my _vimrc file. It is nice but what would be
really great is that, if you open any new file in any way (i.e. not
necessarily in a split window), you get a list of the files you have
open at the bottom of the screen, and with a mouse click you can then go
to that file.

At the moment, you have to do split file or sbuffer [buffer no]. Also,
sometimes the list of files appears on the bottom of the screen,
sometimes on top, depending on which file is open.

Would there be a way to have a "clickable" list of files always at the
bottom, for al files that have been opened, as indeed is the case in
UltraEdit? That would be great!
   
Thanks

Hugo
 

-----Original Message-----
From: Tony Mechelynck [mailto:[hidden email]]
Sent: Wednesday, 17 August 2005 11:25 AM
To: Vu The Cuong; [hidden email]
Subject: Re: newbie: navigation opening file by Tab browse like
ultraedit

----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 4:37 AM
Subject: newbie: navigation opening file by Tab browse like ultraedit


> first. I'm sorry for my bad English.
>
> I like the visual tab of ultraedit. which use to navigation to other
file.
> When you open multifiles, you only hit ctrl+tab and you can navigate
to
> other file.
> is it possible to do that in VIm?
> many thanks
[...]

There is a project to alter the source to provide "tabbed editing". With
the
existing ("official") versions of Vim; I use what I call "Rolodex Vim".
To
use it, add

    set noequalalways winminheight=0 winheight=99999

to your vimrc. When in split-window mode, the current window will now
expand
full-height, reducing and all other windows to a status line and nothing

else. These status lines are on top and bottom, like the tabs of an open

Rolodex.

- To open a "tab" with the mouse: click on it.
- To open the {count}th "tab" from top with the keyboard: {count}^Ww
- To go to the next "tab" (or from the last to the first): ^Ww
- To go to the previous "tab" (or from the first to the last): ^WW

where ^W means "press and hold Ctrl, press and release W, release Ctrl".

If Vim recognises the Ctrl-Tab and Ctrl-Shift-Tab combinations, you can
map

    :map    <C-Tab>    <C-W>w
    :map    <C-S-Tab>    <C-W>W
    :imap    <C-Tab>    <C-O><C-W>w
    :imap    <C-S-Tab>    <C-O><C-W>W

If it doesn't recognise them, use other {lhs}es. I use F11 instead of
Ctrl-Tab and Shift-F11 instead of Ctrl-Shift-Tab.

HTH,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

Chris Allen
In reply to this post by Vu The Cuong
On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> first. I'm sorry for my bad English.
>
> I like the visual tab of ultraedit. which use to navigation to other file.
> When you open multifiles, you only hit ctrl+tab and you can navigate to
> other file.
> is it possible to do that in VIm?
> many thanks

I would recommend minibufexpl, which you can get from

    http://www.vim.org/scripts/script.php?script_id=159

It provides a tab-style interface and takes extremely little screen
space.  This is a slightly more classical approach to tabs than Tony's
Rolodex Vim.  Best of all, it gives you the buffer number in the
display so that you can shift buffers without bothering with anything
so primitive as a mouse using the :b command.

To use it you will need to install it as a plugin, see :help
add-plugin for details.

HTH,
Chris Allen
Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

Vu The Cuong
Thanks Chris Allen for the useful info. I found vim become very fast having
tab function.
once again, thank you.
----- Original Message -----
From: "Chris Allen" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, August 17, 2005 2:37 PM
Subject: Re: newbie: navigation opening file by Tab browse like ultraedit


On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> first. I'm sorry for my bad English.
>
> I like the visual tab of ultraedit. which use to navigation to other file.
> When you open multifiles, you only hit ctrl+tab and you can navigate to
> other file.
> is it possible to do that in VIm?
> many thanks

I would recommend minibufexpl, which you can get from

    http://www.vim.org/scripts/script.php?script_id=159

It provides a tab-style interface and takes extremely little screen
space.  This is a slightly more classical approach to tabs than Tony's
Rolodex Vim.  Best of all, it gives you the buffer number in the
display so that you can shift buffers without bothering with anything
so primitive as a mouse using the :b command.

To use it you will need to install it as a plugin, see :help
add-plugin for details.

HTH,
Chris Allen

Reply | Threaded
Open this post in threaded view
|

RE: newbie: navigation opening file by Tab browse like ultraedit

Goli, Rajesh (Rajesh)
In reply to this post by Vu The Cuong
If you do not mind not seeing the tabs you can do this simply by mapping
Control-Tab and Shift-Tab to :bn and :bp.

nmap <C-Tab> :bnext<CR>
imap     <C-Tab> <ESC>:bnext<CR>i

nmap <S-Tab> :bprevious<CR>
imap     <S-Tab> <ESC>:bprevious<CR>i

-Rajesh

-----Original Message-----
From: Vu The Cuong [mailto:[hidden email]]
Sent: Wednesday, August 17, 2005 9:18 AM
To: [hidden email]
Subject: Re: newbie: navigation opening file by Tab browse like
ultraedit


thanks. I'll try it now
----- Original Message -----
From: "Tony Mechelynck" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 12:24 PM
Subject: Re: newbie: navigation opening file by Tab browse like ultraedit


> ----- Original Message -----
> From: "Vu The Cuong" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, August 17, 2005 4:37 AM
> Subject: newbie: navigation opening file by Tab browse like ultraedit
>
>
> > first. I'm sorry for my bad English.
> >
> > I like the visual tab of ultraedit. which use to navigation to other
file.
> > When you open multifiles, you only hit ctrl+tab and you can navigate to
> > other file.
> > is it possible to do that in VIm?
> > many thanks
> [...]
>
> There is a project to alter the source to provide "tabbed editing". With
the
> existing ("official") versions of Vim; I use what I call "Rolodex Vim". To
> use it, add
>
>     set noequalalways winminheight=0 winheight=99999
>
> to your vimrc. When in split-window mode, the current window will now
expand

> full-height, reducing and all other windows to a status line and nothing
> else. These status lines are on top and bottom, like the tabs of an open
> Rolodex.
>
> - To open a "tab" with the mouse: click on it.
> - To open the {count}th "tab" from top with the keyboard: {count}^Ww
> - To go to the next "tab" (or from the last to the first): ^Ww
> - To go to the previous "tab" (or from the first to the last): ^WW
>
> where ^W means "press and hold Ctrl, press and release W, release Ctrl".
>
> If Vim recognises the Ctrl-Tab and Ctrl-Shift-Tab combinations, you can
map

>
>     :map    <C-Tab>    <C-W>w
>     :map    <C-S-Tab>    <C-W>W
>     :imap    <C-Tab>    <C-O><C-W>w
>     :imap    <C-S-Tab>    <C-O><C-W>W
>
> If it doesn't recognise them, use other {lhs}es. I use F11 instead of
> Ctrl-Tab and Shift-F11 instead of Ctrl-Shift-Tab.
>
> HTH,
> Tony.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

A.J.Mechelynck
In reply to this post by Bouckaert, Hugo
----- Original Message -----
From: "Bouckaert, Hugo" <[hidden email]>
To: "Tony Mechelynck" <[hidden email]>; "Vu The Cuong"
<[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 7:33 AM
Subject: RE: newbie: navigation opening file by Tab browse like ultraedit


> Hi
>
> I just had a look at this option:
>
> set noequalalways winminheight=0 winheight=99999
>
> And implemented it in my _vimrc file. It is nice but what would be
> really great is that, if you open any new file in any way (i.e. not
> necessarily in a split window), you get a list of the files you have
> open at the bottom of the screen, and with a mouse click you can then go
> to that file.
>
> At the moment, you have to do split file or sbuffer [buffer no]. Also,
> sometimes the list of files appears on the bottom of the screen,
> sometimes on top, depending on which file is open.
>
> Would there be a way to have a "clickable" list of files always at the
> bottom, for al files that have been opened, as indeed is the case in
> UltraEdit? That would be great!
>
> Thanks
>
> Hugo

In gvim (not console vim) you can do that by "tearing off" the Buffers menu:
open the Buffers menu, click on the horizontal line with scissors on it,
then drag the menu to some place where it doesn't disturb you too much. One
drawback is that "torn-off" menus (which, from the OS's viewpoint, are popup
windows) are always displayed "above" the corresponding gvim window so you
may have to resize the latter to see what you type.

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: newbie: navigation opening file by Tab browse like ultraedit

Don Stefani
In reply to this post by Chris Allen
I tried it, I like it. For a Mac vim user who can't rip the menus from
the main window, this is really cool.

Thanks,

- dstefani

On 8/16/05, Chris Allen <[hidden email]> wrote:

> On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> > first. I'm sorry for my bad English.
> >
> > I like the visual tab of ultraedit. which use to navigation to other file.
> > When you open multifiles, you only hit ctrl+tab and you can navigate to
> > other file.
> > is it possible to do that in VIm?
> > many thanks
>
> I would recommend minibufexpl, which you can get from
>
>     http://www.vim.org/scripts/script.php?script_id=159
>
> It provides a tab-style interface and takes extremely little screen
> space.  This is a slightly more classical approach to tabs than Tony's
> Rolodex Vim.  Best of all, it gives you the buffer number in the
> display so that you can shift buffers without bothering with anything
> so primitive as a mouse using the :b command.
>
> To use it you will need to install it as a plugin, see :help
> add-plugin for details.
>
> HTH,
> Chris Allen
>