On 5/9/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
By default, :cn should open a closed fold, and when executed as ":cn", it does so. But when :cn is the rhs of a map and the lhs of the map is typed, closed folds do not open. I think :cn should behave the same whether executed directly or as part of a map.
Sadly, this isn't the case. I can't remember the specifics, but I've discussed this with Bram. One solution is to add 'zv' at the end of the mapping, as this will show the fold. Perhaps you can use the new feedkeys()-function, using 'nt' for {mode}, as 't' makes sure that the keys get interpreted as if typed (and the 'n' makes sure they aren't remapped). Actually, this gives me an idea to fix the mapping that I had to add 'zv' to: noremap <silent> k <Esc>:call feedkeys('n', 'nt')<CR> (I use DVORAK, and I've swapped 't', 'n', and 's' with 'j', 'k', and 'l'.) Thanks! n.o.w.