cshrc gvim 配置

 插件:https://github.com/amix/vimrc.git

## in .cshrc

if (-f $HOME/.alias) then
    source $HOME/.alias
endif

if (-f $HOME/.cshrc.private) then
    source $HOME/.cshrc.private
endif
## in .alias
## 尽量使用 ‘ ’ 而不是 “ ”
alias cd 'cd \!*;wd;ls'
alias wd 'set prompt = "\n`whoami`@"`hostname`":${cwd}\n>"'

alias grepdir 'find .|xargs grep -l $1'
alias g 'gvim'
alias .. 'cd ..'
alias ... "cd ../../"
alias .... "cd ../../../"
alias load 'module load projects'
alias help "cdnshelp&"
alias nome "gnome-terminal&" ## in Makefile add < echo -ne "\033]0; $(test) \007"; >
alias load 'moudle load projects'
alias ls 'ls -hF --color'
alias lr 'll -R'
alias ll "ls -lv --group-directories-first"
alias grep 'grep --color'
alias rm 'rm -i'
alias ss 'source ~/.alias; source ~/.cshrc.private'
alias nome "gnome-terminal&"
alias tel9 "srlogin sh08lo09"
alias pdf "acroread"
alias me 'top -u hognzhen'
alias cpu 'mpstat -P ALL'
alias pkillwave 'pkill -u “hongzhen” "simvision.exe"'
alias pkillxmsim 'pkill -u "hongzhen" "xmsim"'
alias ssh "ssh -X hostname"

##CapsLock transfer to Ctrl
if [-f $HOME/.Xmodmap ]; then
    /usr/bin/xmodmap $HOME/.Xmodmap
fi


.bash
alias g='gvim'
echo "#####################################"
echo "     AKG-Corpt       "
echo "  Welcom "`whoami" to "`hostname`" "
ehco ""
echo "####################################"
in .vimrc

let b:match_words=      '\<begin\>:\<end\>,\<task\>:\<endtask\>,\<module\>:\<endmodule\>,\<package\>:\<endpackage\>,\<function\>:\<endfunction\>,\<fork\>:\<join\>|\<join_any\>\<join_none\>,`ifdef\>:`else\>:`endif\>' ##match插件

au BufRead,BufNewFile *.reg,*.log,*.sv,*.svh,*.txt,*.vf set syntax=systemverilog ##启用sv语法
colorschem desert
set guioptions+=r #显示右边滚动轴
filetype on 
syntax on #语法高亮
set noswapfile #delete buffer file
set nobackup #delete buffer file
set smartindent #沿用上一行缩进
set number 
set showcmd #show command in bottom bar
set cursorline #highlight current line
set cursorcolumn #hidhlight current colum
set showmatch #highlight matching () {}
set tabstop=4 # tab
set foldenable #en zf fold code
set guifont=Monospace\ 11
set wildmenu
set nocompatible
set backspace=indent,eol,start
set history = 700
set showcmd
set guifont=Monospace\ Regular\ 17
set t_Co=256
set encoding=ufg8

set nobackup
set nowb
set noswapfile

" Return to last edit position when opening files 
autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") | 
    \     exe "normal! g`\"" |
    \ endif


set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
Plugin 'VundleVim/Vundle.vim'

"SuperTab
Plugin 'SuperTab'
Plugin 'MiniBufExpl'
Plugin 'scrooloose/nerdtree'

"systemverilog
Plugin 'yuhaos/vim-SystemVerilog'

filetype plugin indent on "required!

if has("gui_running")
    set background=dark
    let g:solarized_termcolors=256
    let g:solarized_italic=1
    let g:solarized_bold=1
    let g:solarized_underline=1
    let g:solarized_visibility="high"
    let g:solarized_contrast="high"
    set fillchars=vert:\
    colorscheme solarized

    set lines=38
    set co=110
    set guioptions-=T
    set guioptions+=e
