1 Star 0 Fork 0

WeiSheDing/MyVimrc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vimrc 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
WeiSheDing 提交于 2021-05-21 21:09 +08:00 . add vim-plug and nerdtree
syntax on
set mouse=a
set number
set hlsearch
set incsearch
" set cursorline
" set cursorcolumn
"
" 自动缩进
set tabstop=4
set softtabstop=4
set expandtab
set autoindent
" Normal模式显示当前已输入内容
set showcmd
" leader设置为空格
let mapleader = "\<space>"
" 打开新的选项卡
nnoremap <space>tn<space> :tabnew<CR>
" 关闭当前选项卡
nnoremap <space>tc<space> :tabclose<CR>
" 显示选项卡列表
nnoremap <space>ts<space> :tabs<CR>
" 在选项卡之间切换
nnoremap <space>th<space> :-tabnext<CR>
nnoremap <space>tl<space> :+tabnext<CR>
" 移动当前选项卡
nnoremap <space>tm<space> :tabm
" <space>to 关闭所有其他的 tab
nnoremap <space>to<space> :tabo<CR>
" nerdtree配置
let NERDTreeHighlightCursorline = 1 " 高亮当前行
let NERDTreeShowLineNumbers = 1 " 显示行号
" 忽略列表中的文件
let NERDTreeIgnore = [ '\.pyc$', '\.pyo$', '\.obj$', '\.o$', '\.egg$', '^\.git$', '^\.repo$', '^\.svn$', '^\.hg$' ]
" 启动 vim 时打开 NERDTree
autocmd vimenter * NERDTree
" 当打开 VIM,没有指定文件时和打开一个目录时,打开 NERDTree
"autocmd StdinReadPre * let s:std_in = 1
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
"autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
" 关闭 NERDTree,当没有文件打开的时候
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | end
" <space>nt 打开 nerdtree 窗口,在左侧栏显示
nnoremap <space>nt<space> :NERDTreeToggle<CR>
" vim-plug插件管理
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
call plug#end()
" gvim外观配置
if has("gui_running")
set guifont=Monospace\ 14
set lines=19
set columns=80
endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
VimL
1
https://gitee.com/shufengmuyu/vim.git
git@gitee.com:shufengmuyu/vim.git
shufengmuyu
vim
MyVimrc
master

搜索帮助