vimrc 配置
效果图:
image.png
mkdir ~/.vim
touch vimrc
vim vimrc # 然后开始配置vimrc
#配置完毕后,需要source vimrc
source ~/.vim/vimrc
分屏的配置:
image.png
光标配置
image.png
image.png
image.png
风格插件
image.png
1 set nocompatible
2 set encoding=utf-8
3 set expandtab
4 set tabstop=2
5 set shiftwidth=2
6 set softtabstop=2
7
8
9
10
11 set number
12 set norelativenumber
13 set cursorline
14 set showcmd
15 set wildmenu
16 set hlsearch
17 set incsearch
18 set ignorecase
19 set smartcase
20 map W :w<CR>
21 map Q :q<CR>
22 map s <nop>
23 map sl :set splitright<CR>:vsplit<CR>
24 map sh :set nosplitright<CR>:vsplit<CR>
25 map sj :set splitbelow<CR>:split<CR>
26 map sk :set nosplitbelow<CR>:split<CR>
27 let mapleader="\<space>"
28 map <LEADER>k <C-w>k
29 map <LEADER>j <C-w>j
30 map <LEADER>h <C-w>h
31 map <LEADER>l <C-w>l
32 map <LEADER>e :res +5<CR>
33 map <LEADER>d :res -5<CR>
34 map <LEADER>f :vertical resize+5<CR>
35 map <LEADER>s :vertical resize-5<CR>
36 map tu :tabe<CR>
37 map th :-tabNext<CR>
38 map tl :+tabNext<CR>
39 map <LEADER>v <C-w>t<C-w>H
40 map <LEADER>t <C-w>t<C-w>K
41 noremap K 5k
42 noremap J 5j
43 noremap H 5h
44 noremap L 5l
45 noremap <LEADER><CR> :nohlsearch<CR>
46 call plug#begin('~/.vim/plugged')
47 Plug 'vim-airline/vim-airline'
48 Plug 'connorholyday/vim-snazzy'
49 call plug#end()
50 color snazzy
51 let g:SnazzyTransparent = 1
网友评论