Skip to content

Commit a6952b1

Browse files
author
245950258
committed
add plugin
1 parent 25f185c commit a6952b1

File tree

3 files changed

+139
-0
lines changed

3 files changed

+139
-0
lines changed

plugin/airline.vim

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2+
" AirLine 设置开始
3+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
let g:airline#extensions#tabline#formatter = 'default'
5+
let g:airline#extensions#tabline#left_sep = ' '
6+
let g:airline#extensions#tabline#left_alt_sep = '|'
7+
let g:airline#extensions#tabline#enabled = 1
8+
let g:airline_theme='molokai'
9+
" 映射切换buffer的键位
10+
nnoremap <C-Tab> :bp<CR>
11+
nnoremap <C-s-Tab> :bn<CR>
12+
set guifont=DroidSansMono\ Nerd\ Font\ Mono\ Italic\ 12
13+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
14+
" AirLine 设置结束
15+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

plugin/filetype.vim

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
" /\ /\
2+
" |`\\_,--="=--,_//`|
3+
" \ ." :'. .': ". /
4+
" ==) _ : ' : _ (==
5+
" |>/O\ _ /O\<|
6+
" | \-"~` _ `~"-/ |
7+
" >|`===. \_/ .===`|<
8+
" .-"-. \===' | '===/ .-"-.
9+
".--------------------{'. '`}---\, .-'-. ,/---{.'. '}-------------------.
10+
" ) `"---"` `~-===-~` `"---"` (
11+
"( __ __ _ )
12+
" ) \ \ / / | | (
13+
"( \ \ /\ / /__| | ___ ___ _ __ ___ ___ )
14+
" ) \ \/ \/ / _ \ |/ __/ _ \| '_ ` _ \ / _ \ (
15+
"( \ /\ / __/ | (_| (_) | | | | | | __/ )
16+
" ) \/ \/ \___|_|\___\___/|_| |_| |_|\___| (
17+
"( )
18+
" ) (
19+
"( __ __ ____ _ _____ _ )
20+
" ) \ \ / / | _ \(_) | __ \ (_) (
21+
"( \ \ /\ / / _| |_) |_ _ __ __ _| |__) | _ _ )
22+
" ) \ \/ \/ / | | | _ <| | '_ \ / _` | _ / | | | | (
23+
"( \ /\ /| |_| | |_) | | | | | (_| | | \ \ |_| | | )
24+
" ) \/ \/ \__,_|____/|_|_| |_|\__, |_| \_\__,_|_| (
25+
"( __/ | )
26+
" ) |___/ (
27+
"'------------------------------------------------------------------------'
28+
29+
"*****************************************************************************
30+
" Add Header
31+
"*****************************************************************************
32+
"新建.c, .h, .sh, .jave, .scala文件, 自动插入文件头
33+
autocmd BufNewFile *.v exec ":call VTitle()"
34+
autocmd BufNewFile *.sv exec ":call SVTitle()"
35+
autocmd BufNewFile *.scala exec ":call SCTitle()"
36+
autocmd BufNewFile *.c exec ":call CTitle()"
37+
autocmd BufNewFile *.java exec ":call JAVATitle()"
38+
39+
func VTitle()
40+
if (&filetype == 'verilog')
41+
call setline(1, "\// -----------------------------------------------------")
42+
call setline(2, "\// Copyright 2021. All Rights Reserved.")
43+
call setline(3, "\// -----------------------------------------------------")
44+
call setline(4, "\// File Name : ".expand("%"))
45+
call setline(5, "\// Author : Wu Bingrui")
46+
call setline(6, "\// Created : ".strftime("%c"))
47+
call setline(7, "\// -----------------------------------------------------")
48+
endif
49+
endfunc
50+
51+
func SVTitle()
52+
if (&filetype == 'systemverilog')
53+
call setline(1, "\// -----------------------------------------------------")
54+
call setline(2, "\// Copyright 2021. All Rights Reserved.")
55+
call setline(3, "\// -----------------------------------------------------")
56+
call setline(4, "\// File Name : ".expand("%"))
57+
call setline(5, "\// Author : Wu Bingrui")
58+
call setline(6, "\// Created : ".strftime("%c"))
59+
call setline(7, "\// -----------------------------------------------------")
60+
endif
61+
endfunc
62+
63+
func SCTitle()
64+
if (&filetype == 'scala')
65+
call setline(1, "\// -----------------------------------------------------")
66+
call setline(2, "\// Copyright 2021. All Rights Reserved.")
67+
call setline(3, "\// -----------------------------------------------------")
68+
call setline(4, "\// File Name : ".expand("%"))
69+
call setline(5, "\// Author : Wu Bingrui")
70+
call setline(6, "\// Created : ".strftime("%c"))
71+
call setline(7, "\// -----------------------------------------------------")
72+
endif
73+
endfunc
74+
75+
func CTitle()
76+
if (&filetype == 'c')
77+
call setline(1, "\// -----------------------------------------------------")
78+
call setline(2, "\// Copyright 2021. All Rights Reserved.")
79+
call setline(3, "\// -----------------------------------------------------")
80+
call setline(4, "\// File Name : ".expand("%"))
81+
call setline(5, "\// Author : Wu Bingrui")
82+
call setline(6, "\// Created : ".strftime("%c"))
83+
call setline(7, "\// -----------------------------------------------------")
84+
endif
85+
endfunc
86+
87+
func JAVATitle()
88+
if (&filetype == 'java')
89+
call setline(1, "\// -----------------------------------------------------")
90+
call setline(2, "\// Copyright 2021. All Rights Reserved.")
91+
call setline(3, "\// -----------------------------------------------------")
92+
call setline(4, "\// File Name : ".expand("%"))
93+
call setline(5, "\// Author : Wu Bingrui")
94+
call setline(6, "\// Created : ".strftime("%c"))
95+
call setline(7, "\// -----------------------------------------------------")
96+
endif
97+
endfunc

plugin/plugin.vim

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2+
" Vundle 设置开始
3+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
set rtp+=~/.vim/bundle/Vundle.vim
5+
" vundle 管理的插件列表必须位于 vundle#begin() 和 vundle#end() 之间
6+
call vundle#begin()
7+
Plugin 'VundleVim/Vundle.vim'
8+
Plugin 'zhuzhzh/verilog_emacsauto.vim'
9+
Plugin 'vim-airline/vim-airline'
10+
Plugin 'vim-airline/vim-airline-themes'
11+
Plugin 'Align'
12+
Plugin 'exvim/ex-autocomplpop'
13+
Plugin 'scrooloose/nerdtree' " File tree manager
14+
Plugin 'jistr/vim-nerdtree-tabs' " enhance nerdtree's tabs
15+
Plugin 'ryanoasis/vim-devicons' " add beautiful icons besides files
16+
Plugin 'Xuyuanp/nerdtree-git-plugin' " display git status within Nerdtree
17+
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' " enhance devicons
18+
"Plugin 'preservim/tagbar' "
19+
"Plugin 'MarcWeber/vim-addon-mw-utils'
20+
"Plugin 'tomtom/tlib_vim'
21+
"Plugin 'garbas/vim-snipmate'
22+
"Plugin 'honza/vim-snippets'
23+
call vundle#end()
24+
filetype plugin indent on
25+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
26+
" Vundle 设置结束
27+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

0 commit comments

Comments
 (0)