Hi all :)

When I reply to email I repeat many times the same action, which is to
go to some point in a block of quoted text, and then type the following:
"i><Left><CR><CR><Up><Up>çç<Down><CR>". That is, insert the quote
character (as many ">" as needed), break the line, go up to the block of
quoted text I was replying to, reformat it (I have "çç" remapped to
"gqip") and finally open a new line and start editing.

I'm going to write a map for it with a function that detects the current
quote level and character and inserts it for me, and I was wondering if
a version of "o/O" exists that instead of adding a new line below/above
the current one and going into insert mode just breaks the current line
and goes into insert mode.

It's just curiosity, I don't have the need of the command right now but
I hate to miss this kind of useful things. I've took a look at the help
without success :((

Moreover, in my map I want to do something like this (which doesn't
work):

nnoremap <buffer><Leader>o :while getline(".")[col(".") - 1] ==
'>'\|normal l\|endwhile<CR>

I remember having doing something similar using "if/else/endif", so I
don't know why this doesn't work. I've tried to use <Bar> instead of \|,
just in case, and some combinations of adding/removing spaces, colons,
etc. What am I doing wrong?

Since the mapping will do a whole lot of things I will putting all of
this in a function, so the while loop won't be an issue, but I want to
know why the above doesn't work, because I'm breaking my head.

Thanks a lot in advance!

-- 
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to