Space-vim的.spacevim配置备份

安装

windows安装

配置

在C盘的用户目录下,有一个'.spacevim'的文件,可以修改你要的配置

" Let Vim and NeoVim shares the same plugin directory.
" Comment it out if you don't like
let g:spacevim_plug_home = '~/.vim/plugged'

" The default leader key is space key.
" Uncomment the line below and modify "<\Space>" if you prefer another
" let g:spacevim_leader = "<\Space>"

" The default local leader key is comma.
" Uncomment the line below and modify ',' if you prefer another
" let g:spacevim_localleader = ','

" Enable the existing layers in space-vim
let g:spacevim_layers = [
      \ 'fzf', 'unite', 'better-defaults',
      \ 'which-key',
      \ ]

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

" 加载层级
function! Layers()

    "+checkers
    Layer 'syntax-checking'

    "+completion
    Layer 'auto-completion'

    "+distributions
    "Layer 'spacevim'

    "+fun
    "Layer 'emoji'
    Layer 'goyo'

    "+lang
    "Layer 'html'
    Layer 'c-c++'
    Layer 'python'
    Layer 'markdown'

    "+misc
    Layer 'chinese'

    "+programming
    Layer 'programming'
    Layer 'editing'

    "+themes
    "Layer 'airline'
    "Layer 'lightline'

    "+tools

    "+version-control

    "+vim
    Layer 'text-align'

endfunction

" Manage your own plugins, refer to vim-plug's instruction for more detials.
function! UserInit()

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

endfunction

" Override the default settings as well as adding extras
function! UserConfig()
  " If you have installed the powerline fonts and want to enable airline layer
  " let g:airline_powerline_fonts=1

  " 默认文件位置
  cd D:\Code\VimCode
  "自动设置当前目录为正在编辑的目录
  set autochdir
  autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ /

  " 取消菜单栏和导航栏
  set guioptions-=m
  set guioptions-=T
  " 设置水平行数和竖直列数,发现没用,因为它能记住上次你的大小
  set lines=30
  set columns=90

  " 一键运行, 因为我想要调出控制台的
  map <F9> :call CompileRunGcc()<CR>
  func! CompileRunGcc()
      exec "w"
      if &filetype == 'c'
          exec '!g++ % -o %<'
          exec '! %<'
      elseif &filetype == 'cpp'
          exec '!g++ % -o %<'
          exec '! %<'
      elseif &filetype == 'python'
          exec '! python %'
      elseif &filetype == 'java'
          exec "!javac %"
          exec "!java %<"
      elseif &filetype == 'sh'
          :! bash %
      endif
  endfunc

  " Use gui colors in terminal if available
  function! s:enable_termgui()
    if has('termguicolors')
      set termguicolors
      if g:spacevim_tmux
        " If use vim inside tmux, see https://github.com/vim/vim/issues/993
        " set Vim-specific sequences for RGB colors
        let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
        let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
      endif
    endif
  endfunction

  " If your terminal(-emulator) supports true colors, uncomment the line below
  " call s:enable_termgui()
endfunction


猜你喜欢

转载自www.cnblogs.com/wudongwei/p/9022141.html