Giter Site home page Giter Site logo

liuchengxu / space-vim Goto Github PK

View Code? Open in Web Editor NEW
2.9K 64.0 259.0 20.65 MB

:four_leaf_clover: Lean & mean spacemacs-ish Vim distribution

Home Page: https://liuchengxu.github.io/space-vim/

License: MIT License

Python 3.93% Shell 2.55% Makefile 0.83% Batchfile 1.07% Vim Script 91.61%
vim-distribution vim-configuration spacemacs space-vim vim-beginners vim neovim vimrc vimrc-configuration

space-vim's Introduction

badge license CI


space-vim

Table of Contents

Introduction

space-vim is a vim distribution for vim plugins and resources, compatible with Vim and NeoVim.

It is inspired by spacemacs and mimics spacemacs in a high level, especially in the whole architecture, key bindings and GUI. if have ever tried spacemacs, you will find space-vim is very similar to it in user experience.

Elegance here means pleasing, graceful as well as simple. If you are unfamiliar with spacemacs, you can visit spacemacs.org for more about the principle behind that, which is also what space-vim seeks.

The distribution is completely customizable using .spacevim, which is equivalent to .spacemacs in spacemacs.

screenshot (Terminal vim with space-vim-dark)

>> More screenshots

Features

  • Beautiful interface: I wrote a dark only vim colorscheme space-vim-dark based on the dark version of spacemacs-theme previously. Now we have a new option: space-vim-theme, which is the successor of space-vim-dark that supports both dark and light background!

  • Mnemonic key bindings: commands have mnemonic prefixes like SPC b for all the buffer commands, this feature is mainly powered by vim-which-key. Furthermore, lots of basic key bindings are provided by vim-better-default. For different language layers, <LocalLeader>, , as default in space-vim, can be seen as the major-mode prefix in spacemacs.

  • Lean and mean: no nonsense wrappers, free from being bloated.

For whom?

  • the novice vim users
  • the vimmers who pursuit a beautiful appearance
  • the users using both vim and spacemacs

Have a look at the Introduction in wiki as well.

If you have been a vimmer for quite a while, just pick out the part you are interested in. space-vim is well-organized due to the layers concept, you can easily find what you want. Since some guys are interested in the statusline part of space-vim, this section has been extracted as eleline.vim.

Install

Prerequisites

The most recent Vim(NeoVim) version is recommended, for space-vim has been specifically optimized for Vim8 and NeoVim with respect to the startup time.

chocolatey is an easy way to install software on Windows, tools like fzf, rg, ag are necessary to get you a full-featured space-vim.

When layers enabled at the first time, you need to run :PlugInstall to install relevant plugins.

Linux and macOS

/path/to/space-vim may be ~/.vim (Vim), ~/.config/nvіm (Neovim), or elsewhere. Installing space-vim to the conventional Vim/Neovim install location mitigates the need for an extra symlink to where space-vim is installed.

one-line installer

$ bash <(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.sh)

Makefile

$ git clone https://github.com/liuchengxu/space-vim.git /path/to/space-vim
$ cd /path/to/space-vim
$ make vim     # install space-vim for Vim
$ make neovim  # install space-vim for NeoVim

Windows

The easist way is to download install.cmd and run it as administrator, or install space-vim manually.

windows

Manual

  1. Clone space-vim:

    $ git clone https://github.com/liuchengxu/space-vim.git --single-branch /path/to/space-vim
  2. Install vim-plug, refer to vim-plug installation section for more information:

    # For Vim
    $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
        https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
        
    # For NeoVim
    sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
           https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  3. Create the symlinks and install plugins:

    Linux and macOS

    # **For Vim**
    # If space-vim not installed to ~/.vim/:
    $ ln -s /path/to/space-vim/init.vim ~/.vimrc
    # Copy init.spacevim for local customization
    $ cp /path/to/space-vim/init.spacevim ~/.spacevim
    $ vim -es +'PlugInstall' +qall
    
    # **For NeoVim**
    # If space-vim not installed to ~/.config/nvim/:
    $ ln -s /path/to/space-vim/init.vim ~/.config/nvim/init.vim
    # Copy init.spacevim for local customization
    $ cp /path/to/space-vim/init.spacevim ~/.spacevim
    $ nvim +'PlugInstall' +qall

