Created
September 23, 2017 05:30
-
-
Save bradtaniguchi/7d34f45dc31e778cf3f9db973d3feb84 to your computer and use it in GitHub Desktop.
This file contains 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
git config --global core.editor "vim"" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
execute pathogen#infect() | |
" Turn on syntax highlighting | |
syntax on | |
" For plugins to load correctly | |
filetype plugin indent on | |
" Fix x11 forwarding | |
set clipboard=exclude:.* | |
" TODO: Pick a leader key | |
let mapleader = " " | |
" turn off auto wrap | |
set tw=0 | |
set nowrap | |
set textwidth=100 | |
" Security | |
set modelines=0 | |
" Show line numbers | |
set number | |
" Show file stats | |
set ruler | |
" Blink cursor on error instead of beeping (grr) | |
set visualbell | |
" Encoding | |
set encoding=utf-8 | |
" Whitespace | |
"set wrap | |
"set textwidth=79 | |
set formatoptions=tcqrn1 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set noshiftround | |
" Cursor motion | |
set scrolloff=3 | |
set backspace=indent,eol,start | |
set matchpairs+=<:> " use % to jump between pairs | |
runtime! macros/matchit.vim | |
" Move up/down editor lines | |
nnoremap j gj | |
nnoremap k gk | |
" exit inster mode with jk | |
:imap jk <ESC> | |
" Allow hidden buffers | |
set hidden | |
" Rendering | |
set ttyfast | |
" Status bar | |
set laststatus=2 | |
" Last line | |
set showmode | |
set showcmd | |
" Searching | |
nnoremap / /\v | |
vnoremap / /\v | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
set showmatch | |
map <leader><space> :let @/=''<cr> " clear search | |
"More sensible splits | |
set splitbelow | |
set splitright | |
"We dont need backup | |
set nobackup | |
"or swap | |
set noswapfile | |
" Remap help key. | |
inoremap <F1> <ESC>:set invfullscreen<CR>a | |
nnoremap <F1> :set invfullscreen<CR> | |
vnoremap <F1> :set invfullscreen<CR> | |
" Textmate holdouts | |
" Formatting | |
map <leader>q gqip | |
" Visualize tabs and newlines | |
set listchars=tab:▸\ ,eol:¬ | |
" Uncomment this to enable by default: | |
" set list " To enable by default | |
" Or use your leader key + l to toggle on/off | |
map <leader>l :set list!<CR> " Toggle tabs and EOL | |
" Color scheme (terminal) | |
set t_Co=256 | |
set background=dark | |
let g:solarized_termcolors=256 | |
let g:solarized_termtrans=1 | |
" put https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim | |
" in ~/.vim/colors/ and uncomment: | |
" colorscheme solarized | |
"""""" | |
"custom settings | |
" The internet can only get you so far! | |
"""""" | |
"jshint toggle, run at saveonly! | |
"let JSHintUpdateWriteOnly=1 | |
"Mouse Support | |
set mouse=a | |
"Nerd tree toggle | |
map <C-n> :NERDTreeToggle<CR> | |
"CtrlP toggle | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlP' | |
"fix for ctrl arrow? | |
if &term =~ '^screen' | |
"tmux will send xterm-style keys when its xterm-keys option is on | |
execute "set <xUp>=\e[1;*A" | |
execute "set <xDown>=\e[1;*B" | |
execute "set <xRight>=\e[1;*C" | |
execute "set <xLeft>=\e[1;*D" | |
endif | |
""""""" | |
"Better Buffer settings | |
""""""" | |
nnoremap <leader>bn :bn<cr> | |
nnoremap <leader>bv :bp<cr> | |
nnoremap <leader>bd :bd<cr> | |
"experimental buffer switching | |
nnoremap <A-left> :bp<cr> | |
nnoremap <A-right> :bn<cr> | |
nnoremap <A-down> :bd<cr> | |
" Roy's keybaord shortcuts to switch buffers | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
"""""""" | |
"ignore for ctrlp | |
"""""""" | |
let g:ctrlp_custom_ignore = 'node_modules\|git\|build' | |
"""""""" | |
""vim-js-pretty-templates - for js templates | |
"""""""" | |
autocmd FileType typescript JsPreTmpl html | |
autocmd FileType typescript syn clear foldBraces | |
"""""""" | |
""Syntastic configuration | |
""""""" | |
let g:syntastic_javascript_eslint_exe="$(npm bin)/eslint" | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 1 | |
let g:tsuquyomi_disable_quickfix = 1 | |
let g:syntastic_typescript_checkers = ['tsuquyomi'] | |
let g:syntastic_javascript_checkers=['eslint'] | |
let g:tsuquyomi_shortest_import_path = 1 " use short import | |
""""""" | |
"vim-javacomplete2 | |
""""""" | |
autocmd FileType java setlocal omnifunc=javacomplete#Complete | |
"""""" | |
"YouCompleteMe | |
"""""" | |
let g:ycm_server_python_interpreter = '/usr/bin/python2' | |
let pumheight=10 | |
"""""" | |
"Global color changes, for pmenu colors | |
"""""" | |
highlight Pmenu ctermfg=15 ctermbg=0 guifg=#00ee00 guibg=#000000 | |
""""""" | |
"vim-airline settings | |
"""""" | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 " turn on powerline fonts | |
"theme | |
let g:airline_theme='luna' | |
"""""" | |
"vim-tmuxline | |
"""""" | |
let g:airline#extensions#tmuxline#enabled = 1 | |
let g:tmuxline_preset = { | |
\'a' : '#S', | |
\'b' : ['#(~/.bin/quick_cpu)'], | |
\'c' : ['#(~/.bin/quick_mem)'], | |
\'win' : ['#I', '#W'], | |
\'cwin' : ['#I', '#W'], | |
\'y' : ['%R', '%D'], | |
\'z' : '#H'} | |
""""""" | |
"auto-pairs settings | |
"""""" | |
let g:AutoPairsFlyMode = 1 " fly mode on! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment