Last active
July 3, 2021 03:39
-
-
Save JackyYin/0f9f5c4eae5afb1f5059471b4cfa04f4 to your computer and use it in GitHub Desktop.
some custom config for space vim
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
function! myspacevim#before() abort | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" BASICS | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
syntax on | |
set updatetime=1000 | |
"for performance issue | |
set re=1 | |
set redrawtime=10000 | |
" Do not syntastic check after :w | |
let g:syntastic_check_on_wq = 0 | |
let g:syntastic_mode_map = { | |
\ 'mode': 'passive', | |
\ 'active_filetypes': ['c', 'javascript'], | |
\ 'passive_filetypes': ['cpp'] | |
\ } | |
" Skip auto-compilation | |
let g:spacevim_lint_on_save = 0 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" autocmd | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
augroup my-file-setting | |
autocmd! | |
au FileType javascript setlocal | |
\ tabstop=2 | |
\ shiftwidth=2 | |
\ expandtab | |
au FileType c,cpp setlocal | |
\ tabstop=4 | |
\ shiftwidth=4 | |
\ expandtab | |
au FileType python setlocal | |
\ tabstop=4 | |
\ shiftwidth=4 | |
\ noexpandtab | |
au FileType make setlocal | |
\ tabstop=4 | |
\ shiftwidth=4 | |
\ noexpandtab | |
augroup END | |
augroup my-glyph-palette | |
autocmd! | |
au FileType nerdtree,startify call glyph_palette#apply() | |
augroup END | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" KEY REMAPS | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
nnoremap <silent> <F9> :FloatermNew --height=0.4 --width=0.98 --wintype=floating --position=bottom --autoclose=2 --title= | |
nnoremap <silent> <F8> :FloatermPrev<CR> | |
nnoremap <silent> <F10> :FloatermNext<CR> | |
nnoremap <silent> <F12> :FloatermToggle<CR> | |
tnoremap <silent> <F12> <C-\><C-N>:FloatermToggle<CR> | |
endfunction | |
function! myspacevim#after() abort | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" PLUGINS | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:neomake_javascript_eslint_exe = 'eslint_d' | |
let g:gitgutter_grep='grep' | |
"other configs | |
let g:github_dashboard = { 'username': 'JackyYin', 'password': $GITHUB_TOKEN } | |
let g:gista#client#default_username = 'JackyYin' | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment