mac vim配置

终于还是受不了vi的默认设置了&#823.

终于还是受不了vi的默认设置了…

sudo vim /usr/share/vim/vimrc

在set backspace=2这行下插入(VIM的操作不赘述,想做这个修改的肯定都会使VIM)如下配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
set ai                  " auto indenting
set history=100         " keep 100 lines of history
set ruler               " show the cursor position
syntax on               " syntax highlighting
set hlsearch            " highlight the last searched term
filetype plugin on      " use the file type plugins
 
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif