Spacevim: Discussion about better default

Created on 23 Feb 2018  ·  22Comments  ·  Source: SpaceVim/SpaceVim

I want to make SpaceVim out of box. which means The default config should be only needed by all users.

discussion

Most helpful comment

@SpaceVim/developers
In current version: 8a79b07732f9e2e3ff3d6e1495a4a6c24653dba9 , I only enable these layers, and it is only 56 plugins. in v0.6.0, it is 200+

  call SpaceVim#layers#load('autocomplete')
  call SpaceVim#layers#load('checkers')
  call SpaceVim#layers#load('format')
  call SpaceVim#layers#load('edit')
  call SpaceVim#layers#load('ui')
  call SpaceVim#layers#load('core')
  call SpaceVim#layers#load('core#banner')
  call SpaceVim#layers#load('core#statusline')
  call SpaceVim#layers#load('core#tabline')

All 22 comments

https://github.com/sei40kr/dotfiles/blob/master/_SpaceVim.d/init.vim
This is my SpaceVim config.

  • Search Ruby and Python in asdf, pyenv to make sure that SpaceVim uses user-installed versions.
  • Change the leader key to ; because it's comfortable on JP layout keyboard.
  • Search libclang installed via Homebrew/Linuxbrew to avoid errors on both environment.
  • Disable neosnippet in web-related languages, because Emmet is more useful.
  • Enable deoplete path completions from buffer directory (not current directory).
  • Disable LSP diagnostics because it's buggy when used with Neomake.
  • Create empty autocmds for vim-multiple-cursors to avoid warning on exit. (This almost seems to be vim-multiple-cursors issue)

@sei40kr Thanks for you info, and I just create a new PR about the better default configration. In this PR, I will change some vim options and SpaceVim layers. all language specific layers will be disabled. these should be enabled only by users themself.

the list of layers I want to enabled is:

  1. autocomplete: for auto completion.
  2. checkers: for syntax checking
  3. format: for code formatting
    > maybe we can remove format layer, as in this layer there is only one plugin, and one key binding. all formatting option are setted in lang#* layer.
  4. ui layer: SpaceVim ui, statusline and tabline should be move to this layer.
  5. unite layer, I can not disable unite layer, as vimfiler requires unite.vim
  6. denite: if py3 is enabled, this layer should be enabled
  7. ctrlp: if no py/py3, then use this layer

maybe we can use leaderf for vim with only +py feature.

I've had wrong idea about better default.
It's just like better-defaults layer in Spacemacs, right?
In that case, I'd prefer to enhance f/F/t/T behavior with clever-f or easymotion.
They're very useful because they have less strokes than SPC j j.

@sei40kr I am not sure if we should change current behaviour of f/F, as there have been used since SpaceVim v0.1.0.

I like the idea of @sei40kr, also this doesn't deviate that much of Vim. People like me, coming of learning Vim will find it difficult to unlearn it.

In SpaceVim, there are three layers ( unite, denite, ctrlp), and in tools layer there are leaderf and fzf, both of them can do same things, but they have different features and require different environment. so In SpaceVim, I only want to enable one layer.

  • Denite: will be enabled when using vim8 compiled with +py3 feature
  • Leaderf: a new layer for vim with +py feature
  • Unite: will be enabled when using vim without +py/+py3 feature.
  • ctrlp: this layer will be disabled by default, Ctrlp only can list few results, we can not navigate between all the results.
  • FZF: I do not use fzf, so I can not say anything about it. but as I know it has some issue in windows.

Differences

as we can see in the doc, the f,s, F, ,, q have been changed. what do you think about there key bindings?

  • use f as clever-f ?
  • use f as easymotion prefix?

@sei40kr the default means default config in SpaceVim core layer, I just delete default layer, and I think no need to create a default layer, SpaceVim core layer should provide a better default for all users.

EDIT:

core layer's document is included in SpaceVim Documentation. and this layer is enabled by default, and can not be disabled.

or: maybe we should not put this file in layer directory.

I have used easymotion before and I am using now, but testing clever-f I like it more than easymotion. I found I need to type less and that is a gain.

@jetm @sei40kr I just try to add clever-f, and maybe we can use \f and \F for unite/denite prefix.

@wsdjeg: I updated the repo and I am getting the following error:

Error detected while processing function SpaceVim#layers#core#statusline#get:

clever-f is not working.

Environment Information

The reproduce ways from Vim starting (Required!)

Output of the :SPDebugInfo!

SpaceVim Options :

