Spacevim: Make it easier to retain standard vim keybindings

Created on 18 Mar 2018  Â·  11Comments  Â·  Source: SpaceVim/SpaceVim

Expected behavior

With minimal effort I would like to retain or restore standard vim key-bindings. SpaceVim is trampling some pretty major key-bindings. In some cases I would agree, but for others it can be frustrating when you are use to the normal behavior.

The reproduce ways from Vim starting (Required!)

After installing SpaceVim attempt to use any of the following key-bindings to observe the differences from standard vim behavior. Below is a list of some of the settings that I found to be invasive on normal vim behavior. I personally think the 's' remap is useful, but the others are annoying.

let g:spacevim_unite_leader = 'f'
let g:spacevim_denite_leader = 'F'
let g:spacevim_windows_leader = 's'
let g:spacevim_enable_language_specific_leader = '1'
let g:spacevim_windows_smartclose = 'q'

Debug info

N/A

Screenshots

N/A

Proposal

It would be nice to have a single "vimcompatible" layer to provide alternative non-invasive key-binding alternatives. Alternatively I would be satisfied to simply have a list of settings that I should change to avoid overwriting the standard vim key-bindings

discussion

Most helpful comment

yes, This seems better. I will try to implement this feature later.

g:spacevim_vimcompatible will override the SpaceVim default option.

such as let g:spacevim_windows_leader, smartquit, etc.

but user can enable windows leader via

let g:spacevim_windows_leader = 's'

All 11 comments

let g:spacevim_unite_leader = 'f'
let g:spacevim_denite_leader = 'F'

these are removed.

s in normal mode are useless. and SpaceVim do not override it in visual mode.

use q to smart close windows is better.

BTW, you can change it to default.

s in normal mode are useless.

Couldn't agree more.

use q to smart close windows is better.

Statements like that subjective.

BTW, you can change it to default.

Yes, I am slowly finding and rectifying the key-bindings that interfere with normal vim operation. If this was done in a layer than suitable consistent alternatives could be used. I was impressed by the four pillars of SpaceVim, and would like that to influence how I override them.

This is a feature request that I believe others would enjoy as well.

One of the biggest reasons I choose SpaceVim rather than some of the other vim config frameworks was because of the high issue resolution rate. I am happy to contribute my time towards making a layer or otherwise contributing if I have some guidance. If you are only interesting in SpaceVim satisfying your own needs then I will likely try a different framework.

so what do you want? disable key binding of q?

but since spacevim last 7 release use this key binding. all SpaceVim user familiar with it now. why I should disable it by default. we have areally provide option for disable smart quit key binding.

do you means a vimcompatible layer?

I think you can edit basic.Vim in mode/. SpaceVim provides two mode:

  • basic
  • dark powered

why I should disable it by default.

No, I do not wish to change any of the default behavior. I understand that many are very accustomed to these SpaceVim customizations.

do you means a vimcompatible layer?

Yes, I would like to do something like a "vimcompatible" layer. I think the layer could be very simple; it should simply provide alternatives for these special SpaceVim key-bindings to avoid overwriting standard behavior.

I think you can edit basic.Vim in mode/.

It sounds like you are explaining that I can add lines to my "vimrc" that is sourced by SpaceVim. Yes I currently have something like that (although I haven't decided on good alternatives, ";f" is a terrible idea) in my init.vim.

If this layer is too simple, how about use only one option instead? for example:

let g:spacevim_vimcompatible = 1

You would certainly understand differences in complexity and flexibility between using a layer or an option much better than myself.

I think the option above would satisfy my needs. If it is implemented with the option but I wanted to let SpaceVim map over something (such as the useless 's') could I then do something like the following?

let g:spacevim_vimcompatible = 1
let g:spacevim_windows_leader = 's'

yes, This seems better. I will try to implement this feature later.

g:spacevim_vimcompatible will override the SpaceVim default option.

such as let g:spacevim_windows_leader, smartquit, etc.

but user can enable windows leader via

let g:spacevim_windows_leader = 's'

@NGenetzky I have implement the g:spacevim_vimcompatible in #1596 , but we can not support:

let g:spacevim_vimcompatible = 1
let g:spacevim_windows_leader = 's'

becasue the windows leader is definded when finish loadding custom config, so even if your g:spacevim_windows_leader is s, spacevim do not know if it is definded in your custom config file.

when g:spacevim_vimcompatible is 1, all these key bindings will be diabled.

Looks good. As an attempt to be a good user/reporter I have performed a light code review and also submitted some feedback on the wording in the documentation.

I appreciate your help, and I hope someday I can return the favor with a PR or something.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s97712 picture s97712  Â·  4Comments

Lobosque picture Lobosque  Â·  3Comments

zeroasterisk picture zeroasterisk  Â·  4Comments

zeroasterisk picture zeroasterisk  Â·  5Comments

dzintars picture dzintars  Â·  3Comments