一种我喜欢的vim的配置

vim默认配置功能较少,以下提供一种我自己喜欢的vim的配置。

打开vi ~/.vimrc(有可能没有这个文件,自己创建就好)

set nu              "show number
syntax on           "syntax highlight
set cursorline      "have cursorline
set cindent         "
set smartindent     "
set autoindent      "
set ignorecase
set hlsearch        "highlight search word
set shiftwidth=4    "
set tabstop=4       "tab = 4
map <silent> <F10> :TlistToggle<cr>     "use <Fn> to open/close Tlist
"let Tlist_Auto_Open=1                  "每次自动打开Tlist
let Tlist_Show_One_File = 1             "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1           "如果taglist窗口是最后一个窗口,则退出vim
"let Tlist_Use_Right_Window = 1         "在右侧窗口中显示taglist窗口
set showmatch       "设置自动检测括号是否匹配
set incsearch
set ruler
set laststatus=2    "显示当前文件名
autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
        \   exe "normal g`\"" |
            \ endif                     "自动跳转到上次文件打开的位置
"set fdm=syntax
然后vi一个文件,会发现很漂亮哦

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值