g:spacevim_statusline_left_sections = ['winnr', 'filename', 'major mode', 'syntax checking', 'minor mode lighters', 'version control info', 'hunks']
g:spacevim_enable_statusline_display_mode = 0
g:spacevim_enable_os_fileformat_icon = 0
g:spacevim_leader_guide_position = 'botright'
g:spacevim_version = '0.7.0-dev'
g:spacevim_force_global_config = 0
g:spacevim_smartcloseignoreft = ['help', 'tagbar', 'vimfiler', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal']
g:spacevim_default_indent = 4
g:spacevim_enable_javacomplete2_py = 0
g:spacevim_enable_powerline_fonts = 1
g:spacevim_statusline_separator = 'arrow'
g:spacevim_enable_language_specific_leader = 1
g:spacevim_warning_symbol = '⚠'
g:spacevim_simple_mode = 0
g:spacevim_colorscheme = 'onedark'
g:spacevim_enable_guicolors = 1
g:spacevim_custom_plugins = [['sheerun/vim-polyglot', {'merged': 0}], ['vitalk/vim-shebang'], ['octol/vim-cpp-enhanced-highlight', {'on_ft': 'c'}], ['igankevich/mesonic'], ['benmills/vimux'], ['junegunn/fzf.vim'], ['vivien/vim-linux-coding-style'], ['ConradIrwin/vim-bracketed-paste'], ['jetm/vim-bitbake']]
g:spacevim_leader_guide_submode_mappings = {'<C-C>': 'win_close'}
g:spacevim_buffer_index_type = 0
g:spacevim_hiddenfileinfo = 1
g:spacevim_statusline_inactive_separator = 'arrow'
g:spacevim_gitcommit_pr_icon = ''
g:spacevim_plugin_manager = 'dein'
g:spacevim_error_symbol = '✖'
g:spacevim_vim_plug_installed = 0
g:spacevim_windows_smartclose = 'q'
g:spacevim_windows_leader = 's'
g:spacevim_wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
g:spacevim_use_colorscheme = 1
g:spacevim_enable_ale = 1
g:spacevim_enable_insert_leader = 1
g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep']
g:spacevim_colorscheme_bg = 'dark'
g:spacevim_enable_neocomplcache = 0
g:spacevim_leader_guide_sort_horizontal = 0
g:spacevim_enable_vimfiler_welcome = 0
g:spacevim_max_column = 80
g:spacevim_enable_debug = 0
g:spacevim_enable_key_frequency = 0
g:spacevim_auto_disable_touchpad = 1
g:spacevim_vim_help_language = 'en'
g:spacevim_gitcommit_issue_icon = ''
g:spacevim_lint_on_save = 1
g:spacevim_dein_installed = 1
g:spacevim_autocomplete_method = 'deoplete'
g:spacevim_enable_vimfiler_filetypeicon = 0
g:spacevim_plugin_manager_max_processes = 16
g:spacevim_statusline_unicode_symbols = 1
g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos', 'percentage']
g:spacevim_unite_leader = '-'
g:spacevim_enable_ycm = 0
g:spacevim_enable_tabline_filetype_icon = 0
g:spacevim_colorscheme_default = 'desert'
g:spacevim_project_rooter_automatically = 1
g:spacevim_neobundle_installed = 0
g:spacevim_disabled_plugins = []
g:spacevim_leader_guide_max_size = 0
g:spacevim_guifont = ''
g:spacevim_info_symbol = 'ⓘ'
g:spacevim_sidebar_width = 30
g:spacevim_enable_googlesuggest = 0
g:spacevim_enable_neomake = 0
g:spacevim_plugin_bundle_dir = '/home/javier/.cache/vimfiles/'
g:spacevim_leader_guide_run_map_on_popup = 1
g:spacevim_relativenumber = 1
g:spacevim_leader_guide_default_group_name = ''
g:spacevim_smartcloseignorewin = ['__Tagbar__', 'vimfiler:default']
g:spacevim_realtime_leader_guide = 1
g:spacevim_terminal_cursor_shape = 2
g:spacevim_altmoveignoreft = ['Tagbar', 'vimfiler']
g:spacevim_keep_server_alive = 1
g:spacevim_snippet_engine = 'neosnippet'
g:spacevim_project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
g:spacevim_leader_guide_flatten = 1
g:spacevim_enable_cursorcolumn = 0
g:spacevim_github_username = ''
g:spacevim_leader_guide_hspace = 5
g:spacevim_src_root = 'E:\sources\'
g:spacevim_denite_leader = '_'
g:spacevim_leader_guide_vertical = 0
g:spacevim_checkinstall = 1
g:spacevim_windows_index_type = 0
g:spacevim_filetype_icons = {}
g:spacevim_plugin_name = 'neodark.vim'
g:spacevim_enable_cursorline = 1
g:spacevim_custom_color_palette = []
g:spacevim_lint_on_the_fly = 1
g:spacevim_debug_level = 1
g:spacevim_hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
g:spacevim_language = ''
g:spacevim_filemanager = 'vimfiler'
g:spacevim_enable_vimfiler_gitstatus = 0

SpaceVim Health checking :

SpaceVim clipboard support check report:
Checking +clipboard:
SUCCEED!
SpaceVim environment check report:
Current progpath: vim(/usr/bin/vim)
version: 800
OS: Linux
SpaceVim lua support check report:
Checking +lua:
SUCCEED!
SpaceVim python support check report:
Checking +python3:
SUCCEED!
Checking +python:
SUCCEED!

SpaceVim runtime log :

[ SpaceVim ] : logger file  does not exists, only log for current process will be shown!
[ SpaceVim ] [20:50:15] [ Info ] Skip glob configration of SpaceVim
[ SpaceVim ] [20:50:15] [ Info ] SpaceVim server startup at:/tmp/spacevim_vim_server
[ SpaceVim ] [20:50:15] [ Info ] Find project root('.git/',''):/home/javier/repos/dotfiles/.git/
[ SpaceVim ] [20:50:15] [ Info ] change to root:/home/javier/repos/dotfiles
[ SpaceVim ] [20:50:16] [ Info ] Find project root('.git/','/home/javier/repos/dotfiles/Startify'):/home/javier/repos/dotfiles/.git/
[ SpaceVim ] [20:50:16] [ Info ] change to root:/home/javier/repos/dotfiles
[ SpaceVim ] [20:52:02] [ Info ] Find project root('.git/',''):/home/javier/repos/dotfiles/.git/
[ SpaceVim ] [20:52:02] [ Info ] change to root:/home/javier/repos/dotfiles
[ SpaceVim ] [20:52:07] [ Info ] Find project root('.git/','/home/javier/repos/dotfiles/[denite]'):/home/javier/repos/dotfiles/.git/
[ SpaceVim ] [20:52:07] [ Info ] change to root:/home/javier/repos/dotfiles
[ SpaceVim ] [20:52:30] [ Info ] change to root:/home/javier/repos/dotfiles

Screenshots

If you have any screenshots for this issue please upload here. BTW you can use https://asciinema.org/ for recording video in terminal.

@jetm What is the error? the message seems uncomplete.

@wsdjeg: Sorry, the error message was cut in the copy/paste. This is the output of :messages

Messages maintainer: Bram Moolenaar <[email protected]>
Error detected while processing function SpaceVim#layers#core#statusline#get:
line    9:
E117: Unknown function: fugitive#detect
Error detected while processing function SpaceVim#layers#core#statusline#get:
line    9:
E117: Unknown function: fugitive#detect
Error detected while processing function SpaceVim#layers#core#statusline#get:
line    9:
E117: Unknown function: fugitive#detect
Error detected while processing function SpaceVim#layers#core#statusline#get:
line    9:
E117: Unknown function: fugitive#detect

@jetm I recommand to use new issue about bug report. this should be a bug of statusline.

@wsdjeg: I created #1465. Thanks!

Hi, I am suggesting to use h and l for the default key-bindings in normal mode.

j and k are used for moving inside a line mostly. But they are less efficient compared with other movement like wWeE and fFtT. It is suggested in http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/ to disable hl, with recommending concise movement by ft;,

Therefore, some vimmers use little h and l but frequently use f for navigating inside line. Then I think the default 'f' binding is a bit uncomfortable.

I would like to recommend to map unite and denite keys to h and l by default; because

  1. f is useful for people learning vim operations by vimcasts.org and its book The Practical Vim. And it seems quite an amount of vimmers are influenced by the vimcasts.org.
  2. By this mapping, spaceVim force users to use fF;,tT, which is a high efficient way of navigation

I just remove [unite] and [denite] mappings, and now we use clever-f by default. I also remove many mappings begin with <Leader>, I think <Leader> should be used by user themself. We should use less as far as possible.

@SpaceVim/developers
In current version: 8a79b07732f9e2e3ff3d6e1495a4a6c24653dba9 , I only enable these layers, and it is only 56 plugins. in v0.6.0, it is 200+

  call SpaceVim#layers#load('autocomplete')
  call SpaceVim#layers#load('checkers')
  call SpaceVim#layers#load('format')
  call SpaceVim#layers#load('edit')
  call SpaceVim#layers#load('ui')
  call SpaceVim#layers#load('core')
  call SpaceVim#layers#load('core#banner')
  call SpaceVim#layers#load('core#statusline')
  call SpaceVim#layers#load('core#tabline')

Cool! Now SpaceVim opens quicker.

@wsdjeg for V0.7 did you done this:

Denite: will be enabled when using vim8 compiled with +py3 feature
Leaderf: a new layer for vim with +py feature
Unite: will be enabled when using vim without +py/+py3 feature.

I'm asking that since I go the last version of SpaceVim and Denite is not being installed by default.
To make it work I need to add manually:

call SpaceVim#layers#load('denite')

no, the doc need to be updated, no fuzzy finder layer will be loaded.

@wsdjeg are project find files in current project going to be removed? ([Space] + [p] + [f])

can you use new issue? we do not remove this key binding

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeroasterisk picture zeroasterisk  ·  5Comments

gennad picture gennad  ·  4Comments

wsdjeg picture wsdjeg  ·  3Comments

linwaytin picture linwaytin  ·  4Comments

Lobosque picture Lobosque  ·  3Comments