On 3/21/07, Some user <[EMAIL PROTECTED]> wrote:
Hello, I'm new to Vim. I want to change the character before commands. For example saving is done by: :w <enter> Can it be made slightly easier by just pressing 'g' or some other key that's not taken? I don't know why every command has to be pre-pended by a difficult to reach character like colon. In an old text editor (I think one by Borland), you could save by pressing just one key, i.e. F2.
:nmap <f2> :w<cr> You *can" also map those keys which are native vim commands. There are many vim commands that you use rarely, and you can map them. But you can suffer from some side effects. For example, if you forget your mapping and try to use the mapped command for the original purpose. This happens. But still, it's sometimes convenient, and vim does not prohibit you from doing this. I might be flamed for this remark, but vim does not prohibit you from doing this, and this is sometimes convenient. Yakov