Customize

You can use .spacevim in your home directory to customize space-vim, where you can enable the existing layers, add your extra plugins and private configurations.

If .spacevim does not exist, vanilla vim will be loaded! Refer to init.spacevim as an example.

Presetting

" Comment the following line if you don't want Vim and NeoVim to share the
" same plugin download directory.
let g:spacevim_plug_home = '~/.vim/plugged'

" Uncomment the following line to override the leader key. The default value is space key "<\Space>".
" let g:spacevim_leader = "<\Space>"

" Uncomment the following line to override the local leader key. The default value is comma ','.
" let g:spacevim_localleader = ','

" Enable the existing layers in space-vim
" Refer to https://github.com/liuchengxu/space-vim/blob/master/layers/LAYERS.md for all available layers.
let g:spacevim_layers = [
      \ 'fzf', 'better-defaults', 'which-key',
      \ ]

" Uncomment the following line if your terminal(-emulator) supports true colors.
" let g:spacevim_enable_true_color = 1

" Uncomment the following if you have some nerd font installed.
" let g:spacevim_nerd_fonts = 1

" If you want to have more control over the layer, try using Layer command.
" if g:spacevim.gui
"   Layer 'airline'
" endif

Please refer to LAYERS.md to take a look at the whole shipped layers.

Basically, g:spacevim_layers almost takes the place of Layer command. As far as I known, most people never use the option of Layer command, e.g., exclude, so g:spacevim_layers could save a lengthy Layer list, requiring less ceremony. Nevertheless, Layer command is still avaiable for some advanced uses.

UserInit()

" Manage your own plugins.
" Refer to https://github.com/junegunn/vim-plug for more detials.
function! UserInit()

  " Add your own plugin via Plug command.
  Plug 'junegunn/seoul256.vim'

endfunction

UserConfig()

" Override the default settings as well as adding extras
function! UserConfig()

  " Override the default settings.
  " Uncomment the following line to disable relative number.
  " set norelativenumber

  " Adding extras.
  " Uncomment the following line If you have installed the powerline fonts.
  " It is good for airline layer.
  " let g:airline_powerline_fonts = 1

endfunction

If have a heavy customized configuration, you can organize them in private directory with packages.vim and config.vim too, which will be loaded on startup. The private directory can be considered as either a single layer, i.e., in which you can put packages.vim and config.vim, or a set of multiple layers.

How to use

First of all, I recommend you to look through the existing key bindings via SPC ?. What's more, you definitely can not miss reading the README of better-defaults layer, which is of great importance for you to get started quickly.

For detailed instruction, please refer to the README under the certain layer enabled, or you can see config.vim and packages.vim directly.

If the README is not elaborate, sorry for that, space-vim now is in the early stages and a ton of stuff are waiting to be done.

Bootstrap

The modular design is originally from spacemacs. The implementation of logic in space-vim is similar to vim-plug.

If you want to know more about the bootstrap of space-vim, please see bootstrap in wiki.

Commands

Command Description
LayerStatus Check the status of layers
LayerCache Cache the information of layers in info.vim

Tips

For the sake of a better user experience, some extra settings should be done.

Enable GUI color in terminal vim

  • :echo has('termguicolors'), if 1, then your vim supports true colors.
  • See if your terminal-(emulator) supports true colors, refer to the gist TrueColour.md.

If these two requirements are satisfied, you could enable true color by uncommenting the line:

" Uncomment the following line if your terminal(-emulator) supports true colors.
let g:spacevim_enable_true_color = 1

Font

Some fantastic fonts: see wiki tips: programming-fonts.

GUI

For instance, install Iosevka first and use it:

let &guifont = 'Iosevka:h16'
Terminal

iterm2-font-setting

First, install the Source Code Pro or Powerline font, which is important for airline layer.

Second, since console Vim uses whatever font the console/terminal is using, you'll have to change the font setting of your terminal.

Update

Run make update:

$ cd path/to/space-vim
$ make update

