.vimspace 最终配置

本文介绍如何使用SpaceVim编辑器配置默认图层及插件排除方法,并展示了如何安装自定义插件以及进行个性化配置的例子。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

" You can enable the existing layers in space-vim and
" exclude the partial plugins in a certain layer.
" The command Layer is vaild in the function Layers().
" Use exclude option if you don't want the full Layer,
" e.g., Layer 'better-defaults', { 'exclude': 'itchyny/vim-cursorword' }
function! Layers()


  " Default layers, recommended!
  Layer 'emoji'
  Layer 'goyo'
  Layer 'fzf'
  Layer 'unite'
  Layer 'better-defaults'
  Layer 'ycmd'
  Layer 'file-manager'
  Layer 'tmux'
  Layer 'syntax-checking'
  Layer 'python'
  Layer 'chinesse'


endfunction


" Put your private plugins here.
function! UserInit()


  " Space has been set as the default leader key,
  " if you want to change it, uncomment and set it here.
  " let g:spacevim_leader = "<\Space>"
  " let g:spacevim_localleader = ','


  " Install private plugins
  " Plug 'extr0py/oni'


  "duiqi xian
  Plug 'Yggdroot/indentLine'
  "zidong buquan"

  Plug 'Raimondi/delimitMate'

  "zhuti

  Plug 'tomas/molokai'



endfunction


" Put your costom configurations here, e.g., change the colorscheme.
function! UserConfig()
autocmd BufNewFile *.py,*.cc,*.sh,*.java exec ":call SetTitle()"
func SetTitle()  
        "如果文件类型为.py文件
        if &filetype == 'python'
                call setline(1, "\#!/usr/bin/evn python")
                call setline(2, "\# -*- coding: UTF-8 -*- ")
                call setline(3, "\# Author: starty")
                call setline(4, "\# Created Time : ".strftime("%c"))
                call setline(5, "\# File Name: ".expand("%"))
                call setline(6, "\# Description:")
        endif
endfunc


  " If you enable airline layer and have installed the powerline fonts, set it here.
  let g:airline_powerline_fonts=1
  set bg=dark
  set cursorline
  set cursorcolumn
  "显示tab和空格
  set list
  " 设置tab和空格样式
  set lcs=tab:\|\ ,nbsp:%,trail:-
  " 设定行首tab为灰色
  highlight LeaderTab guifg=#666666
  " 匹配行首tab
  match LeaderTab /^\t/


  map <F2> :SyntasticCheck<CR>


  let g:indentLine_char = '|' 
  let g:indentLine_color_term = 239 
  "映射到ctrl+i键 
  map <F3> :IndentLinesToggle<CR>


  "for python docstring ", 特别有用
  au FileType python let b:delimitMate_nesting_quotes = ['"']


  "关闭某些类型文件的自动补全,比如说关闭python文件的
  "au FileType python let b:delimitMate_autoclose = 0
endfunction
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值