vim deepin linux,vim.rc配置(deepin),

set nocompatible " be iMproved, required

filetype off " required

" set the runtime path to include Vundle and initialize

set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

" alternatively, pass a path where Vundle should install plugins

"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required

Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.

" Keep Plugin commands between vundle#begin/end.

" plugin on GitHub repo

Plugin 'tpope/vim-fugitive'

" plugin from http://vim-scripts.org/vim/scripts.html

" Plugin 'L9'

" Git plugin not hosted on GitHub

"Plugin 'git://git.wincent.com/command-t.git'

" git repos on your local machine (i.e. when working on your own plugin)

"Plugin 'file:///home/gmarik/path/to/plugin'

" The sparkup vim script is in a subdirectory of this repo called vim.

" Pass the path to set the runtimepath properly.

Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}

" Install L9 and avoid a Naming conflict if you've already installed a

" different version somewhere else.

" Plugin 'ascenator/L9', {'name': 'newL9'}

Plugin 'mhinz/vim-startify'

Plugin 'aperezdc/vim-template'

Plugin 'thinca/vim-quickrun'

Plugin 'jiangmiao/auto-pairs'

Plugin 'Chiel92/vim-autoformat'

"" Theme Plugin

Plugin 'sjl/badwolf'

" All of your Plugins must be added before the following line

call vundle#end() " required

filetype plugin indent on " required

" To ignore plugin indent changes, instead use:

"filetype plugin on

"

" Brief help

" :PluginList - lists configured plugins

" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate

" :PluginSearch foo - searches for foo; append `!` to refresh local cache

" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal

"

" see :h vundle for more details or wiki for FAQ

" Put your non-Plugin stuff after this line

"" display settings

set t_Co=256

syntax enable

syntax on

set background=dark

colorscheme badwolf

set cursorline

set cursorcolumn

set number

" file encoding

set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

" enable mouse

set mouse=a

" indent

set expandtab

set tabstop=4

set softtabstop=4

set shiftwidth=4

" fold

set nofoldenable

set foldmethod=syntax

" search

set hlsearch

set incsearch

" case

set ignorecase

set smartcase

" keep 200 lines of command line history

set history=200

" Show a few lines of context around the cursor.

" Note that this makes the text scroll

" if you mouse-click near the start or end of the window.

set scrolloff=5

set sidescrolloff=5

" display completion matches in a status line

set wildmenu

" display incomplete commands

set showcmd

" Allow backspacing over everything in insert mode.

set backspace=eol,start,indent

" Use ; as

let mapleader = ";"

" Quick select whole file

nnoremap a ggVG

" Quick save or quit file

nnoremap w :w

nnoremap q :q

nnoremap fq :q!

" Copy to and paste from system clipboard

nnoremap y "+y

nnoremap p "+p

nnoremap fz ggVG"+y

" vim smart autocomplete

set wildmenu

" man the information

nnoremap man :Man

"""" Plugin settings

" vim-startify

let g:startify_files_number = 20

" vim-template

let g:templates_no_autocmd=1

let g:templates_directory='~/.vim/templates'

nnoremap tp2 :Template tp2

" vim-quickrun

let g:quickrun_config = {

\ "_" : {

\ "outputter" : "message",

\ },

\}

let g:quickrun_no_default_key_mappings = 1

nmap (quickrun)

" YouCompleteMe

let g:ycm_collect_identifiers_from_tags_files=1

set tags+=~/.tags/stdcpp.tags

let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'

let g:ycm_complete_in_comments=1

let g:ycm_cache_omnifunc=0

let g:ycm_seed_identifiers_with_syntax=1

set completeopt-=preview

" Airline

let g:airline_theme='luna'

let g:airline_powerline_fonts = 1

if !exists('g:airline_symbols')

let g:airline_symbols = {}

endif

let g:airline_symbols.linenr = '&'

" AutoFormat

let g:formatdef_my_cpp = '"astyle --style=google"'

let g:formatters_cpp = ['my_cpp']

"au BufWrite * :Autoformat

nmap fmt (Autoformat)

""" My Own Function

func! CppDebug()

exe "silent !g++ -O0 -std=c++14 -g % -o %

exe "!gdb %

exe "silent !rm -rf %

endfunc

nnoremap db :call CppDebug()

map :call Run()

func! Run()

exe "silent w"

exe "silent !g++ % -o %

exe "!./%

exe "silent !rm %

endf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值