Alternatively, you can manually perform the following steps. If anything has changed with the structure of the configuration, you will have to create the appropriate symlinks.

$ cd path/to/space-vim
$ git pull origin master

Contributions

If you encounter any problem or have any suggestions, please open an issue or send a PR.

Space-vim is still in beta. If you are interested, contributions are highly welcome.

Acknowledgements

I would like to thank the many people who have helped and contributed to this project. What's more, space-vim would never have become what it is now, without the help of these projects!

Articles

Contributors

This project exists thanks to all the people who contribute.

space-vim's People

Contributors

1heart avatar alvin2ye avatar c02y avatar chenge avatar chunliu avatar circld avatar delvatt avatar dgdavid avatar dimotsai avatar florentx avatar gokhanettin avatar grafikart avatar ianks avatar jyscao avatar kushnee avatar liuchengxu avatar mekanix avatar pittcat avatar rakr avatar rene-descartes2021 avatar theedgeofrage avatar tracyone avatar unicod3 avatar vladucu avatar wsw0108 avatar yesmeck avatar yhyj avatar yzhuang avatar zer4tul avatar zhaozg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

space-vim's Issues

使用fzf的时候报错

Environment

  • OS: macos
  • vim: 8.0
  • neovim: ???

Problem Description

在vim中使用fzf的时会报错误
Error running cat "/var/folders/jq/ll9yxyk53zjc7s2yjjc13bj00000gp/T/vKIlG3X/8"|"fzf" --color=bg+:237,bg:235,spinner:104,hl:168,fg:249,header:30,info:176,pointer:160,marker:36,fg+:36,prompt:134,hl+:81 --prompt "Maps (n)> " --ansi --no-hscr
oll --nth 1,.. --color prompt:12 --height=25 > /var/folders/jq/ll9yxyk53zjc7s2yjjc13bj00000gp/T/vKIlG3X/7
本地跑了下这个命令
cat "/var/folders/jq/ll9yxyk53zjc7s2yjjc13bj00000gp/T/v7sa4Or/3"|"fzf" --color=bg+:237,bg:235,spinner:104,hl:168,fg:249,header:30,info:176,pointer:160,marker:36,fg+:36,prompt:134,hl+:81 --prompt "Maps (n)> " --ansi --no-hscr
cat: /var/folders/jq/ll9yxyk53zjc7s2yjjc13bj00000gp/T/v7sa4Or/3: No such file or directory
unknown option: --no-hscr

添加新Layer,vim无法启用

Environment

  • OS: macOS 10.11.5
  • vim: 8.0

Problem Description

.spacevim中,修改了如下代码:

function! Layers()

    " Default layers, recommended!
    Layer 'fzf'
    Layer 'unite'
    Layer 'better-defaults'
    Layer 'python'

endfunction

按照说明文档执行了,但是vim启动就闪退了。

注意,如果是首次启用一个 layer,需要执行 SPC f R, 或者 :so $MYVIMRC, 或者退出在打开 vim, 重新加载 .vimrc 并执行 :PlugInstall 安装所需的相关插件 。

airline与syntax-checking同时开启时报错

在Layer中同时添加了airline和syntax-checking之后,进入vim会报错,提示airline#extension#syntaxchecking#...之类的错误,好像两个插件有冲突。不知道您有没有检测过?

Mac 的Iterm终端下,安装有问题

使用 sh -c "$(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.sh)" 命令进行安装,之后会有错误产生:
remote: Counting objects: 1572, done. remote: Compressing objects: 100% (370/370), done. remote: Total 1572 (delta 156), reused 0 (delta 0), pack-reused 1176 Receiving objects: 100% (1572/1572), 11.97 MiB | 263.00 KiB/s, done. Resolving deltas: 100% (754/754), done. Checking connectivity... done. [✔] Successfully cloned space-vim. [✔] Setting up vim symlinks. Error detected while processing /Users/hehe/.vimrc: line 15: E492: Not an editor command: ^M line 17: E492: Not an editor command: ^M line 19: E492: Not an editor command: ^M line 21: E488: Trailing characters line 24: E488: Trailing characters line 27: E488: Trailing characters line 31: E492: Not an editor command: ^M line 35: E117: Unknown function: WINDOWS E15: Invalid expression: WINDOWS()^M line 65: E171: Missing :endif Press ENTER or type command to continue
回车键确认后:
`
Error detected while processing command line:
E492: Not an editor command: PlugInstall!
E492: Not an editor command: PlugClean
[✔] Now updating/installing plugins using vim-plug

Thanks for installing space-vim. Enjoy!
`
貌似是没有识别到 Vim-Plug 插件,找不到PlugInstall和PlugClean命令。手动安装Vim-Plug仍然不起作用。

