Skip to main content


Install for Windows

Install by Package Manger:
winget install vim.vim
On Windows, add to user environment variable PATH:
[Environment]::GetEnvironmentVariable("PATH", "User") +
";$((Get-Item 'C:\Program Files (x86)\Vim\*' -Exclude '_*')[0])",

notepad %userprofile%/.vimrc
Unix Shell:
vim +startinsert ~/.vimrc

paste code and save:

" integrate system clipboard
set clipboard=unnamed

" show line number
set number
" show position
set ruler

" highlight searched
set hlsearch
" ignore search case if the first character is lower
set ignorecase
set smartcase

" the default position of new splitted window
set splitbelow
set splitright

" recommended keymap
nnoremap <c-\> :vsplit<CR>
inoremap <c-\> <Esc>:vsplit<CR>
vnoremap <c-\> <Esc>:vsplit<CR>


_gvimrc on GitHub

To enable backup and restoring, make some folder.

mkdir -f ~/.vim/backups,~/.vim/undo

赞助作者 (Sponse me):