赞
踩
我的vim配置和插件都在这里,直接克隆到用户目录下就可以直接使用啦。
https://github.com/zzzghttt/myVim
vim重度使用患者,最近进实验室了,新搭的服务器上简单配置一下vim,记录一下,效果图:
不过该配置没有对C/C++或者python等语言进行配置,因为服务器上大概率用不到,想配置的可以去看看coc等插件,vim插件下载在这里:Vim Awesome
下面是我的~./config/nvim/init.vim文件,需要.vim/bundle。
- " ====== basic settings =====
- inoremap jj <ESC>
- set nu
- set relativenumber
- filetype on
- set history=1000
- set nocompatible
- set shiftwidth=4
- syntax on
- set autoindent
- set smartindent
- set tabstop=4
- set showmatch
- set guioptions-=T
- set vb t_vb=
- set hlsearch
- set ruler
- set incsearch
- let mapleader="\<SPACE>"
- "===== vim color scheme ======
-
- if $COLORTERM == 'gnome-terminal'
- set t_Co=256
- endif
-
- try
- colorscheme desert
- catch
- endtry
-
- set background=dark
-
- " ======= Plugin ========
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " 此处添加所要安装的Vim插件, 插件需在begin、end之间
-
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'scrooloose/nerdtree'
- Plugin 'easymotion/vim-easymotion'
- Plugin 'tpope/vim-surround'
- Plugin 'tomtom/tcomment_vim'
- Plugin 'vim-airline/vim-airline'
-
- call vundle#end()
- filetype plugin indent on
-
- map <LEADER>e :NERDTreeToggle<CR>
-
-
- " ====== Plugin configuration ======
- let g:tcomment_textobject_inlinecomment = ''
- nmap <LEADER>cn g>c
- vmap <LEADER>cn g>
- nmap <LEADER>cu g<c
- vmap <LEADER>cu g<
- set laststatus=2
- "永远显示状态栏
- let g:airline_powerline_fonts = 1
- " 支持 powerline 字体
- let g:airline#extensions#tabline#enabled = 1
- " 显示窗口tab和buffer
- " let g:airline_theme='moloai'
- " murmur配色不错
- if !exists('g:airline_symbols')
- let g:airline_symbols = {}
- endif
-
- let g:airline_left_sep = '▶'
- let g:airline_left_alt_sep = '❯'
- let g:airline_right_sep = '◀'
- let g:airline_right_alt_sep = '❮'
- let g:airline_symbols.linenr = '-'
- let g:airline_symbols.branch = '⎇'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。