suggestion:tmux layer

tmux-plugins/vim-tmux : .tmux.conf's syntax,help...

christoomey/vim-tmux-navigator :

the plugin will allow you to navigate seamlessly between vim and tmux splits using a consistent set of hotkeys.

need extra config of tmux:

is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

lucidstack/ctrlp-tmux.vim:switch tmux session through ctrlp..

I think there are some more useful plugins of vim for tmux that I haven't found.

mac 系统 vim 7.4 下正确,升级vim 8 后报错。

uninstall,重新安装,依旧报错。盼解决。

==> Trying to update space-vim
From https://github.com/liuchengxu/space-vim

  • branch master -> FETCH_HEAD
    Already up-to-date.
    [✔] Successfully updated space-vim
    [✔] Setting up vim symlinks.
    Error detected while processing function 2_collect_topics:
    line 19:
    E887: Sorry, this command is disabled, the Python's site module could not be loaded.
    Error detected while processing function LayersEnd[20]..2_load_layer_packages[2]..2_cur_layer_base_dir:
    line 3:
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * fzf * is invalid, please check it.
    [space-vim] 0fzf/packages.vim does not exist, which may cause unexpected errors.
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * unite * is invalid, please check it.
    [space-vim] 0unite/packages.vim does not exist, which may cause unexpected errors.
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * better-defaults * is invalid, please check it.
    [space-vim] 0better-defaults/packages.vim does not exist, which may cause unexpected errors.
    Error detected while processing function LayersEnd[30]..2_load_layer_config[2]..2_cur_layer_base_dir:
    line 3:
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * fzf * is invalid, please check it.
    [space-vim] 0fzf/config.vim does not exist, which may cause unexpected errors.
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * unite * is invalid, please check it.
    [space-vim] 0unite/config.vim does not exist, which may cause unexpected errors.
    E121: Undefined variable: s:topic2layers
    E116: Invalid arguments for function items(s:topic2layers)
    E15: Invalid expression: items(s:topic2layers)
    [space-vim] Layer * better-defaults * is invalid, please check it.
    [space-vim] 0better-defaults/config.vim does not exist, which may cause unexpected errors.
    Press ENTER or type command to continue
    [✔] Now updating/installing plugins using vim-plug

Thanks for installing space-vim. Enjoy!

Add travis CI support

travis-ci

You can use following vim lint tool to check viml:

Kuniwak/vint

syngan/vim-vimlint

ynkdir/vim-vimlparser

.travis.yml example:

language: python

cache:
  pip: true

env:
  matrix:
    - LINT=vimlint-errors
    - LINT=vimlint
    - LINT=vint-errors
    - LINT=vint

matrix:
  allow_failures:
    - env: LINT=vimlint
    - env: LINT=vint

install:
  - |
    if [ "${LINT#vimlint}" != "$LINT" ]; then
      git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
      git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
    elif [ "${LINT#vint}" != "$LINT" ]; then
      virtualenv /tmp/vint && source /tmp/vint/bin/activate && pip install vim-vint
    fi
script:
  - |
    if [ "$LINT" = "vimlint" ]; then
      sh /tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser .
    elif [ "$LINT" = "vimlint-errors" ]; then
      sh /tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser .
    elif [ "$LINT" = "vint" ]; then
      vint .
    elif [ "$LINT" = "vint-errors" ]; then
      vint --error .
    fi

space-vim seems not to support python3?

Environment

  • OS: centos7.3
  • vim: 8.0.311
  • Python:anaconda3-4.2

Problem Description

  1. [root@centos73 ~]# vim
  2. Error detected while processing function 2_collect_topics:
  3. line 26:
  4. E370: Could not load library libpython3.5m.so.1.0
  5. E263: Sorry, this command is disabled, the Python library could not be loaded.
  6. Error detected while processing function core_config#end[6]..2_load_layer_packages:
  7. line 2:
  8. E121: Undefined variable: g:layer_path
  9. E15: Invalid expression: g:layer_path[l:layer] . '/packages.vim'
  10. line 3:
  11. E121: Undefined variable: l:layer_packages
  12. 。。。
  13. 。。。
  14. 。。。
  15. E116: Invalid arguments for function 2_Source
  16. Error detected while processing function core_config#end[33]..2_load_layer_config:
  17. line 2:
  18. E121: Undefined variable: g:layer_path
  19. E15: Invalid expression: g:layer_path[l:layer] . '/config.vim'
  20. line 3:
  21. E121: Undefined variable: l:layer_config

=================================================
【question】space-vim seems not to support python3? or probabaly It might be some plugins not supporting python3, like YouCompleteMe ?

Have you tested on python3?

space-vim default theme not working properly when using tmux

Environment

  • OS: ubuntu 14.04
  • vim: 8
  • neovim: 0.20-dev

Problem Description

The default theme of space-vim works properly when using without tmux, but when I use vim inside tmux, the theme, syntax-highlighting etc. goes away.

I'm a beginner in vim, tmux etc. please guide me.

vim in a normal terminal
vim

vim in tmux
tmux-vim

backspace问题

不知道多少人喜欢原来vi的backspace的行为?

一般来说,插入模式,命令模式,都设置成删除的动作吧。

这是一个,不知道各位同意不。

另外的问题:

明明默认已经是

set nocompatible
set backspace=indent,eol,start

奇怪的是,不知道为啥,没有效果

ps:macOS vim 8.0

Cannot run :SyntasticInfo

Environment

  • OS: Linux
  • vim: yes
  • neovim: no

Problem Description

I take it that syntastic is installed, but I cannot run it manually. :SyntasticInfo also does not work
E492: Not an editor command: SyntasticInfo

faster startup when a lot of layers enabled

当启用很多 layer 时, 意味着加载了很多插件与配置信息, 很可能会导致 vim 启动时变慢, 这是我们不愿意看到的.

vim-startuptime-benchmark 可以看出, 即使使用很多插件仍然可以保持很快的启动 ( 200 ms 以内). 尽管加载的插件不尽相同, 但仍具有借鉴意义.

虽然有些使用插件延迟加载, 但 space-vim 启用很多 layer 时, 启动时间仍普遍超过 500 ms, 有时甚至会超过 900 ms. 测试环境:

  • Retina 13-inch mid 2014
  • VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 21 2016 17:35:16).

虽然比起 spacemacs 几秒钟的启动时间, 几百毫秒已经很快. 但对于 vim, 启动迅速是硬性要求, 而且当超过 900 ms 时, 就会有明显的 lag. 我觉得这一点是可以改进的, 不知道是否有什么好的解决方案?

function! UserInit()

    Layer 'emoji'
    Layer 'goyo'

    Layer 'html'
    Layer 'c-c++'
    Layer 'python'
    Layer 'markdown'
    Layer 'graphviz'

    " Layer 'lightline'
    Layer 'airline'

    Layer 'chinese'

    Layer 'text-align'
    Layer 'programming'

    Layer 'ycmd'
    Layer 'syntax-checking'

endfunction

vim --startuptime vim.log 会将启动时的一些时间, 加载的文件等情况写入到 vim.log 中, 大家可以自行测试一下. 如果有使用其他 vim distribution, 欢迎分享它们的启动体验, 我们所期待的是能够取长补短, 不断进步.

Errors when I run in Vim or Neovim

Environment

  • OS: MacOS 10.11.6

  • vim:
    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 14 2016 16:06:49)
    Compiled by [email protected]
    Normal version without GUI. Features included (+) or not (-):
    -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
    -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
    -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
    -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
    +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
    +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
    +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
    -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
    +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype
    +path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn
    -python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs
    +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
    -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
    +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
    -xterm_clipboard -xterm_save
    system vimrc file: "$VIM/vimrc"
    user vimrc file: "$HOME/.vimrc"
    user exrc file: "$HOME/.exrc"
    fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
    Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses

  • neovim:
    NVIM 0.1.7
    Build type: RelWithDebInfo
    Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20170201-7304-eqlwvz/neovim-0.1.7/build/config -I/tmp/neovim-20170201-7304-eqlwvz/neovim-0.1.7/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20170201-7304-eqlwvz/neovim-0.1.7/build/src/nvim/auto -I/tmp/neovim-20170201-7304-eqlwvz/neovim-0.1.7/build/include
    Compiled by justin@personal

Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.7/share/nvim"

Problem Description

When I install space-vim according to instructions, symlink ~/.config/nvim/init.vim, and then run nvim, I get the following error:

Error detected while processing function 2_collect_topics:
line 26:
E117: Unknown function: provider#python3#Call
Error detected while processing function core_config#end[6]..2_load_layer_packages:
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/packages.vim'
line 3:
E121: Undefined variable: l:layer_packages
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/packages.vim'
line 3:
E121: Undefined variable: l:layer_packages
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/packages.vim'
line 3:
E121: Undefined variable: l:layer_packages
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/packages.vim'
line 3:
E121: Undefined variable: l:layer_packages
E116: Invalid arguments for function 2_Source
Error detected while processing function core_config#end[33]..2_load_layer_config:
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/config.vim'
line 3:
E121: Undefined variable: l:layer_config
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/config.vim'
line 3:
E121: Undefined variable: l:layer_config
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/config.vim'
line 3:
E121: Undefined variable: l:layer_config
E116: Invalid arguments for function 2_Source
line 2:
E121: Undefined variable: g:layer_path
E15: Invalid expression: g:layer_path[l:layer] . '/config.vim'
line 3:
E121: Undefined variable: l:layer_config
E116: Invalid arguments for function 2_Source
Press ENTER or type command to continue

When I run vim, I get the following error:

Error detected while processing VimEnter Auto commands for "*":
E492: Not an editor command: Startify| endif
Press ENTER or type command to continue

关于禁用鼠标的问题

Environment

  • OS: CentOS 7.1
  • vim: vim 8.0
  • neovim:

Problem Description

我在~/.spacevim和~/.vimrc里都设置了set mouse-=a以禁用鼠标,可是没有生效,在vim打开状态下:set mouse -=a则生效,怎么解决呢?对复制粘贴需求大......

Why private is a single layer?

I have been using spacemacs for a long time. And I often add many third-party layers in private directory. I think it is very useful, because I can decide which private layers can be loaded or not. But I found in current implementation of space-vim, the private is just a single layer. Is there any special thought or design philosophy for this? If not, I can help to change private to support multiple layers.

Btw. I really like this project. Vim is faster than emacs. And now I can op vim more efficiently. You are doing a great job!

bash return 127

[100%] Built target ycm_core

Press ENTER or type command to continue
**/bin/bash: ./install--all: No such file or directory

shell returned 127**

Press ENTER or type command to continue
/Users/macrosea/ws/orjan/customized/public/dotfiles/space-vim

output errors from install.sh

install.sh gave the following errors during executation:

± |master U:2 ?:1 ✗| → ./install.sh
Attempting to back up your original vim configuration.
/Users/hui/.vimrc -> /Users/hui/.vimrc.20170115_1484473485
[✔] Your original vim configuration has been backed up.
==> Trying to update space-vim
From https://github.com/liuchengxu/space-vim
 * branch            master     -> FETCH_HEAD
Already up-to-date.
[✔] Successfully updated space-vim
[✔] Setting up vim symlinks.


Press ENTER or type command to continue
/bin/sh: ./install--all: No such file or directory

shell returned 127

Press ENTER or type command to continue
[✔] Now updating/installing plugins using vim-plug

Thanks for installing space-vim. Enjoy!

It seems that space-vim was installed successfully, but what's the errors?

Thanks

The function Layers() does not exist.

