@daduizhang
2021-03-22T07:14:00.000000Z
字数 6204
阅读 1054
Linux
镜像地址:https://mirrors.aliyun.com/ubuntu-releases/
或者
# 桌面版https://mirrors.aliyun.com/ubuntu-releases/18.04.5/ubuntu-18.04.5-desktop-amd64.iso# 服务版https://mirrors.aliyun.com/ubuntu-releases/18.04.5/ubuntu-18.04.5-live-server-amd64.iso
安装虚拟机插件(使用VMware):https://www.cnblogs.com/360minitao/p/11943144.html
或者使用vagrant、virturalBox
vim /etc/apt/source.listdeb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
https://www.cnblogs.com/lzyws739307453/p/12907656.html
vim /etc/hosts# 最后一行追加151.101.108.133 raw.githubusercontent.comsudo -sapt-get install zsh curl gitwget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | shcat /etc/shellschsh -s /usr/bin/zsh同时配置终端首选项 自定义命令为zsh
# 高亮插件sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting# 补全插件sudo git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions# autojump(需要更改python的环境变量,不太需要装)sudo git clone https://github.com/joelthelion/autojump.git# 更新zshrc文件autojump需要在zshrc上添加最后一行[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && . ~/.autojump/etc/profile.d/autojump.zsh# 安装lsd替换原生的lshttps://github.com/peltoche/lsdapt-get install lsdalias ls="lsd"alias ll="lsd -l"alias la="lsd -la"
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttfhttps://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttfhttps://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttfhttps://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
ZSH_THEME="powerlevel10k/powerlevel10k"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# 第一步mkdir ~/.vimsudo vim ~/.vim/vimrcsudo mkdir ~/.vim/autoloadsudo curl -fLo ~/.vim/autoload/plug.vim --create-dirs \https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim# 第二部配置vimrc,将下列复制到vimrc中let mapleader=" ""开启高亮syntax on"开启行号set number"设置字体不会超出当前行的位置set wrap"当前行列高亮set cursorcolumnset cursorlinehighlight CursorLine cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONEhighlight CursorColumn cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONE"让打字显示set showcmd"用tab补全命令set wildmenu"在命令行输入/然后输入要搜索的进行高亮显示set hlsearchexec "nohlsearch"set incsearchset ignorecaseset smartcase"搜索完了 这两个= 是下一个 -是上一个并且聚焦noremap = nzznoremap - Nzz"空格然后回车清空所有搜索结果noremap <LEADER><CR> :nohlsearch<CR>set nocompatiblefiletype onfiletype indent onfiletype plugin onfiletype plugin indent onset encoding=utf-8"修改tab缩进距离set expandtabset tabstop=2set shiftwidth=2set softtabstop=2set listset listchars=tab:▸\ ,trail:▫set scrolloff=5set tw=0set indentexpr=set backspace=indent,eol,startset foldlevel=99let &t_SI = "\<Esc>]50;CursorShape=1\x7"let &t_SR = "\<Esc>]50;CursorShape=2\x7"let &t_EI = "\<Esc>]50;CursorShape=0\x7"set autochdirau BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif"命令模式下"大写S退出map S :w<CR>map s <nop>"大写Q退出map Q :q<CR>"加载vim配置map R :source $MYVIMRC<CR>"分屏 sr向右分屏 sl向左分屏幕 su向上分屏 sd 向下分屏map sr :set splitright<CR>:vsplit<CR>map sl :set nosplitright<CR>:vsplit<CR>map su :set nosplitbelow<CR>:split<CR>map sd :set splitbelow<CR>:split<CR>"分屏移动 Ctrl + l 右移动 Ctrl +j向下 Ctrl+ k向上 Ctrl + h向左map <C-l> <C-w>lmap <C-k> <C-w>kmap <C-h> <C-w>hmap <C-j> <C-w>j"z加方向键调整分屏大小map z<up> :res +5<CR>map z<down> :res -5<CR>map z<left> :vertical resize-5<CR>map z<right> :vertical resize+5<CR>"插件call plug#begin('~/.vim/plugged')Plug 'vim-airline/vim-airline'Plug 'connorholyday/vim-snazzy'" File navigationPlug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }Plug 'Xuyuanp/nerdtree-git-plugin'" TaglistPlug 'majutsushi/tagbar', { 'on': 'TagbarOpenAutoClose' }" Error checkingPlug 'w0rp/ale'" Auto CompletePlug 'Valloric/YouCompleteMe'" Undo TreePlug 'mbbill/undotree/'" Other visual enhancementPlug 'nathanaelkane/vim-indent-guides'Plug 'itchyny/vim-cursorword'" GitPlug 'rhysd/conflict-marker.vim'Plug 'tpope/vim-fugitive'Plug 'mhinz/vim-signify'Plug 'gisphm/vim-gitignore', { 'for': ['gitignore', 'vim-plug'] }" HTML, CSS, JavaScript, PHP, JSON, etc.Plug 'elzr/vim-json'Plug 'hail2u/vim-css3-syntax'Plug 'spf13/PIV', { 'for' :['php', 'vim-plug'] }Plug 'gko/vim-coloresque', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] }Plug 'pangloss/vim-javascript', { 'for' :['javascript', 'vim-plug'] }Plug 'mattn/emmet-vim'" PythonPlug 'vim-scripts/indentpython.vim'" MarkdownPlug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install_sync() }, 'for' :['markdown', 'vim-plug'] }Plug 'dhruvasagar/vim-table-mode', { 'on': 'TableModeToggle' }Plug 'vimwiki/vimwiki'" BookmarksPlug 'kshenoy/vim-signature'" Other useful utilitiesPlug 'terryma/vim-multiple-cursors'Plug 'junegunn/goyo.vim' " distraction free writing modePlug 'tpope/vim-surround' " type ysks' to wrap the word with '' or type cs'` to change 'word' to `word`Plug 'godlygeek/tabular' " type ;Tabularize /= to align the =Plug 'gcmt/wildfire.vim' " in Visual mode, type i' to select all text in '', or type i) i] i} ipPlug 'scrooloose/nerdcommenter' " in <space>cc to comment a line" DependenciesPlug 'MarcWeber/vim-addon-mw-utils'Plug 'kana/vim-textobj-user'Plug 'fadein/vim-FIGlet'call plug#end()color snazzy" ===" === NERDTree" ==="ff调出文件目录map tt :NERDTreeToggle<CR>let NERDTreeMapOpenExpl = ""let NERDTreeMapUpdir = ""let NERDTreeMapUpdirKeepOpen = "l"let NERDTreeMapOpenSplit = ""let NERDTreeOpenVSplit = ""let NERDTreeMapActivateNode = "i"let NERDTreeMapOpenInTab = "o"let NERDTreeMapPreview = ""let NERDTreeMapCloseDir = "n"let NERDTreeMapChangeRoot = "y"复制后 进入vim的命令行模式输入:PlugInstall