As a windows user I use conque term as my vim terminal. Is there a way to disable the CursorHoldI and CursorMovedI autocmds when the buffer is a conque term. My vim script skills are basic , I 'm sure there is a line I can add to my vimrc.Thanks
Asked
Active
Viewed 1,126 times
0
-
"As a windows user I use conque term as my vim terminal." What does that even mean? – romainl Oct 20 '16 at 19:29
-
Can you give more information on the problem you are trying to solve? Do you mean that you use vim on Windows with the [vim-conque](https://github.com/basepi/vim-conque) plugin? – Tim Oct 20 '16 at 20:20
-
Unix users use TMUX and neovim does not support terminal on windows.So those two options are out of the question I get this warning when I open conque term and it seems to run slowly. http://tinypic.com/r/rhvmf5/9 – Daryus Oct 20 '16 at 21:12
-
Unix users don't "use tmux" and this seems to be a question for that plugin's issue tracker. – romainl Oct 21 '16 at 05:33
-
@romainl not sure why you are going off on a tangent.I use conque_term as my repl.YCM, Vim-surround etc use global autocmds when the cursor is moved, I don't need these when the buffer is conque_term and they slow down the repl. If I was using Unix I could use tmux as an alternative to switch from vim to a repl. I simply need a to disable the two autocmds when the buffer is conque_term – Daryus Oct 21 '16 at 17:26
1 Answers
0
I don't fully understand why you would need to do that, but the way to disable certain autocmds from firing is via the 'eventignore'
option. (Alternatively, you could delete the corresponding autocmds, but that would only work for buffer-scoped ones, not global ones, as you presumably want to keep the autocmds running in non-Conque buffers.)
The thing is, 'eventignore'
is a global setting, so you need another pair of autocmds to turn on / off the option, based on entering / leaving the Conque buffer.
Inside each Conque buffer, run this:
:autocmd WinEnter <buffer> set eventignore+=CursorHoldI,CursorMovedI
:autocmd WinLeave <buffer> set eventignore-=CursorHoldI,CursorMovedI

Ingo Karkat
- 167,457
- 16
- 250
- 324
-
Right thats in line with what I am looking for: to turn off spelling when the file is markdown I would use : autocmd FileType markdown setlocal syntax=off spell – Daryus Oct 21 '16 at 17:48
-
Is there an equivalent : autocmd BuffType Conque_term setlocal CursorHoldI,CursorMovedI disabled. the above didn't work – Daryus Oct 21 '16 at 17:50
-
I don't use the plugin - check for yourself, e.g. with `:setl buftype?` in the Conque buffer. Also note that the setup in my answer would have to be invoked for _each_ Conque buffer, so you'd have something along `:autocmd FileType ... autocmd WinEnter ...` – Ingo Karkat Oct 21 '16 at 17:55