-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
81 lines (79 loc) · 2.53 KB
/
.vimrc
1
2
3
4
5
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
set nu
set history=100
set ts=4
set ignorecase
set noic
colorscheme desert
syntax on
" set fileformats=unix
" set fileformats=dos
" set fileformats=mac
"-----------------------------------------------------------"
source ~/.vundlerc
"-----------------------------------------------------------"
:imap <M-1> <C-O>lgt<ESC>
:imap <M-2> <C-O>lgt<ESC>
:imap <M-3> <C-O>lgt<ESC>
:nmap<C-S-tab> :tabprevious<cr>
:nmap<C-tab> :tabnext<cr>
imap <S-Enter> <ESC>o
" imap <a-Enter> <right>
imap <a-Enter> <ESC>O
imap <c-Enter> <right>
" imap <a-Enter> <Left>
" imap <s-\> <Left>
:nmap K 10k
:nmap L l
:nmap J 10j
:nmap <c-h> <c-w>h
:nmap <c-j> <c-w>j
:nmap <c-k> <c-w>k
:nmap <c-l> <c-w>l
:nmap <space> 20j
:nmap <s-Space> 20k
"-----------------------------------------------------------"
"set t_ti= t_te= "XTEM when close vim keep content on teminal
set ruler
set autoindent
set smartindent
set smarttab
set tabstop=4
set shiftwidth=4
set expandtab
set list listchars=tab:>-
set virtualedit=all
"-----------------------------------------------------------"
"set undofile
"set backup
"set noswapfile
set noundofile
set nobackup
set noswapfile
"-----------------------------------------------------------"
" file type set for unkown file
au BufRead,BufNewFile *.sv,*.svh,*.svi set filetype=systemverilog
" au BufRead,BufNewFile *.v,*.vh set filetype=verilog
au BufRead,BufNewFile .vundlerc set filetype=vim
au BufRead,BufNewFile *.lark set filetype=lark
"-----------------------------------------------------------"
" Plugin commentary setting
autocmd FileType python setlocal commentstring=#\ %s
autocmd FileType apache setlocal commentstring=#\ %s
autocmd FileType verilog setlocal commentstring=//\ %s
autocmd FileType lark setlocal commentstring=//\ %s
autocmd FileType systemverilog setlocal commentstring=//\ %s
autocmd FileType c setlocal commentstring=//\ %s
autocmd FileType tcl setlocal commentstring=#\ %s
autocmd FileType vhdl setlocal commentstring=--\ %s
autocmd FileType javascript setlocal commentstring=--\ %s
"-----------------------------------------------------------"
" Plugin NERDTree setting
autocmd StdinReadPre * let s:std_in=1
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
map <C-n> :NERDTreeToggle<CR>
let NERDTreeWinSize=22
"-------------------------------------------------------------------
" Plugin autoclose setting
" autocmd FileType verilog let b:AutoClosePairs_del = "`"
" autocmd FileType systemverilog let b:AutoClosePairs_del = "`"
let g:AutoClosePairs_del = "`"