[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: mapping in vi
Linux List forced the electrons to say:
> I found this very useful thing from some book.
> map #2 ^[:w^[^M
It should be map #2 ^[:w^M - There is an extra escape there which ruins
the whole mapping.
> different programs using a single keystroke.
> eg: map #9 ^[:w^[:!cc %^[:!./a.out^[
Same error here, repeated multiple times.
BTW, vim is much more advanced than the vi described in many Unix
books. In particular, there is a :make command in vim, and also something
called 'quickfix' mode, which parses your compiler error messages and
takes you to the line in which the error occured and so on.
For more details on vim, use :help. There is a lot of documentation that
comes with vim, browsable within vim.
For help on mappings, use :help map. For quickfix, use :help quickfix.
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. (binand@xxxxxxxxxxxxxxxxxxxxx)