My. vimrc,. vimrc

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.