Created
May 12, 2016 06:12
-
-
Save kristoferjoseph/831cd48427a4991a997bda7b414af8e7 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 cursorline | |
" keyboard shortcuts | |
inoremap jj <ESC> | |
nnoremap ; : | |
"NAVIGATION | |
nnoremap <up> <nop> | |
nnoremap <down> <nop> | |
nnoremap <left> <nop> | |
nnoremap <right> <nop> | |
inoremap <up> <nop> | |
inoremap <down> <nop> | |
inoremap <left> <nop> | |
inoremap <right> <nop> | |
nnoremap j gj | |
nnoremap k gk | |
"EXPLORE | |
let g:netrw_liststyle=3 | |
let g:netrw_banner=0 | |
"Ignore things | |
set wildignore+=*.swp,*.bak,*.pyc,*.class,*/dist | |
" No pooping backup files | |
set nobackup | |
set noswapfile | |
" highlight search | |
set hlsearch | |
nmap <leader>w :nohlsearch<CR> | |
nmap <leader>hl :let @/ = ""<CR> | |
"Tell vim to use javascript syntax for JSON files | |
autocmd BufNewFile,BufRead *.json set ft=javascript | |
" Copy paste | |
set pastetoggle=<F2> | |
nnoremap <leader>y :YRShow<CR> | |
"Expansion to active file directory | |
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%' | |
noremap <tab> % | |
"Save on focus out of file | |
au FocusLost * :wa | |
" gui settings | |
if (&t_Co == 256 || has('gui_running')) | |
if ($TERM_PROGRAM == 'iTerm.app') | |
colorscheme base16-paraiso | |
else | |
colorscheme desert | |
endif | |
endif | |
" Powerline font | |
let g:airline_powerline_fonts = 1 | |
set guifont=Inconsolata\ for\ Powerline:h15 | |
let g:Powerline_symbols = 'fancy' | |
set encoding=utf-8 | |
set t_Co=256 | |
set fillchars+=stl:\ ,stlnc:\ | |
set term=xterm-256color | |
set termencoding=utf-8 | |
if has("gui_running") | |
let s:uname = system("uname") | |
if s:uname == "Darwin\n" | |
set guifont=Inconsolata\ for\ Powerline:h15 | |
endif | |
endif | |
" indent line | |
let g:indentLine_enabled = 1 | |
let g:indentLine_char = '│' | |
let g:indentLine_color_term = 239 | |
let g:indentLine_color_gui = '#9474b2' | |
" lint | |
" let g:syntastic_javascript_checkers = ['jsxhint'] | |
let g:syntastic_javascript_checkers = ['eslint'] | |
" Disambiguate ,a & ,t from the Align plugin, making them fast again. | |
" | |
" This section is here to prevent AlignMaps from adding a bunch of mappings | |
" that interfere with the very-common ,a and ,t mappings. This will get run | |
" at every startup to remove the AlignMaps for the *next* vim startup. | |
" | |
" If you do want the AlignMaps mappings, remove this section, remove | |
" ~/.vim/bundle/Align, and re-run rake in maximum-awesome. | |
function! s:RemoveConflictingAlignMaps() | |
if exists("g:loaded_AlignMapsPlugin") | |
AlignMapsClean | |
endif | |
endfunction | |
command! -nargs=0 RemoveConflictingAlignMaps call s:RemoveConflictingAlignMaps() | |
silent! autocmd VimEnter * RemoveConflictingAlignMaps | |
map <c-f> :call JsBeautify()<cr> | |
" or | |
autocmd FileType javascript noremap <buffer> <c-f> :call JsBeautify()<cr> | |
" for html | |
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr> | |
" for handlebars | |
autocmd FileType hbs noremap <buffer> <c-f> :call HtmlBeautify()<cr> | |
" for css or scss | |
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr> | |
" tern | |
nnoremap <Leader>tD :TernDoc<CR> | |
let g:tern_map_keys=1 | |
let g:tern_show_argument_hints='on_hold' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment