.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

"plugin management 

execute  pathogen#infect()

filetype plugin indent on


"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</span>

set backspace=indent,eol,start

set cc=85

set wrap
set tabstop=4
set softtabstop=4
set shiftwidth=4
"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

"set for ctags, list all avaliable match items when press ctrl+] or ":tag xxx"

nmap <C-]> g<C-]>

"save setup
let mapleader = "\<Space>"
"save and exit
nmap <leader>w :w!<cr>
nmap <leader>q :q!<cr>

nmap <leader>Q :q!<cr>

"split windows
nmap <leader>v :vs<cr>
nmap <leader>s :sp<cr>

"add line comment --//
nmap <leader>c I#<Esc>

nmap <leader>t :read !date<CR>I//XXNAME:

"indent whole file with indent from verilog_systemverilog.vim

nmap <leader>f <Esc>gg=G

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

"remove the first charactor, like // or # or " comment flag

autocmd FileType python,perl                     nnoremap <leader>d 0x

autocmd FileType c,verilog_systemverilog nnoremap <leader>d 0xx

autocmd FileType vim                                 nnoremap <leader>d 0x

"highlight specified keywrod
syntax keyword Todo ACTION FIXME TODO

"set timestamp for comment

nmap <leader>t :read !date<CR>I//NAME:

"indent whole file from bundle/xx/indent or .vim/indent/ base on filetypenmap <leader>f  <Esc>

"open this file for edit
nmap <leader>e :tabnew ~/.vimrc<cr>

"show pwd: current path
nmap <leader>p :pwd<cr>

"Control 2/4 space for tab
nnoremap <Leader>2 :set tabstop=2 softtabstop=2 shiftwidth=2<CR>
nnoremap <Leader>4 :set tabstop=4 softtabstop=4 shiftwidth=4<CR>

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

"set global tags path

set tags+=~/self_labs/uvm-1.2/.tags

"set python/ruby file header

nmap <leader>py  0i#! /usr/bin/env python3<CR>

nmap <leader>rb 0i#! /usr/bin/env ruby<CR>

"Cancel the function of up/down/left/right
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>

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

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

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

nmap <Leader>py 0i#! /usr/bin/env python3<CR>
map <F2> :call Add_python_argparse()<cr>
map <F3> :call Add_python_main_cond()<cr>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值