为了组织更有条理 (实际所做的事情是之前一样的 :p),在 .spacevim 中我新增了一个函数 Layers(), 也许之前 clone 过的 space-vim 用户在更新时可能会遇到一点问题。解决很简单,将 Layers() 添加到 .spacevim 中即可。可查看 README.

function! Layers()
       Layer 'fzf'
       Layer 'unite'
       Layer 'better-defaults'
endfunction

新添加的 Layers() 可以使得各个部分的功能更加清晰:

  • Layers() 中可以启用 space-vim 已有的 Layer,排除部分插件, LayerExclude 命令在这里是有效的。
  • UserInit() 中单独放置自己私有的一些插件 。
  • UserConfig() 放置个性化配置信息对已有设置进行覆盖。

A bit of a lag when you first time enter insert mode (首次进入插入模式时可能会感到些许的停顿或延迟)

When first time enter insert mode, you may feel a bit of delay, for vim-plug is probably loading the two vim plugins: ultisnips and YouComplteMe, which have a huge effect on the startup of vim, several hundred milliseconds I guess.

In order to obtain a faster startup, I referred to loading-plugins-manually for a solution, which is only when you first time enter insert mode ultisnips and YouCompleMe starts to play their expected roles.

Now space-vim can start in no more than 200 ms without opening any files, which is much faster than before.

If you have a better workaround to get a faster startup without this issue, please let me know. Thanks!

当你打开 vim, 第一次进入插入模式时,也许会感到些许的停顿或者延迟,这是因为 vim-plug 可能在加载 ultisnips 或 YouCompleteMe 这个两个插件.

因为基于加速 vim 启动的考虑, 我参考了这里 loading-plugins-manually, 在首次进入插入模式时才加载这两个对启动时间非常有影响的插件。

只是在第一次进入插入模式时可能会有感觉,加载以后就正常了。如果仍然觉得体验不好,可以不使用 ycmd, 启用 auto-completion layer, 它使用的是 neocomplete.vim.

在进行这样的处理后,space-vim 打开空文件的启动时间可以保持在 200 ms 以内,有非常大的提升,我想这是非常值得的。当然,如果有一些更好的加速方法可以规避这个点,非常欢迎您能分享给大家。

spc+? command not work well

Environment

  • OS: macOS 10.12.3
  • vim:
  • neovim: 0.1.7

Problem Description

spc+? do not display all the keybinding, and my config is

    Layer 'fzf'
    Layer 'unite'
    Layer 'better-defaults'

2017-02-06 7 50 07

python auto-completion not work with jedi-vim

when I enable auto-completion and jedi-vim layers, python completion can't work with jedi-vim, It always complete with omni completion, maybe cause by autocmd FileType python setlocal omnifunc=pythoncomplete#Complete. So, maybe remove omni completion config from auto-completion layer, let user custom config!

git pull master分支,<space>1-9的buffer切换不工作

今天git pull master分支,用切换buffer时,不能正常切换,这次改动有点大,感觉很不稳定呢!取消leander key的两行注释,space不能工作,注释后能工作

let g:spacevim_leader = "<\Space>"
let g:spacevim_localleader = ','

Disable line numbers

Environment

  • OS: Ubuntu 16.04 LTS
  • vim: VIM - Vi IMproved 7.4

Problem Description

Hello, I'd like to turn off the line numbers count in the "left panel" of the editor. It bothers me a lot.

I tried running:

:set nu!
:set nonumber
:set nonu

But the selected column number just transformed as 0. And the others numbers are still there.

I tried to find what plugin makes this configuration but still I did not find it.

See the screenshot here:

schermata da 2017-02-22 10-44-57

不能查看键位绑定

Environment

  • OS: Arch64

  • vim: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 14 2017 10:57:50)

Problem Description

按+<?>查看快捷键如图

screenshot_20170223_235056

Which version/branch of the space-vim is more update?

I found 3 space-vim sites:
(1) https://github.com/liuchengxu/space-vim
(2) https://github.com/SpaceVim/SpaceVim
(3) https://spacevim.org/

Are they maintained by the same group of people? and all are about the same thing?
Which version of them is more update?

screenshot of site(2) look more fancy, but after installing, the vim did not look like the screenshots.
and it stucks. but I'd like to have the configurations for the screenshots, How to get it?

I successfully installed space-vim from site(1), it does look beautiful, Thanks for your efforts!

注释文字的配色问题

Environment

  • OS: macOS 10.12.3
  • vim: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 16 2017 18:07:00)

Problem Description

注释的配色问题,前景色和背景色反转:

2017-02-01 9 45 53
2017-02-01 9 46 57

我用 :highlight 查看时,看不出什么问题?

中文的配置是不是独立到一个叫 chinese 的 layer 里

let $LANG = 'zh_CN.UTF-8'
set langmenu=zh_CN
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
highlight Cursor guifg=black guibg=#dfff00
highlight iCursor guifg=black guibg=white
highlight vCursor guifg=black guibg=#df5f00
set guicursor=n-v-c:block-Cursor
" set guicursor+=i:ver100-iCursor
set guicursor+=n-v-c:blinkon0
" set guicursor+=i:blinkwait10
set guicursor=i:ver1
" windows GUI界面乱码设置
if WINDOWS() && has('gui_running')
"处理consle输出乱码
language messages zh_CN.utf-8
" Set extra options when running in GUI mode
set guifont=Consolas:h13
" set guifont=Source\ Code\ Pro\ for\ Powerline
if has('gui_gtk2') "GTK2
set guifont=Monaco\ 12,Monospace\ 12
endif
set guitablabel=%M\ %t
" set showtabline=1
" set guioptions+=e " 这两个设置会使得airline上方的buffer无法显示
set linespace=2
set noimdisable
elseif OSX() && has('gui_running')
" set guifont=Cousine\ for\ Powerline:h13
set guifont=Source\ Code\ Pro\ for\ Powerline:h12
endif

这里的配置对于非中文用户是不是会比较困扰?

Plugin recommendation:vim-leader-guide

vim-leader-guide

Spacemacs like function:displays the available key bindings automatically and dynamically.

No need any config.

#suppose  leader is space
nnoremap <silent> <leader> :<c-u>LeaderGuide '<Space>'<CR>
vnoremap <silent> <leader> :<c-u>LeaderGuideVisual '<Space>'<CR>

"p" is not working

Reproduce:

  1. Open a file vim file.txt;
  2. press yy on a line;
  3. press p.

Expect:

Paste that line to the next.

Actual:

Vim shows E353: Nothing in register * error.

It works on MacVim, but not in terminal.

Layer 'syntax-checking' should be included before Layer 'spacevim'

E117: Unknown function: ALEGetError
E116: Invalid arguments for function empty(ALEGetError())?ALEGetError():''
请按 ENTER 或其它命令继续
E15: 无效的表达式: !empty(ALEGetError())?ALEGetError():''
请按 ENTER 或其它命令继续
E117: Unknown function: ALEGetWarning
请按 ENTER 或其它命令继续
E116: Invalid arguments for function empty(ALEGetWarning())?ALEGetWarning():''
...

ycmd layer启用无效

Environment

  • OS: CentOS 7.1
  • vim: vim8.0
  • neovim:

Problem Description

启用ycmd后,并不能补全,按照READEME.md里的操作也执行不成功:

$ ./install.py --clang-completer
ERROR: some folders in /home/endice/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party are empty; you probably forgot to run:
	git submodule update --init --recursive

[endice@localhost YouCompleteMe]$ git submodule update --init --recursive
正克隆到 'third_party/requests'...
fatal: unable to access 'https://github.com/kennethreitz/requests/': Peer's Certificate has expired.
无法克隆 'https://github.com/kennethreitz/requests' 到子模组路径 'third_party/requests'
无法递归进子模组路径 'third_party/ycmd'

vim里有

The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 0. Use the ':YcmToggleLogs' command to check the logs.    
argument can't be <type 'unicode'> 

怎么解决这些问题呢 ?

题外话:
我对vim插件不熟,但我喜欢别人已经配置好的即开即用的vim,我以前试过一些,基本可以安装好就支持自动补全等功能,而这个似乎会存在问题,可以麻烦你辛苦下,把自动补全弄的即开即用么~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.