endif
" solarized 
"MiniBuffer
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplForceSyntaxEnable = 1
let g:miniBufExplorerMoreThanOne = 2
let g:miniBufExplModSelTarget = 0

let mapleader = "," #特殊用途
inoremap jk <esc> # jk 代替 <esc> 键
nnoremap <BackSpace> :nohl<CR> #代替:nohl

inoremap " ""<esc>i
inoremap ( ()<esc>i
inoremap { {}<esc>i
inoremap [ []<esc>i  #自动补全

"Set mapleader"
let mapleader = ","

"MiniBufferExplore"
let g:miniBufExpMapWindowNavVim = 1 #插件

map <F3> :NERDTreeMirror<CR> ##插件
map <F3> :NERDTreeToggle<CR>

nnoremap <Leader>w :w<CR> ##启用leader键
nnoremap <leader>v :Vexplore<CR>
nnoremap <Leader>q :quit<CR>
nnoremap <Leader>s :Sexplore<CR>
nnoremap <Leader>e :Explore<CR>

vnoremap <C-C> "+y
nnoremap <C-P> "+gP

set isfname+={,}

vmap v <Plug>(expand_region_expand) 
vmap <C-v><Plug>(expand_region_shrink)

set encoding=utf-s #打出特殊符号

##可选
set hls ##高亮匹配
set is  ##部分匹配
set ic  ##忽略大小写
set nu  ##显示行号
##补充

setenv xxx_PATH /home/xxx/xxxx
alias pdf 'okular'
alias WC 'find "*.sv" | xargs wc -l '
alias bcompare 'ic/tools/bcompare/4.3.3/bcompare.sh'
alias Verdi 'verdi -dbdir simv.daidir -ssf tb_top.fsdb & '
alias ooffice 'soffice'

module avail license

module av

module list

moduel disp license/xxx

lmstat -S -c 服务器端口

-debug_access_all #不需要指定Verdi的库
-kdb -lca # verdi databook

VCS 使用
https://blog.csdn.net/cy413026/article/details/84648952#1.VCS%E7%9A%84%E7%BC%96%E8%AF%91%E8%A7%A3%E6%9E%90

VCS单步调试
http://blog.chinaaet.com/weiqi7777/p/5100052143/#

verdi基础:
https://blog.csdn.net/immeatea_aun/article/details/80961258

验证学习:
http://cluelogic.com/

gvim:
Tabular: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
easy-align: http://www.wklken.me/posts/2015/06/07/vim-plugin-easyalign.html https://www.bbsmax.com/A/qVdePZb5Pg/
vim自动补全功能 : https://blog.csdn.net/matricer/article/details/50831533
SuperTab : https://mounui.com/217.html https://github.com/vim-scripts/SuperTab

vim使用总结:
CSDN: https://blog.csdn.net/callinglove/article/details/51868170
GVim和插件管理工具Vundle: https://www.jianshu.com/p/972655d2b722?from=singlemessage

set history=700
set nu
set ruler
set statusline=[%F]%y%r%m*%=[Line:%l/%L,Column:%c][%p%%]

" 折叠代码
set foldenable             " 开始折叠
set foldmethod=syntax      " 设置语法折叠
set foldcolumn=0           " 设置折叠区域的宽度
setlocal foldlevel=1       " 设置折叠层数为
set foldlevel=100          " 文件打开时不折叠
set foldclose=all          " 设置为自动关闭折叠      

set wildmenu
set wildmode=longeset:list

set hidden " 允许在有未保存的修改时切换缓冲区,此时的修改由 vim 负责保存
set ignorecase smartcase " 搜索时忽略大小写,但在有一个或以上大写字母时仍保持对大小写敏感
set incsearch " 输入搜索内容时就显示搜索结果
set hlsearch " 搜索时高亮显示被找到的文本
set magic " 设置魔术
set showmatch " 插入括号时,短暂地跳转到匹配的对应括号
set matchtime=2 " 短暂跳转到匹配括号的时间

set guifont=Monospace\ Regular\ 12
set t_Co=256

set encoding=utf8

set nobackup " 覆盖文件时不备份

" Switch CWD to the directory of the open buffer
map <leader>cd  :cd %:p:h<cr>:pwd<cr>

" 打开文件时,总是跳到退出之前的光标处
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\   exe "normal! g`\"" |
\ endif
set viminfo^=%

"Remap VIM 0 to first non-blank character
map 0 ^

.vim 结构
autoload/
bundle/
----minibufexpl.vim-master/
----SuperTab-master/

colors/
doc/
ftdetect/
ftplugin/
indent/
plugin/
syntax/



" FOR Vundle
filetype off " required!
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
Plugin 'VundleVim/Vundle.vim'
Plugin 'SuperTab'
Plugin 'MiniBufExpl'
Plugin 'scrooloose/nerdtree'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'yuhaos/vim-SystemVerilog'
Plugin 'altercation/vim-colors-solarized'
Plugin 'junegunn/vim-easy-align'
Plugin 'vim-scripts/matchit.zip'
Plugin 'tabular-master'

filetype plugin indent on "required !

" Setting for the plugins
if has("gui_runing")
	set background=dark
	let g:solarized_termcolors=256
	let g:solarized_italic=256
	let g:solarized_bold=1
	let g:solarized_underline=1
	let g:solarized_visibility="high"
	let g:solarized_contrast="high"
	set fillchars=vert:\
	colorscheme solarized
	set lines=38
	set co=100
	set guioptions-=T
	set guioptions+=e
endif

let NERDTreeWinSize=30
map <F2> :NERDTreeToggle<ENTER>

map <F3> :call SetColorColumn()<CR>
function! SetColorColumn()
    let col_num = virtcol(".")
    let cc_list = split(&cc, ',')
    if count(cc_list, string(col_num)) <= 0
        execute "set cc+=".col_num
    else
        execute "set cc-=".col_num
    endif
endfunction

let b:match_words=
  \ '\<begin\>:\<end\>,' .
  \ '\<if\>:\<else\>,' .
  \ '\<module\>:\<endmodule\>,' .
  \ '\<class\>:\<endclass\>,' .
  \ '\<program\>:\<endprogram\>,' .
  \ '\<clocking\>:\<endclocking\>,' .
  \ '\<property\>:\<endproperty\>,' .
  \ '\<sequence\>:\<endsequence\>,' .
  \ '\<package\>:\<endpackage\>,' .
  \ '\<covergroup\>:\<endgroup\>,' .
  \ '\<primitive\>:\<endprimitive\>,' .
  \ '\<specify\>:\<endspecify\>,' .
  \ '\<generate\>:\<endgenerate\>,' .
  \ '\<interface\>:\<endinterface\>,' .
  \ '\<function\>:\<endfunction\>,' .
  \ '\<task\>:\<endtask\>,' .
  \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
  \ '\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,' .
  \ '`ifdef\>:`else\>:`endif\>,'

"easymotion
nmap ss <Plug>(easymotion-s2)

"MiniBuffer
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplForceSyntaxEnable = 1
let g:miniBufExplorerMoreThanOne = 2
let g:miniBufExplModSelTarget = 0

vnoremap <C-C> "+y
nnoremap <C-P> "+gP

set isfname+={,}

set hls
set is
set ic
set tabstop=4


inoremap:https://blog.csdn.net/weixin_34194702/article/details/85820357

cnoremap:https://segmentfault.com/a/1190000000666875

set wildmenu:http://blog.itpub.net/267265/viewspace-2214837/

<silent>:https://zhidao.baidu.com/question/202265677957556005.html

插件:Supetab minibufexpl matchit vim-colors-solarized vim-easy-align vim-easymotion vim-SystemVerilog 

猜你喜欢

转载自blog.csdn.net/Holden_Liu/article/details/99753911