Configured in the .vimrc
file.
- Set the current directory as the working dir
set autochdir
- Spell check
set spell spelllang=en_us
- Use 4 spaces auto-indent
set smartindent set tabstop=4 set shiftwidth=4 set expandtab
- Show the ruler on status bar
set ruler
- Use Ctrl-v and Ctrl-c for copy and paste
:inoremap <C-v> <ESC>"+pa :vnoremap <C-c> "+y
- Set the width of line number as 7
set numberwidth=7 set number
- Set space as the leader key
let mapleader=" " nnoremap <SPACE> <Nop>
- Use
<leader>p
to replace the selected text with the register without yanking itvnoremap <leader>p "_dP
- Use
<leader>d
to delete the selected text without yanking itnnoremap <leader>d "_d vnoremap <leader>d "_d
- Use
<leader>w
to toggle line wrappingnmap <leader>w :set nowrap!<CR>
- Use
<leader>r
to toggle relative line numbernmap <leader>r :set number relativenumber!<CR>
- Use
<leader>i
to toggle indent linesnmap <leader>i :IndentLinesToggle<CR>
Back to Memo