Compare commits

...

10 Commits

Author SHA1 Message Date
2c5824b33c 提升性能 2025-04-27 09:08:43 +08:00
23ca3dda4e support tabby auto detect work dir 2025-04-25 17:24:42 +08:00
5e7db775ed rm unused map 2025-04-25 15:44:28 +08:00
5ca8675f1f add for test.fbh 2025-04-22 22:35:00 +08:00
8fa9093f90 add some coloe theme 2025-04-22 22:03:49 +08:00
e88df7dba3 change Path 2025-04-22 02:21:51 +00:00
766b2bd007 use curl not nslookup 2025-04-22 10:20:44 +08:00
2a70ca0b28 add tabbar 2025-04-21 16:48:29 +08:00
936ad64fcc add git plug 2025-04-21 16:02:05 +08:00
1e2e4c5d5c update for centos7 2025-04-21 07:43:44 +00:00
4 changed files with 62 additions and 20 deletions

View File

@ -1,7 +1,20 @@
#!/bin/bash
# File : bashrc_6d02aaf87914
# License : MIT
# Author : Feng Bohan <1953356163@qq.com>
# Date : 2025-04-19 09:51:37
# Last Modified Date: 2025-04-21 08:50:03
# Last Modified By : Feng Bohan <1953356163@qq.com>
# -----
# Copyright © 2025 Feng Bohan. All Rights Reserved.
scl enable devtoolset-10 bash
if [ -z "$SCL_LOADED" ]; then
export SCL_LOADED=1
scl enable devtoolset-10 bash
fi
export http_proxy=http://192.168.3.7:7890
export https_proxy=http://192.168.3.7:7890
export PATH=/usr/local/vim/bin:$PATH
export PATH=$PATH:/home/bhfeng/local/vim/bin
export PATH=$PATH:/home/bhfeng/local/ctags/bin

View File

@ -1,3 +1,12 @@
#!/bin/bash
# File : .bashrc_common
# License : MIT
# Author : Feng Bohan <1953356163@qq.com>
# Date : 2025-04-25 17:20:07
# Last Modified Date: 2025-04-25 17:21:35
# Last Modified By : Feng Bohan <1953356163@qq.com>
# -----
# Copyright © 2025 Feng Bohan. All Rights Reserved.
alias e='gvim ~/.bashrc'
alias s='source ~/.bashrc'
alias eg='gvim ~/.vimrc'
@ -24,3 +33,5 @@ w5(){
}
export PS1="[\[\e[01;32m\]\u@\h\[\e[00m\]-\t \$(free_mem)]:\[\e[01;34m\]\$(w5)\[\e[00m\]\$ "
# set for tabby auto detect work dir
export PS1="$PS1\[\e]1337;CurrentDir="'$(pwd)\a\]'

10
bash/bashrc_fengbh-PC Normal file
View File

@ -0,0 +1,10 @@
export NO_AT_BRIDGE=1
alias mWork="sudo mount -t nfs nas.fbh:/volume2/work /home/fengbh/nasWork"
alias is1="./initscreen.sh 1"
alias is2="./initscreen.sh 2"
export http_proxy=http://192.168.3.7:7890
export https_proxy=http://192.168.3.7:7890
# Created by `pipx` on 2025-04-22 14:18:59
export PATH="$PATH:/home/fengbh/.local/bin"

View File

@ -3,25 +3,20 @@
" License : MIT
" Author : Feng Bohan <1953356163@qq.com>
" Date : 2025-04-18 08:39:57
" Last Modified Date: 2025-04-19 15:40:57
" Last Modified Date: 2025-04-27 09:08:13
" Last Modified By : Feng Bohan <1953356163@qq.com>
" File : .vimrc
" Author : Feng Bohan <fengbohan@fmsh.com.cn>
" Date : 2025-04-17 21:46:23
" Last Modified Date: 2025-04-18 08:35:09
" Last Modified By : Feng Bohan <fengbohan@fmsh.com.cn>
" Copyright © 2025 Shanghai Fudan Microelectronics Group Co.,Ltd. All Rights Reserved.
" 环境检测
function! IsAtCompany()
" 检查 baidu.com 是否能解析
let l:cmd = 'nslookup baidu.com >/dev/null 2>&1'
let l:cmd = 'curl -s -o /dev/null -m 2 -w "%{http_code}" https://baidu.com'
let l:http_code = system(l:cmd)
" 执行命令,返回 0 表示解析成功(不在公司),非 0 表示解析失败(在公司)
if system(l:cmd) == 0
return 0 " 能解析,不在公司
else
if match(l:http_code, '^[23][0-9][0-9]$') == -1
return 1 " 不能解析,在公司
else
return 0 " 能解析,不在公司
endif
endfunction
" 只在 Vim 启动时检测一次
@ -96,10 +91,9 @@ nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap <C-j> :bn<CR>
nnoremap <C-k> :bp<CR>
nnoremap <C-h> :bwipe<CR>
map <C-L> <Esc>:set guifont=Monospace\ 16<Enter>
map <C-M> <Esc>:set guifont=Monospace\ 14<Enter>
nnoremap <Leader>t :below terminal<CR>
nnoremap <C-s> :w<CR>
nnoremap <Leader>tt :TagbarToggle<CR>
" 特殊配置
let g:polyglot_disabled = ['verilog_systemverilog']
@ -116,6 +110,7 @@ call plug#begin()
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'preservim/nerdtree'
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'ryanoasis/vim-devicons'
Plug 'Yggdroot/indentLine'
Plug 'luochen1990/rainbow'
@ -131,6 +126,8 @@ call plug#begin()
Plug 'tomasr/molokai'
Plug 'w0ng/vim-hybrid'
Plug 'joshdick/onedark.vim'
Plug 'altercation/vim-colors-solarized'
Plug 'morhetz/gruvbox'
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-endwise'
Plug 'kshenoy/vim-signature'
@ -141,6 +138,9 @@ call plug#begin()
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-repeat'
Plug 'alpertuna/vim-header'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'preservim/tagbar'
call plug#end()
"=============================================================================
@ -198,8 +198,8 @@ nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
let g:NERDTreeFileLines = 1 " 显示行号
let NERDTreeShowHidden=1 " 设置显示隐藏文件
"let g:NERDTreeFileLines = 1 " 显示行号
"let NERDTreeShowHidden=1 " 设置显示隐藏文件
" 设置忽略的文件
let NERDTreeIgnore=[
\ '\.git$','\.svn$','\.DS_Store$'
@ -329,11 +329,19 @@ vmap <BS> <plug>NERDCommenterToggle
"=============================================================================
" configure for theme
"=============================================================================
" 降级的 256 配色方案
"let g:solarized_termcolors=256
"colorscheme hybrid
"colorscheme molokai
colorscheme onedark
set background=dark
"colorscheme onedark
"colorscheme solarized
colorscheme gruvbox
if has('gui_running')
set background=light
else
set background=dark
endif
"=============================================================================
" configure for ultisnips
"=============================================================================