Closed GoogleCodeExporter closed 9 years ago
I left out a line in MyConqueStartup:
--------
function MyConqueStartup(term)
inoremap <silent> <buffer> <C-w>_ <Esc><C-w>_i
inoremap <silent> <buffer> <C-j> <Esc><C-w>j<C-w>_
inoremap <silent> <buffer> <C-k> <Esc><C-w>k<C-w>_
endfunction
Original comment by the.ashl...@gmail.com
on 17 Mar 2011 at 4:53
when I do <c-j> and <c-k> I want it to maximize my windows so that's why I have
the <c-w>_ tacked on to the maps.
I saw a problem that I would not enter insert mode (maybe another bug) when I
did this.
So I added the 'i' after the <c-w>_ mapping. Thats when the python errors
showed up.
Original comment by the.ashl...@gmail.com
on 17 Mar 2011 at 4:55
Looks like the main problem is that you're using the wrong hook. The
'buffer_leave' hooks are called when you're exiting a Conque buffer. You want
to define your new mappings when the Conque buffer is initialized.
The 'after_startup' hook will work for this.
I also just added a 'after_keymap' hook if you want to be really specific. E.g.:
function MyConqueMappings(term)
inoremap <silent> <buffer> <C-j> <Esc><C-w>j<C-w>_
inoremap <silent> <buffer> <C-k> <Esc><C-w>k<C-w>_
endfunction
call conque_term#register_function('after_keymap', 'MyConqueMappings')
This worked as expected for me.
Original comment by nicora...@gmail.com
on 17 Mar 2011 at 5:38
I've just down loaded r460. I'm not seeing any fix. Here's what I have:
----------
let g:ConqueTerm_CWInsert = 1 " allow <c-w> to work in insert mode
let g:ConqueTerm_InsertOnEnter = 1
function MyConqueKeyMappings(term)
inoremap <silent> <buffer> <C-w>_ <Esc><C-w>_
inoremap <silent> <buffer> <C-j> <Esc><C-w>j<C-w>_
inoremap <silent> <buffer> <C-k> <Esc><C-w>k<C-w>_
endfunction
call conque_term#register_function('after_keymap', 'MyConqueKeyMappings')
----------
when I <c-j> into the conque window, the conque window is correctly expanded,
however I don't InsertOnEnter, and when I do 'i'nsert I see the same errors.
Original comment by the.ashl...@gmail.com
on 17 Mar 2011 at 7:22
Ah, I think I misunderstood the problem. The correct way to handle this will
depend on your global mappings for <C-j> or <C-k>. In other words the mappings
being called when you're not in a Conque buffer.
This works for me, assuming your global mappings end with "i". Notice that
InsertOnEnter is commented out, it will break if on.
let g:ConqueTerm_CWInsert = 1
"let g:ConqueTerm_InsertOnEnter = 1
inoremap <C-j> <Esc><C-w>j<C-w>_i
inoremap <C-k> <Esc><C-w>k<C-w>_i
" over-write Conque Mappings for <C-j> and <C-k>
function MyConqueMappings(term)
inoremap <buffer> <C-j> <Esc><C-w>j<C-w>_i
inoremap <buffer> <C-k> <Esc><C-w>k<C-w>_i
endfunction
call conque_term#register_function('after_keymap', 'MyConqueMappings')
I still haven't been able to see any python errors, however. Is this *nix or
Windows, and what version of python are you using (2 or 3)?
Original comment by nicora...@gmail.com
on 17 Mar 2011 at 8:37
My global mapping is:
set winminheight=0
map <C-J> <C-W>j<C-W>_
map <C-K> <C-W>k<C-W>_
I don't want it to put me in insert mode except when I am entering a conque
shell window, and I would like to then still be able to get out of the conque
shell with this while in insert mode.
Original comment by the.ashl...@gmail.com
on 18 Mar 2011 at 12:38
Still haven't been able to reproduce errors.
Original comment by nicora...@gmail.com
on 15 Aug 2011 at 8:07
Original issue reported on code.google.com by
the.ashl...@gmail.com
on 17 Mar 2011 at 4:49