On 09/04/11 05:01, Rostyslaw Lewyckyj wrote:
1) Does ! have a single general meaning, when it is added
to a command? i.e. Can one make any prediction as to where
a ! may show up and how it may change the behaviour of
the base command?

For a command which writes to disk, adding ! usually forces a write. For a command which unloads a buffer, ! usually forces changes to be lost if there are any and 'autowrite' and 'autowriteall' are not set. There are others. In general: check the help and it will tell you.

2) Where and when is . needed as a concatenation operator?

In an expression. Not in the operands of :echo and friends if you want successive expressions to be separated by a single space. IOW,

        :echo 'foo' 'bar' 'baz'
or
        :echo 'foo' . ' ' . 'bar' . ' ' . 'baz'
or
        :echo 'foo bar baz'

all display the same text.

3) Are there any rules about the relationship of lower case
commands and upper case commands, such as: i vs I, d vs D,
visual vs Visual, etc.

They often have a relationship, but not always and not one that could be taught to a machine by one simple rule. Similarly Ctrl-letter and g followed by letter. Here also, when in doubt, look up the help.

Examples:

o       open after
O       open before
^O      move back in jump list
go      go to byte

p       put after
P       put before
^P      up (same as k)
gp      put after, leave cursor after new text
gP      put before, leave cursor after new text

v       start characterwise visual
V       start linewise visual
^V      start blockwise visual
gv      repeat previous visual

gh      start characterwise Select
gH      start linewise Select
g^H     start blockwise Select
h       left
H       top of window
^H      backspace

i       insert before cursor
I       insert before all lines of block-visual highlight
^I      tab
gi      insert text at same position as when Insert was last left
gI      insert text in column 1

a       append after cursor
A       append after all lines of block-visual highlight
^A      increment
ga      display ascii value

j       go down
J       join lines adding spaces
gJ      join lines adding no spaces
^J      same as j

q       start/stop recording
Q       start Ex mode
^Q      start block-visual (same as ^V)

r       replace one (or [count]) characters
R       start Replace mode
^R      redo
gr      virtual replace one (or [count]) characters
gR      start virtual replace

d       delete (followed by motion if not in Visual)
dd      delete line
D       delete to EOL (same as d$ )
^D      scroll downwards
gd      go to local declaration
gD      go to global declaration

c       change (+ motion if not in Visual)
cc      change line
C       change to EOL (same as c$ )
^C      interrupt

etc.


Best regards,
Tony.
--
... But the reward of a successful collaboration is a thing that cannot
be produced by either of the parties working alone.  It is akin to the
benefits of sex with a partner, as opposed to masturbation.  The latter
is fun, but you show me anyone who has gotten a baby from playing with
him or herself, and I'll show you an ugly baby, with just a whole bunch
of knuckles.
                -- Harlan Ellison

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to