Mapped vim shortcuts
  Home FAQ Contact Sign in
comp.editors only
 
Advanced search
POPULAR GROUPS

more...

comp.editors Profile…
 Up
Mapped vim shortcuts         


Author: Felix Karpfen
Date: Jun 5, 2008 14:18

The "map" commands on my version of Vim [Vi IMproved 7.0 (2006 May
7, compiled Jan 31 2007 17:43:00)] displays 2 pages of shortcuts. A
few relate to plugins that I have installed. Many - such as - "n ,gq
:%%s/\s\+/ /ggq1G" are a bonus that comes with the Vim package.

Is there any documentation (for beginners) that spells out what these
free gifts do?

Felix Karpfen

--
Felix Karpfen
Public Key 72FDF9DF (DH/DSA)
6 Comments
Re: Mapped vim shortcuts         


Author: John Beckett
Date: Jun 5, 2008 19:25

Felix Karpfen wrote:
>The "map" commands on my version of Vim [Vi IMproved 7.0 (2006 May
>7, compiled Jan 31 2007 17:43:00)] displays 2 pages of shortcuts. A
>few relate to plugins that I have installed. Many - such as - "n ,gq
>:%%s/\s\+/ /ggq1G" are a bonus that comes with the Vim package.
>
>Is there any documentation (for beginners) that spells out what these
>free gifts do?

Sorry, but not really. I don't think it's correct to say that mappings
come with Vim (I don't recognise your example). You need to examine
your vimrc file and the actual scripts for your plugins. Many plugins
have quite good comments (you don't need to read the code) that
explain what is going on. Also, many plugins have topics that you can
access via :help and they may explain the mappings.

BTW 7.0 is considered ancient now. For example, it is probably
vulnerable to malicious/joke modelines in text files you might open.

John
no comments
Re: Mapped vim shortcuts         


Author: Felix Karpfen
Date: Jun 8, 2008 15:27

On 2008-06-06, John Beckett wrote:
> Felix Karpfen wrote:
>>The "map" commands on my version of Vim [Vi IMproved 7.0 (2006 May
>>7, compiled Jan 31 2007 17:43:00)] displays 2 pages of shortcuts.
>>
SNIP
>>Is there any documentation (for beginners) that spells out what these
>>free gifts do?
>
> Sorry, but not really. I don't think it's correct to say that mappings
> come with Vim (I don't recognise your example). You need to examine
> your vimrc file and the actual scripts for your plugins.

SNIP
>
> BTW 7.0 is considered ancient now. For example, it is probably
> vulnerable to malicious/joke modelines in text files you might open.
>

Thank you for the advice. It appears that I asked the wrong question.
Show full article (1.18Kb)
no comments
Re: Mapped vim shortcuts         


Author: John Beckett
Date: Jun 8, 2008 20:02

Felix Karpfen wrote:
>The Debian package includes a great many plugins; listing these plugins
>needs more than 3 screens. Is there anyway that I can find out which of
>these plugins have actually been loaded?

Any *.vim files in a plugin directory are loaded when Vim starts, and
others can be loaded on demand. The following command lists scripts
that have run:

:scriptnames

but it includes stuff you might in fact not have used (from a plugin
directory).

John
no comments
Re: Mapped vim shortcuts         


Author: Felix Karpfen
Date: Jun 10, 2008 15:15

On 2008-06-09, John Beckett wrote:
> Felix Karpfen wrote:
>>The Debian package includes a great many plugins; listing these plugins
>>needs more than 3 screens. Is there anyway that I can find out which of
>>these plugins have actually been loaded?
>
> Any *.vim files in a plugin directory are loaded when Vim starts, and
> others can be loaded on demand. The following command lists scripts
> that have run:
>
>:scriptnames

That is what I needed to know.

":scriptnames" lists 26 plugins; I loaded 7 and Vim loaded the other 19!

Now I have a chance of discovering the meanings of the mysterious
mappings!
>
Thank you.
Show full article (0.81Kb)
no comments
Re: Mapped vim shortcuts         


Author: Gary Johnson
Date: Jun 10, 2008 16:48

Felix Karpfen webone.com.au> wrote:
> On 2008-06-09, John Beckett wrote:
>> Felix Karpfen wrote:
>>>The Debian package includes a great many plugins; listing these plugins
>>>needs more than 3 screens. Is there anyway that I can find out which of
>>>these plugins have actually been loaded?
>>
>> Any *.vim files in a plugin directory are loaded when Vim starts, and
>> others can be loaded on demand. The following command lists scripts
>> that have run:
>>
>>:scriptnames
>
>
> That is what I needed to know.
>
> ":scriptnames" lists 26 plugins; I loaded 7 and Vim loaded the other 19!
>
> Now I have a chance of discovering the meanings of the mysterious
> mappings! ...
Show full article (0.88Kb)
no comments
Re: Mapped vim shortcuts         


Author: Felix Karpfen
Date: Jun 12, 2008 15:10

On 2008-06-10, Gary Johnson eskimo.com> wrote:
> Felix Karpfen webone.com.au> wrote:
>> On 2008-06-09, John Beckett wrote:
>>> Felix Karpfen wrote:
>>>>The Debian package includes a great many plugins; listing these plugins
>>>>needs more than 3 screens. Is there anyway that I can find out which of
>>>>these plugins have actually been loaded?
> On newer vims, maybe yours, you can find out where each mapping is defined
> by prefixing the :map command with :verbose, like this:
>
> :verbose map
>

Works like a charm.

For the record, the sample mapping that I quoted in my original query
comes from the "justify.vim" plugin - which, as I surmised, is a Vim
bonus on my install.

Thank you for the advice.

Felix
Show full article (0.81Kb)
no comments