vim配置
🚒

vim配置

Created
Jan 2, 2021 02:07 PM
Tags
杂项
vim
Author
如果有啥看不懂的可以直接评论哈!(建议先在网上查一下)
我的vim配置(Windows):
syntax on
set number
set cursorline
set mouse=a
set tabstop=4
set shiftwidth=4
set showmatch
set smartindent
set autoindent
set autoread
set autowriteall
set t_Co=256
set background=dark
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap { {}<Left>
inoremap {<CR> {<CR>}<ESC>O
map <F5> : call Compile() <CR>
func! Compile()
	exec 'w'
	exec '!g++ % -lm -Wall -g -o %<'
	exec '!time ./%<'
endfunc
call plug#begin('~/AppData/Local/nvim/plugged')
" below are some vim plugin for demonstration purpose
Plug 'joshdick/onedark.vim'
Plug 'iCyMind/NeoSolarized'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
我的vim配置(WSL Ubuntu)
syntax on
set number
set cursorline
set mouse=a
set tabstop=4
set shiftwidth=4
set showmatch
set smartindent
set autoindent
set autoread
set autowriteall
set hlsearch
set t_Co=256
set background=dark
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap { {}<Left>
inoremap {<CR> {<CR>}<ESC>O
map <F5> : call Compile() <CR>
func! Compile()
	exec 'w'
	exec '!g++ % -lm -Wall -g -o %<'
	exec '!time ./%<'
endfunc
map ;y : !/mnt/c/Windows/System32/clip.exe<cr>u
map ;p :read !/mnt/c/Windows/System32/paste.exe <cr>i<bs><esc>l
我的Vim考场配置(NOI Linux)
syntax on
set number
set cursorline
set mouse=a
set tabstop=4
set shiftwidth=4
set showmatch
set smartindent
set autoindent
set autoread
set autowriteall
set t_Co=256
set background=dark
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap { {}<Left>
inoremap {<CR> {<CR>}<ESC>O
map <F5> : call Compile() <CR>
func! Compile()
	exec 'w'
	exec '!g++ % -lm -Wall -g -o %<'
	exec '!time ./%<'
endfunc
附上我的CLion C++模板:
//Created by yanyanlongxia on ${DATE}
//
#[[#include]]# <bits/stdc++.h>
#[[#define]]# ll long long
#[[#define]]# ull unsigned long long
#[[#define]]# INF 0x3f3f3f3f
#[[#define]]# clm(x) memset(x,0,sizeof(x))
#[[#define]]# infm(x) memset(x,0x3f3f3f3f,sizeof(x))
#[[#define]]# minfm(x) memset(x,-0x3f3f3f3f,sizeof(x))
using namespace std;

int main(){
    //freopen("${NAME}.in","r",stdin);
    //freopen("${NAME}.out","w",stdout);
    
    return 0;
}

Loading Comments...