用着顺手的Vim配置

659天前 · Linux 使用 · 616次阅读

VIM 是常用的终端下文本编辑器,其配置文件为 ~/.vimrc (如不存在这个文件,可以创建)

" 开启编程语法颜色高亮
syntax on
filetype indent plugin on 
" 开启行号
set nu
" 搜索时忽略大小写
set ignorecase

set ruler
set hlsearch
set scrollbind

au VimEnter * if &diff | execute 'windo set wrap' | endif
" 使用 vimdiff 时的配色设置
if &diff
            colorscheme morning
endif

" 第二次打开同一个文件时,回到上一次打开时停留的地方
" Return to last edit position when opening files (You want this!)
 autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") |
     \   exe "normal! g`\"" |
     \ endif
    
filetype plugin on
set backspace=indent,eol,start
" 不进行折叠
set nofoldenable    " disable folding

👍 1

none

最后修改于658天前

评论

贴吧 狗头 原神 小黄脸
收起

贴吧

狗头

原神

小黄脸

目录

avatar

伊藤

41

文章数

6

评论数

8

分类