simpleterm.vim icon indicating copy to clipboard operation
simpleterm.vim copied to clipboard

<up> key for terminal history

Open linqiaozhi opened this issue 5 years ago • 7 comments

Thank you for the excellent plugin.

However, when typing in the terminal, pressing the <up> arrow key does not let me see my last command. Instead, it says:

E21: Cannot make changes, 'modifiable' is off

When I disable this plugin, the <up> and <down> keys for scrolling through the history work as normal. Is there a workaround? Notably, the history command still works--so history is being collected, it seems the keymapping is just messed up somehow.

linqiaozhi avatar Jul 17 '18 21:07 linqiaozhi

my here works fine. (I'm using hkbb's <Fn>+hjkl + zsh

I haven't map any other keys with plugin (it's really simple you can check the plugin through

check your up mapping with :nmap <up> or terminal settings

gu-fan avatar Jul 18 '18 15:07 gu-fan

:nmap <up> gives 'No mapping found.'

I have the same issue on multiple terminals across OS X and Linux, all of which are using default settings. And it only happens when the plugin is enabled.

It's not only <up> but any of the arrow keys causes it to exist "insert mode" of the terminal, i.e. as if I hit <esc> or <ctrl>+W+N.

linqiaozhi avatar Jul 20 '18 13:07 linqiaozhi

so you met problems on OS X and Linux? I'm using it in OS X.

You can try uncomment all the mapping / commands in the plugin and see if things are different.

https://github.com/gu-fan/simpleterm.vim/blob/master/plugin/simpleterm.vim#L367

gu-fan avatar Jul 21 '18 17:07 gu-fan

I commented out the following line, and that fixed it.

https://github.com/gu-fan/simpleterm.vim/blob/669d46d4ef92caef8764aea71839ae46e3fb5c9a/plugin/simpleterm.vim#L388-L391

Not sure why--but that is definitely the problem.

Feel free to close, since you can't replicate it. I have a Macbook Pro running High Sierra.

linqiaozhi avatar Jul 23 '18 01:07 linqiaozhi

fine leave it here if someone find it useful I will remove that line later

gu-fan avatar Jul 23 '18 03:07 gu-fan

Thanks. I had to disable this plugin too because arrow navigation was broken. I'm using OS X 10.14.3 with iTerm 3.2.7 and I'm having the issue as well.

Arrow keys get messed up. Pushing down arrow pulls me out of terminal insert mode into terminal normal mode.

eugeneware avatar Mar 04 '19 10:03 eugeneware

^ Noticed same issue on OS X 10.14.4 using iTerm 3.2.1.

kennylouie avatar Sep 18 '19 04:09 kennylouie