Gabirel / Hack-SpaceVim

🚀 Tell you how to hack SpaceVim. Be useful. Try Discussions!
MIT License
475 stars 68 forks source link

Disable mouse-using in SpaceVim #28

Open Gabirel opened 7 years ago

Gabirel commented 7 years ago

Disable mouse-using in SpaceVim

Introduction

Some just doesn't like mouse-using in vim. But SpaceVim enables it by default.

You can see details in :h mouse

How to disable it?

set mouse=

BTW, you can enable it by set mouse=a or by deleting your config about mouse since SpaceVim has default value.

Patola commented 2 years ago

How to make the change permanent? I've tried putting it in ~/.SpaceVim.d/autoload/xxx.vim and it still starts with mouse on.

Gabirel commented 2 years ago

@Patola The correct config file: ~/.SpaceVim.d/init.vim. Try this path.

Patola commented 2 years ago

It worked. Thank you very much.

Patola commented 3 months ago

It stopped working and I don't know why. I even added additional traps to unset mouse but it still does it:

$ cat ~/.SpaceVim.d/init.vim 
set mouse=

function! myspacevim#before() abort
  set mouse=
endfunction

function! myspacevim#after() abort
  set mouse=
endfunction
$ cat ~/.SpaceVim.d/autoload/patola.vim 
function! patola#before() abort
    let g:neomake_c_enabled_makers = ['clang']
    " you can defined mappings in bootstrap function
    " for example, use kj to exit insert mode.
    set mouse=
endfunction

function! patola#after() abort
    " you can remove key binding in bootstrap_after function
    set mouse=
endfunction

$ cat ~/.SpaceVim.d/autoload/myspacevim.vim 
function! myspacevim#before() abort
  set mouse=
endfunction

function! myspacevim#after() abort
  set mouse=
endfunction

And I still have to :set mouse= when I start. What's happening, how can I debug it? I did the git -C ~/.SpaceVim pull to update and it changed nothing. (Using SpaceVim with neovim)

Patola commented 3 months ago

in the end resolved by editting ~/.config/nvim/lua/core/init.lua and changing opt.mouse = "a" to opt.mouse = ""