Wednesday, 31 October 2018

vimrc_file


set diffexpr=MyDiff()
colorscheme slate
set nocompatible
set number
set guifont=Consolas:h11:cDEFAULT
set colorcolumn=80
set spell
set secure
set textwidth=80
syntax enable
set tabstop=2
set softtabstop=2
set shiftwidth=2
set smarttab
set ic
set nobackup
filetype indent on
set smartindent
set autoindent
set wildmenu
set lazyredraw
set showmatch
set smartcase
set incsearch
set hlsearch
set backspace=indent,eol,start
set visualbell
set noswapfile
set encoding=utf-8
set fileencoding=utf-8
set autochdir


au BufNewFile,BufRead *.sv*,*.svh,.vh,*.v,*.log*,*.out,*.fail,*.txt,*.hex,*.opt,*.mem,*.rc,*.debug,*.cfg,*.list so D:\EDA_Installations\Vim\vimfiles\syntax/systemverilog.vim


set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg1 = substitute(arg1, '!', '\!', 'g')
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg2 = substitute(arg2, '!', '\!', 'g')
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let arg3 = substitute(arg3, '!', '\!', 'g')
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      if empty(&shellxquote)
        let l:shxq_sav = ''
        set shellxquote&
      endif
      let cmd = '"' . $VIMRUNTIME . '\diff"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  let cmd = substitute(cmd, '!', '\!', 'g')
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
  if exists('l:shxq_sav')
    let &shellxquote=l:shxq_sav
  endif
endfunction





/************************this is for header, please ignore if you don't want***********************/

autocmd bufnewfile *.c so D:\EDA_Installations\Vim\vimfiles\header_files\cheader.vim
autocmd bufnewfile *.c exe "1," . 6 . "g/File Name :.*/s//File Name : " .expand("%")
autocmd bufnewfile *.c exe "1," . 6 . "g/File Type :.*/s//File Type : c_type"
autocmd bufnewfile *.c exe "1," . 6 . "g/Creation Date :.*/s//Creation Date : " .strftime("%d-%m-%Y")
autocmd Bufwritepre,filewritepre *.c execute "normal ma"

autocmd bufnewfile *.v so D:\EDA_Installations\Vim\vimfiles\header_files\verilog.vim
autocmd bufnewfile *.v exe "1," . 6 . "g/File Name :.*/s//File Name : " .expand("%")
autocmd bufnewfile *.v exe "1," . 6 . "g/File Type :.*/s//File Type : verilog"
autocmd bufnewfile *.v exe "1," . 6 . "g/Creation Date :.*/s//Creation Date : " .strftime("%d-%m-%Y")
autocmd bufwritepost,filewritepost *.v execute "normal `a"

autocmd bufnewfile *.sv so ~/.vim/header_files/sv_header.txt
autocmd bufnewfile *.sv exe "2," . 7 . "g/File Name.*/s//File Name                        : " .expand("%")
autocmd bufnewfile *.sv exe "5," . 7 . "g/File Type.*/s//File Type                  : system_verilog"
autocmd bufnewfile *.sv exe "5," . 7 . "g/Creation Date :.*/s//Creation Date : " .strftime("%d-%m-%Y")
autocmd bufwritepost,filewritepost *.sv execute "normal `a"

No comments:

Post a Comment

What do 10 nm and 15 nm stand for in VLSI? nm=nano meter                     So, 10nm means in digital elections perspective the dist...

Design verification Engineer