CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:15:37 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=fae1cf7ba58027b2d2e3f57c65143e95cf66db5fd241e11b75de7d4bf211ac5da%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%228nkp0BGYIMc5h6Bw6d21pQO8LKQCg8tZ%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc3956cd7fdfa6-BLR
My mac vimrc - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set modelines=0 " CVE-2007-2438
- " Normally we use vim-extensions. If you want true vi-compatibility
- " remove change the following statements
- set nocompatible " Use Vim defaults instead of 100% vi compatibility
- set backspace=2 " more powerful backspacing
- " Don't write backup file if vim is being called by "crontab -e"
- au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
- " Don't write backup file if vim is being called by "chpass"
- au BufWrite /private/etc/pw.* set nowritebackup nobackup
- let skip_defaults_vim=1
- :inoremap ( ()<ESC>i
- :inoremap ) <c-r>=ClosePair(')')<CR>
- :inoremap { {<CR>}<ESC>O
- :inoremap } <c-r>=ClosePair('}')<CR>
- :inoremap [ []<ESC>i
- :inoremap ] <c-r>=ClosePair(']')<CR>
- :inoremap " ""<ESC>i
- :inoremap ' ''<ESC>i
- function! ClosePair(char)
- if getline('.')[col('.') - 1] == a:char
- return "\<Right>"
- else
- return a:char
- endif
- endfunction
- set number
- syntax on
- set autoindent
- set tabstop=4
- set softtabstop=4
- set shiftwidth=4
- set smartindent
- map <C-A> ggVGY "映射全选 ctrl+A
- vmap <C-C> "+y "映射复制 ctrl+C
- map <C-V> "+gP "映射粘贴ctrl+V
- set history=1000
- set nobackup
- set noswapfile
- set noexpandtab
- set noundofile
- set guifont=Monaco:h12
- if has("autocmd")
- au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"' | redraw!
- au InsertEnter,InsertChange *
- \ if v:insertmode == 'i' |
- \ silent execute '!echo -ne "\e[6 q"' | redraw! |
- \ elseif v:insertmode == 'r' |
- \ silent execute '!echo -ne "\e[4 q"' | redraw! |
- \ endif
- au VimLeave * silent execute '!echo -ne "\e[ q"' | redraw!
- endif
- set mouse=a
- func! CompileGcc()
- exec "w"
- let compilecmd="!gcc "
- let compileflag="-o %< "
- if search("mpi\.h") != 0
- let compilecmd = "!mpicc "
- endif
- if search("glut\.h") != 0
- let compileflag .= " -lglut -lGLU -lGL "
- endif
- if search("cv\.h") != 0
- let compileflag .= " -lcv -lhighgui -lcvaux "
- endif
- if search("omp\.h") != 0
- let compileflag .= " -fopenmp "
- endif
- if search("math\.h") != 0
- let compileflag .= " -lm "
- endif
- exec compilecmd." % ".compileflag
- endfunc
- func! CompileGpp()
- exec "w"
- let compilecmd="!clang++ -O2 -Wall -Wextra"
- let compileflag="-o %<"
- if search("mpi\.h") != 0
- let compilecmd = "!mpic++ "
- endif
- if search("glut\.h") != 0
- let compileflag .= " -lglut -lGLU -lGL "
- endif
- if search("cv\.h") != 0
- let compileflag .= " -lcv -lhighgui -lcvaux "
- endif
- if search("omp\.h") != 0
- let compileflag .= " -fopenmp "
- endif
- if search("math\.h") != 0
- let compileflag .= " -lm "
- endif
- exec compilecmd." % ".compileflag
- endfunc
- func! RunPython()
- exec "!python %"
- endfunc
- func! CompileJava()
- exec "!javac %"
- endfunc
- func! CompileCode()
- exec "w"
- if &filetype == "cpp"
- exec "call CompileGpp()"
- elseif &filetype == "c"
- exec "call CompileGcc()"
- elseif &filetype == "python"
- exec "call RunPython()"
- elseif &filetype == "java"
- exec "call CompileJava()"
- endif
- endfunc
- func! RunResult()
- exec "w"
- if search("mpi\.h") != 0
- exec "!mpirun -np 4 ./%<"
- elseif &filetype == "cpp"
- exec "! ./%<"
- elseif &filetype == "c"
- exec "! ./%<"
- elseif &filetype == "python"
- exec "call RunPython"
- elseif &filetype == "java"
- exec "!java %<"
- endif
- endfunc
- map <F5> :call CompileCode()<CR>
- imap <F5> <ESC>:call CompileCode()<CR>
- vmap <F5> <ESC>:call CompileCode()<CR>
- map <F6> :call RunResult()<CR>
- call plug#begin()
- Plug 'preservim/nerdtree'
- Plug 'tomasiser/vim-code-dark'
- Plug 'vim-airline/vim-airline'
- Plug 'majutsushi/tagbar'
- Plug 'mhinz/vim-startify'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
- Plug 'neoclide/coc-java'
- Plug 'yggdroot/indentline'
- call plug#end()
- set laststatus=2
- "let g:airline_powerline_fonts = 1
- let g:airline#extensions#tabline#enabled = 1
- colorscheme retrobox
- map <silent> <F2> :NERDTreeToggle<CR>
- autocmd BufNewFile *.cpp 0r ~/a.cpp
- nmap <F8> :TagbarToggle<CR>
- nmap <F3> :bnext<CR>
- "indent line plugin
- let g:indentLine_setConceal = 0
- let g:indentLine_setColors = 1
- let g:indentLine_char_list = ['|', '¦', '┆', '┊']
- "COC extensions
- set hidden
- set updatetime=300
- nmap <silent> [g <Plug>(coc-diagnostic-prev)
- nmap <silent> ]g <Plug>(coc-diagnostic-next)
- nmap <silent> gd <Plug>(coc-definition)
- nmap <silent> gy <Plug>(coc-type-definition)
- nmap <silent> gi <Plug>(coc-implementation)
- nmap <silent> gr <Plug>(coc-references)
- inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
- \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
- augroup VIMRC
- au!
- au BufWritePost .vimrc so %
- augroup END
Tags:
vimrc
Advertisement
Add Comment
Please, Sign In to add comment
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 3 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ E
JavaScript | 4 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ O
JavaScript | 15 sec ago | 0.24 KB
-
⭐⭐⭐ G2A Payment Exploit ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 17 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ 8
JavaScript | 26 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 26 sec ago | 0.24 KB
-
⭐ ✅ Free Products Method ✅ ✅ NEVER SEEN BEFOR...
JavaScript | 35 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ C
JavaScript | 37 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand