56234enter in a map statement
- Jan 31, 2005Hi All!
I used this function on Linux a while ago:
" define a function for cycling the tabstops from 2 -> 4 -> 8 -> 2
set ts=4 sw=4
if &ts == 2
set ts=4 sw=4
elseif &ts == 4
set ts=8 sw=8
set ts=2 sw=2
" call the funciton via the ex style command ':TG<ret>'
command TG call Toggle_Tab_Width()
" set up Function-Key-1 to run the function. <F1> normally
" invokes help, but you can still get to that via :help.
map <F1> :TG^M
" Allow this to work in insert mode too.
map! <F1> <esc>:TG^Mli
But now I am in Windows with gvim - what should I use for the "^M" char to
represent "<enter>"? The page says "CTRL-V<return>" but that, of course, is
"paste" in windows...
Robert Mark Bram
Coles Myer Ltd. - e-Portal Team
Level 3, Module 3
800 Toorak Rd
Tooronga, VIC, 3146
Phone: (+613) 9829 6856
This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses. No warranty is made that this material is free from computer virus or any other defect or error. Any loss/damage incurred by using this material is not the sender's responsibility. The sender's entire liability will be limited to resupplying the material.
- Next post in topic >>