vim 配置

set nu
set tabstop=3
set cindent
set smartindent
set history=5000
au BufReadPost * if line("'"") > 0|if line("'"") <= line("$")|exe("norm '"")|else|exe "norm $"|endif|endif
let Tlist_Auto_Open = 1
let Tlist_Ctags_Cmd = '/.local/bin/ctags'
let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
syntax on
" 打开 Taglist 窗口
nmap :TlistToggle
" 自动打开 Taglist
let Tlist_Auto_Open = 1

" 自动关闭 Taglist
" let Tlist_Auto_Close = 1

" 显示 Taglist 窗口在左侧
let Tlist_Use_Left_Window = 1

" 设置 Taglist 窗口宽度
let Tlist_WinWidth = 30

" 只显示当前文件的标签
let Tlist_Show_One_File = 1
filetype plugin indent on

call plug#begin('~/.vim/plugged')
Plug 'vim-scripts/taglist.vim'
call plug#end()
" Auto-complete brackets
inoremap ( ()i
inoremap [ []i
inoremap { {}O
inoremap ' ''i
inoremap " ""i
set shiftwidth=4 " Indentation width for auto-indent
set smartindent " Enable smart indentation

posted @ 2025-11-10 14:09  吃半个西瓜  阅读(0)  评论(0)    收藏  举报