My. vimrc,. vimrc
Vimrc
if v:progname =~? "evim" finishendifset nocompatibleset backspace=indent,eol,startset history=50 " keep 50 lines of command line historyset ruler " show the cursor position all the timeset showcmd " display incomplete commandsset incsearch " do incremental searchingmap Q gqinoremap <C-U> <C-G>u<C-U>set mouse=nif &t_Co > 2 || has("gui_running") syntax on set hlsearchendifif has("autocmd") filetype plugin indent on augroup vimrcEx au! autocmd FileType text setlocal textwidth=78 autocmd BufReadPost * \ if line("'\"") > 1 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif augroup ENDelse set autoindent " always set autoindenting onendifif !exists(":DiffOrig") command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis \ | wincmd p | diffthisendifset wildignore=.svn,CVS,.git,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,node_modules/*"allow deletion of previously entered data in insert modeset backspace=indent,eol,start" Allow saving of files as sudo when I forgot to start vim using sudo.cmap w!! %!sudo tee > /dev/null %"------ Searching ------set incsearchset ignorecaseset smartcaseset hlsearchnnoremap <silent> <leader>b :nohlsearch<CR>noremap <leader>a :Acknoremap <leader>A <C-w>j<C-w>c<C-w>llet g:ackprg="ack -H --nocolor --nogroup --column"let g:ctrlp_working_path_mode = ''let g:ctrlp_custom_ignore = '\v[\/](node_modules|coverage|target|dist)|(\.(swp|ico|git|svn))$'nmap S :%s//g<LEFT><LEFT>vmap S :s//g<LEFT><LEFT>map <Leader>T :%s/\s\+$//<CR>map <Leader>U :g/^$/d<CR>map <Leader>R :retab<CR>"------ JSON Filetype Settings ------au BufRead,BufNewFile *.json set filetype=jsonlet g:vim_json_syntax_conceal = 0nmap <silent> =j :%!python -m json.tool<CR>:setfiletype json<CR>" myself envset tabstop=4set softtabstop=4set shiftwidth=4set expandtabset autoindentset numberset fileencodings=utf-8,gb18030,gbk,gb2312,big5set encoding=utf-8set nobackupset noswapfileset aiset siset smarttabset laststatus=2
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.