vim配置文件详解linux,VIM 环境快速配置(Linux)

1. 安装vim

sudo apt install vim

2. 安装vim-plug

从vim-plug github下载最新的安装包,安装到$HOME/.vim/autoload目录下:

$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \

https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

$ ls ~/.vim/autoload

plug.vim

3. 下载 .vimrc 配置文件到 $HOME/.vimrc

@2016.04.26 #Ubuntu16.04 w/vim 7.4配置文件

ray@ray-ThinkPad-X250:~$ cat ~/.vimrc

"ray.h @2016.04.26 #Ubuntu16.04 w/vim7.4

" Vim-plug Plugin manager, must be placed on top of the vimrc

call plug#begin('$HOME/.vim/plugins')

Plug 'bling/vim-airline'

Plug 'spf13/vim-autoclose'

Plug 'w0ng/vim-hybrid'

call plug#end()

set nocompatible

filetype plugin indent on " Automatically detect file types.

syntax on " Syntax highlighting

set mouse=a " Automatically enable mouse usage

set mousehide " Hide the mouse cursor while typing

" UI Setting

set cursorline " Highlight current line

set laststatus=2" Show status bar w/height 2,for vim-airline

set winminheight=0 " Windows can be 0 line high

set number " Line numbers on

set nowrap " Do not wrap long lines

set backspace=indent,eol,start " Backspace for dummies

set pastetoggle= " pastetoggle (sane indentation on pastes)

set splitright " Puts new vsplit windows to the right of the current

set splitbelow " Puts new split windows to the bottom of the current

set wildmenu

set wildmode=longest,list

" UI Indent & Tab

set smartindent

set autoindent " Indent at the same level of the previous line

set shiftwidth=4" Use indents of 4 spaces

set expandtab " Tabs are spaces, not tabs

set smarttab

set tabstop=4 " An indentation every four columns

set softtabstop=4 " Let backspace delete indent

" UI Search

set smartcase

set showmatch " Show matching brackets/parenthesis

set incsearch " Find as you type search

set hlsearch" Highlight search terms

set ignorecase

" UI ColorScheme

colorscheme hybrid

set background=dark

" UI Language

set langmenu=en_US

let $LANG = 'en_US'

source $VIMRUNTIME/delmenu.vim

source $VIMRUNTIME/menu.vim

" GUI Setting

if has("gui_running")

set guioptions-=m

set guioptions-=T

""set guifont=Consolas:h14

endif

" Encoding

set encoding=utf-8 " Vim cache encoding

set fileencodings=utf-8,gb18030,gbk " Open file with

set fileencoding=utf-8 " Save file with

set termencoding=chinese" Comply with terminal locale

备注

5f3ffb059b56

vimcolors.com

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值