Last active
January 28, 2023 20:08
-
-
Save ncolgan/9202271 to your computer and use it in GitHub Desktop.
vimrc
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 | |
set expandtab | |
set sts=2 | |
set ts=2 | |
set sw=2 | |
set number | |
set incsearch | |
set hlsearch | |
set smartcase | |
set showcmd | |
set wildmenu | |
set ruler | |
set laststatus=2 | |
set cursorline | |
set nofoldenable | |
set showmatch | |
set wildignore=node_modules,trash,tmp,cache,coverage,vendor | |
set noswapfile | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#begin() | |
Plugin 'gmarik/vundle' | |
Plugin 'mileszs/ack.vim' | |
Plugin 'vim-scripts/closetag.vim' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'chriskempson/vim-tomorrow-theme' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'sjl/gundo.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'danro/rename.vim' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'godlygeek/tabular' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'bling/vim-airline' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'jwhitley/vim-matchit' | |
Plugin 'tpope/vim-surround' | |
Plugin 'elixir-lang/vim-elixir' | |
Plugin 'tpope/vim-commentary' | |
Plugin 'MarcWeber/vim-addon-mw-utils' | |
Plugin 'tomtom/tlib_vim' | |
Plugin 'SirVer/ultisnips' | |
Plugin 'honza/vim-snippets' | |
Plugin 'iurifq/ctrlp-rails.vim' | |
Plugin 'vim-scripts/dbext.vim' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'tpope/vim-rails' | |
Plugin 'tommcdo/vim-exchange' | |
Plugin 'kana/vim-textobj-user' | |
Plugin 'nelstrom/vim-textobj-rubyblock' | |
Plugin 'int3/vim-extradite' | |
Plugin 'vim-scripts/SQLUtilities' | |
Plugin 'vim-scripts/Align' | |
Plugin 'mustache/vim-mustache-handlebars' | |
" Bundle 'rizzatti/funcoo.vim' | |
" Bundle 'rizzatti/dash.vim' | |
Plugin 'gregsexton/MatchTag' | |
Plugin 'chrisbra/csv.vim' | |
Plugin 'elzr/vim-json' | |
Plugin 'jelera/vim-javascript-syntax' | |
Plugin 'tpope/vim-cucumber' | |
Plugin 'fatih/vim-go' | |
Plugin 'kylef/apiblueprint.vim' | |
Plugin 'ekalinin/Dockerfile.vim' | |
Plugin 'tpope/vim-fireplace' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'coot/CRDispatcher' | |
Plugin 'wting/rust.vim' | |
Plugin 'cespare/vim-toml' | |
Plugin 'kshenoy/vim-signature' | |
Plugin 'neowit/vim-force.com' | |
let g:apex_backup_folder = expand("$HOME/Projects/sfdc/backup") | |
let g:apex_temp_folder = expand("$HOME/Projects/sfdc/temp") | |
let g:apex_properties_folder = expand("$HOME/Projects/sfdc/properties") | |
let g:apex_tooling_force_dot_com_path = expand("$HOME/Projects/sfdc/tooling-force.com-0.3.1.4.jar") | |
call vundle#end() | |
let g:ctrlp_max_files = 0 | |
let g:ctrlp_max_depth = 100 | |
let g:UltiSnipsSnippetsDir = "/Users/nick.colgan/.vim/bundle/vim-snippets/UltiSnips" | |
filetype plugin indent on | |
syntax on | |
let g:rails_ctags_arguments="--exclude=tmp --exclude=vendor" | |
let g:ctrlp_extensions = ['tag'] | |
let g:session_autosave = 'no' | |
let g:syntastic_javascript_jshint_conf = '~/.config/jshint.json' | |
let g:ack_default_options = ' -H --nocolor --nogroup --column' | |
set t_Co=256 | |
let mapleader="," | |
silent map <C-E> :NERDTreeToggle<CR> | |
silent map <Leader>, <C-^> | |
imap <C-L> <SPACE>=><SPACE> | |
map <C-W>e :copen<CR> | |
" nmap <CR> :nohl<CR> | |
nmap <Leader>q :nohlsearch<CR> | |
nnoremap Y y$ | |
nmap ; :CtrlPBuffer<CR> | |
nmap Q <Nop> | |
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> | |
let Grep_Find_Use_Xargs = 0 | |
" silent! nmap <silent> <Leader>a= :Tabularize /=<CR> | |
" silent! vmap <silent> <Leader>a= :Tabularize /=<CR> | |
nmap <Leader>a<bar> :Tabularize/<bar><CR> | |
vmap <Leader>a<bar> :Tabularize/<bar><CR> | |
nmap <Leader>a: :Tabularize /: \zs<CR> | |
vmap <Leader>a: :Tabularize /: \zs<CR> | |
set list | |
set listchars="" | |
set listchars=tab:▸\ | |
set listchars+=trail:. | |
colorscheme Tomorrow-Night-Eighties | |
" highlight ExtraWhitespace ctermbg=darkblue guibg=darkblue | |
" match ExtraWhitespace /\s\+$/ | |
if $TERM == 'xterm-256color' || $TERM == 'screen-256color' || $COLORTERM == 'gnome-terminal' | |
set t_Co=256 | |
endif | |
let g:VimuxOrientation = "h" | |
let g:VimuxHeight = "50" | |
let g:VimuxUseNearestPane = 1 | |
let g:vroom_use_vimux = 1 | |
let g:vroom_use_zeus = 0 | |
nmap <Leader>gr *N:silent Ggrep <C-r><C-w><CR>:copen<CR> | |
nmap <Leader>ga :silent Ack <C-r><C-w><CR>:copen<CR> | |
nmap <Leader>f :%s/<C-r><C-w>//gc<Left><Left><Left> | |
nmap <Leader>gs :Gstatus<CR> | |
highlight clear SignColumn | |
set clipboard=unnamed | |
if executable("ag") | |
set grepprg=ag\ --nogroup\ --nocolor | |
endif | |
" align cucumber tables | |
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a | |
function! s:align() | |
let p = '^\s*|\s.*\s|\s*$' | |
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) | |
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) | |
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) | |
Tabularize/|/l1 | |
normal! 0 | |
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) | |
endif | |
endfunction | |
function! NumberToggle() | |
if(&relativenumber == 1) | |
set number | |
else | |
set relativenumber | |
endif | |
endfunc | |
nnoremap <C-n> :call NumberToggle()<cr> | |
nmap K :Dash<cr> | |
let g:dash_map = { | |
\ 'ruby': 'ruby_on_rails' | |
\ } | |
if has("gui_running") | |
let g:airline_powerline_fonts = 1 | |
endif | |
command! FormatJSON execute "%!python -m json.tool" | |
colorscheme Tomorrow-Night-Eighties | |
au BufNewFile,BufRead *.ex set filetype=elixir | |
au BufNewFile,BufRead *.exs set filetype=elixir | |
au BufNewFile,BufRead *.md set filetype=markdown | |
au BufNewFile,BufRead *.hbs set filetype=mustache | |
au BufNewFile,BufRead *.coffee set filetype=coffee | |
au BufNewFile,BufRead *.go set filetype=go | |
au BufNewFile,BufRead *.hbs runtime! ftplugin/html.vim | |
au BufNewFile,BufRead Vagrantfile set filetype=ruby | |
" automatically delete trailing whitespace on save | |
au BufWritePre * :%s/\s\+$//e | |
au BufWritePost .vimrc source $MYVIMRC | |
let os = substitute(system('uname'), "\n", "", "") | |
if os == "Linux" | |
set clipboard=unnamedplus | |
set guifont=Source\ Code\ Pro\ Medium\ 12 | |
else | |
set clipboard=unnamed | |
set guifont=Sauce\ Code\ Powerline:h16 | |
endif | |
let g:dbext_default_profile_local_staging='type=PGSQL:host=localhost:user=c42:dbname=staging' | |
let g:dbext_default_profile_staging = 'type=PGSQL:user=c42:passwd=c422006:driver=Pg:dbname=cp.staging.web:host=dbstg.c42' | |
let g:dbext_default_profile_data42='type=PGSQL:user=data42ro:passwd=wV6weHwCZ-S_dSQQsttC:driver=Pg:dbname=data42:host=dbdata42.c42:port=5433' | |
let g:dbext_default_profile_production='type=PGSQL:user=c42ro:driver=Pg:dbname=crashplan:host=dbr.c42' | |
set exrc | |
set secure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment