Last active
April 1, 2018 11:04
-
-
Save chebert/8516326 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
"Bundles | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'embear/vim-localvimrc' | |
Bundle 'kchmck/vim-coffee-script' | |
Bundle 'wincent/Command-T' | |
Bundle 'bitc/vim-hdevtools.git' | |
Bundle 'Lokaltog/vim-easymotion' | |
Bundle 'flazz/vim-colorschemes' | |
Bundle 'scrooloose/nerdcommenter' | |
Bundle 'scrooloose/syntastic' | |
Bundle 'airblade/vim-gitgutter' | |
Bundle 'vim-scripts/a.vim' | |
Bundle 'Valloric/YouCompleteMe' | |
"Bundles | |
filetype plugin indent on | |
syntax on | |
colorscheme ir_black | |
set laststatus=2 | |
set shortmess=aoOW | |
set showcmd | |
set noswapfile | |
set nowritebackup | |
set undolevels=1000 | |
set undoreload=-1 | |
if has('persistent_undo') | |
set undodir=~/.vim/backups | |
set undofile | |
endif | |
au BufWinLeave *.* silent! mkview | |
au BufWinEnter *.* silent! loadview | |
set number | |
set cursorline | |
set showmatch | |
set matchpairs+=<:> | |
set hlsearch | |
set incsearch | |
set list | |
set listchars=tab:::,trail:.,extends:#,nbsp:. | |
set textwidth=80 | |
set colorcolumn=+1 | |
hi ColorColumn ctermbg=black | |
set nowrap | |
set smartindent | |
set expandtab | |
set tabstop=3 | |
set softtabstop=3 | |
set shiftwidth=3 | |
set pastetoggle=<F12> | |
set wildignore+=*.o,*.hi,*.png,*.tix | |
set wildignore+=node_modules | |
"Remove trailing whitespaces on write | |
au BufWritePre <buffer> :call setline(1, map(getline(1,"$"), 'substitute(v:val, "\\s\\+$","","")')) | |
"Add linebreaks to syntastic messages. | |
au FileType qf setlocal wrap linebreak | |
let mapleader=',' | |
nnoremap ; : | |
set clipboard=unnamedplus | |
vnoremap <C-C> "+y | |
nnoremap Y y$ | |
nnoremap <Tab> :w<CR> | |
nnoremap <silent> <leader>/ :nohlsearch<CR> | |
nnoremap <F11> :GitGutterToggle<CR> | |
au FileType haskell nnoremap <buffer> <F1> :HdevtoolsType<CR> | |
au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR> | |
au FileType haskell setlocal tabstop=4 shiftwidth=4 softtabstop=4 | |
map <C-J> <C-W>j<C-W>_ | |
map <C-K> <C-W>k<C-W>_ | |
map <C-L> <C-W>l<C-W>_ | |
map <C-H> <C-W>h<C-W>_ | |
map <leader>a :AS <CR> | |
" Syntastic Options | |
let g:syntastic_auto_loc_list=1 | |
let g:syntastic_enable_signs=1 | |
let g:syntastic_check_on_open=1 | |
let g:syntastic_check_on_wq=0 | |
let g:syntastic_javascript_checkers=['jshint'] | |
let g:syntastic_haskell_checkers=['hdevtools'] | |
let g:syntastic_mode_map = { 'mode': 'active', | |
\ 'active_filetypes': [], | |
\ 'passive_filetypes': [] } | |
let g:ycm_allow_changing_updatetime = 0 | |
let g:localvimrc_whitelist='.*' | |
let g:localvimrc_sandbox=0 | |
let g:hdevtools_options = '-g -Wall' | |
let g:gitgutter_enabled = 0 | |
highlight clear SignColumn | |
" Search for selected text, forwards or backwards. | |
vnoremap <silent> * :<C-U> | |
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> | |
\gvy/<C-R><C-R>=substitute( | |
\escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> | |
\gV:call setreg('"', old_reg, old_regtype)<CR> | |
vnoremap <silent> # :<C-U> | |
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> | |
\gvy?<C-R><C-R>=substitute( | |
\escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> | |
\gV:call setreg('"', old_reg, old_regtype)<CR> | |
" End search |
Author
chebert
commented
Jan 20, 2014
- Command-T is awesome for opening files in a directory.
- vim-localvimrc is what I use to store commands specific to a project.
- syntastic is turned off for my videos, since it gets in the way, but this is a HUGE time-saver.
- a.vim is used to open the corresponding .cc file or .h file to whichever you are in.
- YouCompleteMe Is what I use for auto-complete, and one half the reason I use clang++ over g++.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment