.vimrc


"show line number
set number

set autoindent
set smartindent

"colorscheme set
syntax enable
syntax on
"if has('gui_running')
" set background=dark
"else
" set background=light
"endif

"set background=light
set background=dark
colorscheme solarized
"hi Normal guibg=#99cc99 guifg=Black
"hi LineNr guibg=#003366 guifg=#99ccff ctermbg=7777 ctermfg=blue
set cursorline
"hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=#66cc99 guifg=black


"set font size 
set guifont=Courier\ 16

''toolbar hide...
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar

set cc=85

set wrap
set tabstop=2
set softtabstop=2
set shiftwidth=2
"Special setup for python
autocmd FileType python setlocal tabstop=4 softtabstop=4 shiftwidth=4


"let tab display as >---, end of line display as -
set listchars=tab:>-,eol:-
"set list
"use space instead tab
set expandtab

"nobackup file : x.sv~
set nobackup

"set undo directory for all files
set undofile
set undodir=~/.undodir

"save setup
let mapleader = "\"
"save and exit
nmap w :w!
nmap q :q!

"split windows
nmap v :vs
nmap s :sp

"add line comment --//
nmap c I#

"ALL--->add different comment "//or #" for different type of file
autocmd FileType python,perl                     nnoremap c I#
autocmd FileType c,verilog_systemverilog nnoremap c I//
autocmd FileType vim                                 nnoremap c I"

"remove the first charactor, like // or # or " comment flag autocmd FileType python,perl                     nnoremap d 0x autocmd FileType c,verilog_systemverilog nnoremap d 0xx autocmd FileType vim                                 nnoremap d 0x   "highlight specified keywrod
syntax keyword Todo ACTION FIXME TODO   "set timestamp for commenct nmap t :read !dateI//lxin:   "indent whole file from bundle/xx/indent or .vim/indent/ base on filetypenmap

"open this file for edit
nmap e :tabnew ~/.vimrc

"show pwd: current path
nmap p :pwd

"Control 2/4 space for tab
nnoremap 2 :set tabstop=2 softtabstop=2 shiftwidth=2
nnoremap 4 :set tabstop=4 softtabstop=4 shiftwidth=4

"set for ctags,list all available match items when press ctrl+] or ":tag xx"
nmap g

"set global tags path set tags+=/home/xin.li01/self_labs/uvm-1.2/.tags   "set python/ruby file header nmap py  0i#! /usr/bin/env python3 nmap rb 0i#! /usr/bin/env ruby

"Cancel the function of up/down/left/right
noremap
noremap
noremap
noremap

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Common---Applications
"Function definition path: ~/.vim/plugin/common_func.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map :call AddAuthor()

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Python---Applications
"Function definition path: ~/.vim/plugin/python_func.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"Set python file header "#! /usr/bin/env python3"

nmap py 0i#! /usr/bin/env python3
map :call Add_python_argparse()
map :call Add_python_main_cond()