当前位置:网站首页>Configure your own VIM editor God
Configure your own VIM editor God
2022-07-22 20:34:00 【DmrForever】
## Configure your own Vim- The God of editor
I'm learning Vim In the process , Seeing a sentence particularly inspires me ,** “Vim Edit the text at the speed of thinking ” **.Vim Called the God of editor , This represents its efficiency 、 status .
In the process of learning , I recorded my first Vim To configure , use Vundle( There are many ways to install online ) Plug in management .
### Plug in used
- Plugin 'gmarik/Vundle.vim'
- Plugin 'tmhedberg/SimpylFold'
- Plugin 'Valloric/YouCompleteMe'
- Plugin 'Raimondi/delimitMate'
- Plugin 'scrooloose/nerdtree'
- Plugin 'Xuyuanp/nerdtree-git-plugin'
- Plugin 'Lokaltog/powerline'
- Plugin 'scrooloose/nerdcommenter'
- Plugin 'NLKNguyen/papercolor-theme'
- Plugin 'fatih/vim-go'
- Plugin 'Tagbar'
- Plugin 'ludovicchabant/vim-gutentags'
- Plugin 'Blackrush/vim-gocode'
- Plugin 'honza/vim-snippets'
- Plugin 'SirVer/ultisnips'
- Plugin 'frazrepo/vim-rainbow'
- Plugin 'jisaacks/GitGutter'
- Plugin 'mileszs/ack.vim'
### To configure .vimrc
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details
" For multi-byte character support (CJK support, for example):
" set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
set expandtab " Use the appropriate number of spaces to insert a <Tab>.
" Spaces are used in indents with the '>' and '<' commands
" and when 'autoindent' is on. To insert a real tab when
" 'expandtab' is on, use CTRL-V <Tab>.
set smarttab " When on, a <Tab> in front of a line inserts blanks
" according to 'shiftwidth'. 'tabstop' is used in other
" places. A <BS> will delete a 'shiftwidth' worth of space
" at the start of the line.
set showcmd " Show (partial) command in status line.
set number " Show line numbers.
set showmatch " When a bracket is inserted, briefly jump to the matching
" one. The jump is only done if the match can be seen on the
" screen. The time to show the match can be set with
" 'matchtime'.
set hlsearch " When there is a previous search pattern, highlight all
" its matches.
set incsearch " While typing a search command, show immediately where the
" so far typed pattern matches.
set ignorecase " Ignore case in search patterns.
set smartcase " Override the 'ignorecase' option if the search pattern
" contains upper case characters.
set backspace=2 " Influences the working of <BS>, <Del>, CTRL-W
" and CTRL-U in Insert mode. This is a list of items,
" separated by commas. Each item allows a way to backspace
" over something.
set autoindent " Copy indent from current line when starting a new line
" (typing <CR> in Insert mode or when using the "o" or "O"
" command).
set textwidth=79 " Maximum width of text that is being inserted. A longer
" line will be broken after white space to get this width.
set formatoptions=c,q,r,t " This is a sequence of letters which describes how
" automatic formatting is to be done.
"
" letter meaning when present in 'formatoptions'
" ------ ---------------------------------------
" c Auto-wrap comments using textwidth, inserting
" the current comment leader automatically.
" q Allow formatting of comments with "gq".
" r Automatically insert the current comment leader
" after hitting <Enter> in Insert mode.
" t Auto-wrap text using textwidth (does not apply
" to comments)
set ruler " Show the line and column number of the cursor position,
" separated by a comma.
set background=dark " When set to "dark", Vim will try to use colors that look
" good on a dark background. When set to "light", Vim will
" try to use colors that look good on a light background.
" Any other value is illegal.
"set mouse=a " Enable the use of the mouse.
filetype plugin indent on
syntax on
set nocompatible " required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
set laststatus=2 " Always show the status bar
set t_Co=256 " stay Windows of use xshell Connection open vim Can display color
Plugin 'tmhedberg/SimpylFold' " Fold
Plugin 'Valloric/YouCompleteMe' " Automatic completion
let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf = 0
Plugin 'Raimondi/delimitMate' " Brackets and quotation marks match
Plugin 'scrooloose/nerdtree' " Directory tree
Plugin 'Xuyuanp/nerdtree-git-plugin' " This plug-in can display the Git Add / delete status
" Ctrl+N open / close
map <C-n> :NERDTreeToggle<CR>
" When opened without parameters Vim Automatically load the project tree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Close the project tree pane when all files are closed
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Do not display these files
let NERDTreeIgnore=['\.pyc$', '\~$', 'node_modules'] "ignore files in NERDTree
" Do not display additional information on the project tree , For example, help 、 Prompt something
let NERDTreeMinimalUI=1
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} " status bar
set guifont=Inconsolata\ for\ Powerline:h15
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8
Plugin 'scrooloose/nerdcommenter' " commenter: \cc \cu
let mapleader=';'
Plugin 'NLKNguyen/papercolor-theme'
set t_Co=256 " This is may or may not needed.
set background=dark
colorscheme PaperColor
Plugin 'fatih/vim-go'
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_operators = 1
let g:go_highlight_extra_types = 1
let g:go_fmt_command = "goimports"
Plugin 'Tagbar'
let g:tagbar_width = 30
nmap <F9> :TagbarToggle<CR>
let g:tagbar_autopreview = 1
let g:tagbar_sort = 0
Plugin 'ludovicchabant/vim-gutentags'
" gutentags Search for project directory logo , Come across these documents / The directory name stops recursion to the next level
let g:gutentags_project_root = ['.root', '.svn', '.git', '.project']
" The name of the generated data file
let g:gutentags_ctags_tagfile = '.tags'
" Will automatically generate tags Put all the documents in ~/.cache/tags Directory , Avoid polluting the project catalogue
let s:vim_tags = expand('~/.cache/tags')
let g:gutentags_cache_dir = s:vim_tags
" testing ~/.cache/tags New if it doesn't exist
if !isdirectory(s:vim_tags)
silent! call mkdir(s:vim_tags, 'p')
endif
" To configure ctags Parameters of
let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q']
let g:gutentags_ctags_extra_args += ['--c++-kinds=+pxI']
let g:gutentags_ctags_extra_args += ['--c-kinds=+px']
Plugin 'Blackrush/vim-gocode'
imap <F6> <C-x><C-o>
Plugin 'honza/vim-snippets'
Plugin 'SirVer/ultisnips'
" Directly through... In insert mode <C-z> Key to trigger UltiSnips Code block completion
let g:UltiSnipsExpandTrigger="<C-z>"
" eject UltiSnips The list of available , Because it's not often used , So it's set as a special <C-i> mapping
let g:UltiSnipsListSnippets="<C-i>"
"<C-f> Jump to the next code block editable area
let g:UltiSnipsJumpForwardTrigger="<C-f>"
"<C-b> Jump to the previous code block editable area
let g:UltiSnipsJumpBackwardTrigger="<C-b>"
Plugin 'frazrepo/vim-rainbow'
let g:rainbow_active = 1
Plugin 'jisaacks/GitGutter'
Plugin 'mileszs/ack.vim'
call vundle#end() " required
filetype plugin indent on " required
### Configuration effect ( You can choose a better theme according to your preference )
+ zsh
+ vim
Details can be referred to : [Vim Learning notes ]("https://github.com/kktao/vim-learn")
边栏推荐
- LeetCode0003——longest substring without repeating characters——Sliding Window
- Classic cases of semaphore synchronization and mutual exclusion
- 1034 Head of a Gang (30 分)
- docker搭建mysql主从复制
- 通过@Autowired注入的bean,即使这个类上没有标注@Comment等这一类的注解,但是这个bean依然能够注入进来
- 1030 travel plan (30 points)
- Exclusive interview with Huang Hui, a scholar of women in AI: dream of drawing shapes and find the door to breakthrough
- 没有人知道TikTok的最新流行产品Pink Sauce中含有什么成分
- LeetCode160 & LeetCode141——double pointers to solve the linked list
- 她力量系列五丨朱海一:以人为本,构建 AI 价值观
猜你喜欢
Her power series III holds the current, adheres to love, and is tied to the scientific research road of food image recognition
LeetCode32——next permutation
Signal noise reduction method
On the horizontal trigger and edge trigger of epoll
LeetCode103——zigzagLevelOrder of binary tree
【文献阅读与想法笔记14】Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising
LeetCode103——zigzagLevelOrder of binary tree
Exclusive interview with Huang Hui, a scholar of women in AI: dream of drawing shapes and find the door to breakthrough
docker搭建mysql主从复制
本地镜像发布到私有库
随机推荐
1049 counting ones (30 points)
Exclusive interview with Huang Hui, a scholar of women in AI: dream of drawing shapes and find the door to breakthrough
Pre training weekly 39: deep model, prompt learning
redission分布式锁种类
她力量系列六丨杨笛一:女孩长大后数理化可以很好,科研可以很鲜活
Latex在VSCODE中编译报错`Recipe terminated with error. Retry building the project.
Vscode关闭自动更新
Causal learning weekly, issue 10: introduction to the latest causal discovery related papers in iclr2022
IDEA背景图片集
MySQL query blob
mysql引擎
RAG小结
[literature reading and thought notes 14] beyond a Gaussian noise: residual learning of deep CNN for image recognition
1049 Counting Ones (30 分)
LeetCode146——LRU Cache——DS Design
栈实现(C语言)
Her power series III holds the current, adheres to love, and is tied to the scientific research road of food image recognition
她力量系列四丨读博6年两次换导师,靠一点点“倔”,俞舟成为social chatbot的开拓者之一
Deep understanding of MMAP function
Dense passage retrieval for open domain question answering notes