Update dotfiles
This commit is contained in:
parent
25d274e48c
commit
03c270ca7c
5 changed files with 344 additions and 162 deletions
2
.bash_profile
Normal file
2
.bash_profile
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
source ~/.bashrc
|
||||
source ~/.bash_aliases
|
||||
21
.config/nvim/coc-settings.json
Normal file
21
.config/nvim/coc-settings.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"languageserver": {
|
||||
"rescript": {
|
||||
"enable": true,
|
||||
"module": "~/.local/share/nvim/plugged/vim-rescript/server/out/server.js",
|
||||
"args": ["--node-ipc"],
|
||||
"filetypes": ["rescript"],
|
||||
"rootPatterns": ["bsconfig.json"]
|
||||
},
|
||||
"nim": {
|
||||
"command": "nimlsp",
|
||||
"filetypes": [ "nim" ],
|
||||
"trace.server": "verbose"
|
||||
},
|
||||
"ocaml-lsp": {
|
||||
"command": "opam",
|
||||
"args": ["config", "exec", "--", "ocamllsp"],
|
||||
"filetypes": ["ocaml", "reason"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ let g:airline#extensions#ale#enabled = 1
|
|||
|
||||
let mapleader = "\<Space>"
|
||||
let maplocalleader = "\<Space>"
|
||||
let g:asyncomplete_auto_popup = 0
|
||||
|
||||
let g:syntastic_c_compiler_options = "-std=c99"
|
||||
set guicursor=
|
||||
|
|
@ -31,7 +30,7 @@ augroup END
|
|||
|
||||
set wildmenu
|
||||
set wildmode=full
|
||||
set shell=/bin/bash\ --login
|
||||
"set shell=bash
|
||||
set smartindent
|
||||
set ruler
|
||||
set t_Co=256
|
||||
|
|
@ -55,15 +54,10 @@ let g:LargeFile = 20
|
|||
"set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
|
||||
set laststatus=2
|
||||
let g:airline_powerline_fonts = 1
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
let g:airline_section_x = ''
|
||||
let g:airline_section_y = ''
|
||||
let g:airline_section_warning = ''
|
||||
let g:airline_section_z = '%l/%L:%c'
|
||||
let g:airline_symbols.dirty="\u2021"
|
||||
let g:airline_symbols.crypt="\ue0a2"
|
||||
|
||||
|
||||
set undofile " Save undo's after file closes
|
||||
|
|
@ -71,7 +65,6 @@ set undodir=$HOME/.vim/undo " where to save undo histories
|
|||
set undolevels=10000
|
||||
set undoreload=10000 " number of lines to save for undo
|
||||
filetype plugin indent on
|
||||
set pastetoggle=<F2>
|
||||
set incsearch
|
||||
set guicursor=
|
||||
|
||||
|
|
@ -191,7 +184,7 @@ endf
|
|||
nn <C-g> :call JumpToDef()<cr>
|
||||
ino <C-g> <esc>:call JumpToDef()<cr>i
|
||||
|
||||
nn <C-m> :Rg<cr>
|
||||
"nn <C-m> :Rg<cr>
|
||||
|
||||
autocmd FileType ocaml nmap <C-t> :MerlinTypeOf<cr>
|
||||
|
||||
|
|
@ -215,15 +208,15 @@ let g:ctrlp_prompt_mappings = {
|
|||
\ }
|
||||
|
||||
|
||||
noremap <A-k> <C-u>
|
||||
noremap <A-j> <C-d>
|
||||
noremap <A-h> gT
|
||||
noremap <A-l> gt
|
||||
noremap ˚ :tabr<cr>
|
||||
noremap ∆ :tabl<cr>
|
||||
noremap ˙ gT
|
||||
noremap ¬ gt
|
||||
|
||||
inoremap <A-k> <Esc><C-u>i
|
||||
inoremap <A-j> <Esc><C-d>i
|
||||
inoremap <A-h> <Esc>gTi
|
||||
inoremap <A-l> <Esc>gti
|
||||
inoremap ˚ <Esc>:tabr<cr>i
|
||||
inoremap ∆ <Esc>:tabl<cr>i
|
||||
inoremap ˙ <Esc>gTi
|
||||
inoremap ¬ <Esc>gti
|
||||
|
||||
set clipboard=
|
||||
let g:EasyClipShareYanks = 1
|
||||
|
|
@ -239,7 +232,7 @@ let g:EasyClipShareYanks = 1
|
|||
|
||||
call plug#begin('~/.local/share/nvim/plugged')
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'zah/nim.vim'
|
||||
Plug 'jyapayne/nim.vim'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
|
|
@ -270,7 +263,6 @@ Plug 'tpope/vim-commentary'
|
|||
Plug 'w0rp/ale'
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
Plug 'udalov/kotlin-vim'
|
||||
Plug 'ervandew/supertab'
|
||||
Plug 'simnalamburt/vim-mundo'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'tpope/vim-surround'
|
||||
|
|
@ -285,6 +277,13 @@ Plug 'kana/vim-textobj-line'
|
|||
Plug 'Julian/vim-textobj-brace'
|
||||
Plug 'bps/vim-textobj-python'
|
||||
Plug 'svermeulen/vim-easyclip'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'jremmen/vim-ripgrep'
|
||||
Plug 'rescript-lang/vim-rescript'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'kassio/neoterm'
|
||||
Plug 'reasonml-editor/vim-reason-plus'
|
||||
Plug 'jyapayne/vim-code-dark'
|
||||
"Plug 'baabelfish/nvim-nim'
|
||||
call plug#end()
|
||||
|
||||
|
|
@ -317,7 +316,7 @@ syntax reset
|
|||
endif
|
||||
|
||||
set t_Co=256
|
||||
let g:colors_name = "vimdefault"
|
||||
"let g:colors_name = "vimdefault"
|
||||
|
||||
|
||||
" Define reusable colorvariables.
|
||||
|
|
@ -344,6 +343,7 @@ let s:warning2="#e86310"
|
|||
let s:parenbg="#3a71c9"
|
||||
let s:todo="yellow"
|
||||
|
||||
|
||||
exe 'hi Normal guifg='s:fg' guibg='s:bg
|
||||
exe 'hi Cursor guifg='s:bg' guibg='s:fg
|
||||
exe 'hi CursorLine guibg='s:bg2
|
||||
|
|
@ -426,7 +426,7 @@ highlight Search ctermbg=blue ctermfg=white guibg=#006891 guifg=white
|
|||
highlight IncSearch ctermbg=blue ctermfg=white guifg=#7D008D guibg=white
|
||||
|
||||
filetype on
|
||||
:autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
|
||||
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
highlight OverLength ctermbg=red ctermfg=black guibg=#592929 gui=bold
|
||||
|
|
@ -444,34 +444,34 @@ hi Normal ctermbg=none guibg=none
|
|||
hi NonText ctermbg=none guibg=none
|
||||
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE guibg=black gui=NONE guifg=NONE
|
||||
set noshowmode
|
||||
let g:asyncomplete_auto_popup = 0
|
||||
au User asyncomplete_setup call asyncomplete#register_source({
|
||||
\ 'name': 'nim',
|
||||
\ 'whitelist': ['nim'],
|
||||
\ 'triggers': {'nim': ['.'] },
|
||||
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
|
||||
\ })
|
||||
|
||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
|
||||
imap <silent> . .<Plug>(asyncomplete_force_refresh)
|
||||
" au User asyncomplete_setup call asyncomplete#register_source({
|
||||
" \ 'name': 'nim',
|
||||
" \ 'whitelist': ['nim'],
|
||||
" \ 'triggers': {'nim': ['.'] },
|
||||
" \ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
|
||||
" \ })
|
||||
|
||||
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
" inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
|
||||
" imap <silent> . .<Plug>(asyncomplete_force_refresh)
|
||||
|
||||
" let g:asyncomplete_auto_popup = 0
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
endfunction
|
||||
" function! s:check_back_space() abort
|
||||
" let col = col('.') - 1
|
||||
" return !col || getline('.')[col - 1] =~ '\s'
|
||||
" endfunction
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ asyncomplete#force_refresh()
|
||||
" inoremap <silent><expr> <TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ <SID>check_back_space() ? "\<TAB>" :
|
||||
" \ asyncomplete#force_refresh()
|
||||
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
"inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
set completeopt+=preview
|
||||
" set completeopt+=preview
|
||||
set rtp+=/usr/local/opt/fzf
|
||||
function! WrapForTmux(s)
|
||||
if !exists('$TMUX')
|
||||
|
|
@ -494,3 +494,266 @@ function! XTermPasteBegin()
|
|||
endfunction
|
||||
|
||||
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
|
||||
|
||||
" The Silver Searcher
|
||||
if executable('ag')
|
||||
" Use ag over grep
|
||||
set grepprg=ag\ --nogroup\ --nocolor\ --vimgrep
|
||||
|
||||
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
||||
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
||||
|
||||
" ag is fast enough that CtrlP doesn't need to cache
|
||||
let g:ctrlp_use_caching = 0
|
||||
endif
|
||||
|
||||
" bind K to grep word under cursor
|
||||
nnoremap <silent> K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
|
||||
set switchbuf+=usetab,newtab
|
||||
|
||||
autocmd FileType rescript nnoremap <silent> <buffer> <localleader>r :RescriptFormat<CR>
|
||||
autocmd FileType rescript nnoremap <silent> <buffer> <localleader>t :RescriptTypeHint<CR>
|
||||
autocmd FileType rescript nnoremap <silent> <buffer> <localleader>b :RescriptBuild<CR>
|
||||
autocmd FileType rescript nnoremap <silent> <buffer> gd :RescriptJumpToDefinition<CR>
|
||||
|
||||
let g:asyncomplete_auto_completeopt=0
|
||||
|
||||
|
||||
|
||||
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
|
||||
" unicode characters in the file autoload/float.vim
|
||||
set encoding=utf-8
|
||||
|
||||
" TextEdit might fail if hidden is not set.
|
||||
set hidden
|
||||
|
||||
" Some servers have issues with backup files, see #649.
|
||||
" set nobackup
|
||||
" set nowritebackup
|
||||
|
||||
" Give more space for displaying messages.
|
||||
set cmdheight=1
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("nvim-0.5.0") || has("patch-8.1.1564")
|
||||
" Recently vim can merge signcolumn and number column into one
|
||||
set signcolumn=number
|
||||
else
|
||||
set signcolumn=yes
|
||||
endif
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> J :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder.
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap keys for applying codeAction to the current buffer.
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Apply AutoFix to problem on the current line.
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
" Map function and class text objects
|
||||
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
xmap ic <Plug>(coc-classobj-i)
|
||||
omap ic <Plug>(coc-classobj-i)
|
||||
xmap ac <Plug>(coc-classobj-a)
|
||||
omap ac <Plug>(coc-classobj-a)
|
||||
|
||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
endif
|
||||
|
||||
" Use CTRL-S for selections ranges.
|
||||
" Requires 'textDocument/selectionRange' support of language server.
|
||||
nmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Add `:Fold` command to fold current buffer.
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" Add `:OR` command for organize imports of the current buffer.
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||
|
||||
" Add (Neo)Vim's native statusline support.
|
||||
" NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||
" provide custom statusline: lightline.vim, vim-airline.
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
|
||||
" Mappings for CoCList
|
||||
" Show all diagnostics.
|
||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions.
|
||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands.
|
||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document.
|
||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols.
|
||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list.
|
||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||
|
||||
" kassio/neoterm
|
||||
let g:neoterm_default_mod = 'vertical botright'
|
||||
" let g:neoterm_size = 100
|
||||
let g:neoterm_autoinsert = 1
|
||||
let g:neoterm_autoscroll = 1
|
||||
let g:neoterm_term_per_tab = 1
|
||||
nnoremap <c-y> :Ttoggle<CR>
|
||||
inoremap <c-y> <Esc>:Ttoggle<CR>
|
||||
tnoremap <c-y> <c-\><c-n>:Ttoggle<CR>
|
||||
|
||||
" color scheme
|
||||
colorscheme codedark
|
||||
set cursorline
|
||||
filetype on
|
||||
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
|
||||
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
highlight OverLength ctermbg=red ctermfg=black guibg=#592929 gui=bold
|
||||
|
||||
highlight ALEError ctermbg=red guibg=#700000
|
||||
highlight ALEErrorSign ctermfg=none ctermbg=black guifg=red guibg=#212121
|
||||
highlight ALEWarning ctermbg=yellow guibg=#504a08
|
||||
highlight ALEWarningSign ctermfg=yellow ctermbg=none guibg=#212121 guifg=#ecd517
|
||||
highlight SignColumn ctermbg=darkgrey guibg=#212121
|
||||
highlight TabLineFill guibg=none guifg=none gui=none
|
||||
highlight TabLineSel guibg=#353535 guifg=none
|
||||
highlight TabLine guibg=none guifg=none
|
||||
highlight CocHighlightText ctermbg=lightblue guibg=#002c4b
|
||||
|
||||
|
||||
hi Normal ctermbg=none guibg=none
|
||||
hi NonText ctermbg=none guibg=none
|
||||
hi LineNr ctermbg=none guibg=none
|
||||
"hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE guibg=black gui=NONE guifg=NONE
|
||||
set noshowmode
|
||||
|
||||
" let g:opamshare = substitute(system('opam var share'),'\n$','','''')
|
||||
" execute "set rtp+=" . g:opamshare . "/merlin/vim"
|
||||
|
||||
" ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line
|
||||
let s:opam_share_dir = system("opam config var share")
|
||||
let s:opam_share_dir = substitute(s:opam_share_dir, '[\r\n]*$', '', '')
|
||||
|
||||
let s:opam_configuration = {}
|
||||
|
||||
function! OpamConfOcpIndent()
|
||||
execute "set rtp^=" . s:opam_share_dir . "/ocp-indent/vim"
|
||||
endfunction
|
||||
let s:opam_configuration['ocp-indent'] = function('OpamConfOcpIndent')
|
||||
|
||||
function! OpamConfOcpIndex()
|
||||
execute "set rtp+=" . s:opam_share_dir . "/ocp-index/vim"
|
||||
endfunction
|
||||
let s:opam_configuration['ocp-index'] = function('OpamConfOcpIndex')
|
||||
|
||||
function! OpamConfMerlin()
|
||||
let l:dir = s:opam_share_dir . "/merlin/vim"
|
||||
execute "set rtp+=" . l:dir
|
||||
endfunction
|
||||
let s:opam_configuration['merlin'] = function('OpamConfMerlin')
|
||||
|
||||
let s:opam_packages = ["ocp-indent", "ocp-index", "merlin"]
|
||||
let s:opam_check_cmdline = ["opam list --installed --short --safe --color=never"] + s:opam_packages
|
||||
let s:opam_available_tools = split(system(join(s:opam_check_cmdline)))
|
||||
for tool in s:opam_packages
|
||||
" Respect package order (merlin should be after ocp-index)
|
||||
if count(s:opam_available_tools, tool) > 0
|
||||
call s:opam_configuration[tool]()
|
||||
endif
|
||||
endfor
|
||||
" ## end of OPAM user-setup addition for vim / base ## keep this line
|
||||
|
|
|
|||
27
.gitconfig
27
.gitconfig
|
|
@ -1,19 +1,22 @@
|
|||
# This is Git's per-user configuration file.
|
||||
[user]
|
||||
email = jyapayne@gmail.com
|
||||
# Please adapt and uncomment the following lines:
|
||||
name = Joey Yakimowich-Payne
|
||||
email = jyapayne@gmail.com
|
||||
[core]
|
||||
editor = nvim
|
||||
[pull]
|
||||
rebase = false
|
||||
[color]
|
||||
ui = auto
|
||||
ui = auto
|
||||
[push]
|
||||
default = current
|
||||
default = current
|
||||
[alias]
|
||||
basebranch = !bash -c 'git show-branch -a | grep "\\*" | grep -v $(git rev-parse --abbrev-ref HEAD) | head -n1 | sed \"s/.*\\[\\(.*\\)\\].*/\\1/\" | sed \"s/[\\^~].*//\"'
|
||||
# list files which have changed since REVIEW_BASE
|
||||
# (REVIEW_BASE defaults to 'master' in my zshrc)
|
||||
files = !bash -c 'source $HOME/.bash_aliases && echo $(git basebranch) && git diff --name-only $(git merge-base HEAD \"$(git basebranch)\")'
|
||||
|
||||
# Same as above, but with a diff stat instead of just names
|
||||
# (better for interactive use)
|
||||
stat = !bash -c 'source $HOME/.bashrc && git diff --stat $(git merge-base HEAD \"$(git basebranch)\")'
|
||||
review = !nvim -p $(git files) +\"tabdo Gdiff $(git basebranch)\" +\"let g:gitgutter_diff_base = '$(git basebranch)'\"
|
||||
basebranch = !bash -c 'git show-branch -a | grep "\\*" | grep -v $(git rev-parse --abbrev-ref HEAD) | head -n1 | sed \"s/.*\\[\\(.*\\)\\].*/\\1/\" | sed \"s/[\\^~].*//\"'
|
||||
# list files which have changed since REVIEW_BASE
|
||||
# (REVIEW_BASE defaults to 'master' in my zshrc)
|
||||
files = !bash -c 'source $HOME/.bash_aliases && echo $(git basebranch) && git diff --name-only $(git merge-base HEAD \"$(git basebranch)\")'
|
||||
# Same as above, but with a diff stat instead of just names
|
||||
# (better for interactive use)
|
||||
stat = !bash -c 'source $HOME/.bashrc && git diff --stat $(git merge-base HEAD \"$(git basebranch)\")'
|
||||
review = !nvim -p $(git files) +\"tabdo Gdiff $(git basebranch)\" +\"let g:gitgutter_diff_base = '$(git basebranch)'\"
|
||||
|
|
|
|||
109
.profile
109
.profile
|
|
@ -1,108 +1 @@
|
|||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
export PATH=/usr/lib/dart/bin:$HOME/.local/bin:/snap/bin:/usr/local/gradle/gradle-4.6/bin:/usr/local/kotlinc/bin:/usr/local/android-studio/bin:$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/sbin:/local/bin:/usr/local/bin:/sbin:/usr/games:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk
|
||||
export PATH=$PATH:$HOME/.cargo/bin:$HOME/yuzu/:$HOME/.nimble/bin:$HOME/nimlibs
|
||||
export PATH=$PATH:$HOME/gcclibs/aarch64-linux-gnu/bin:$HOME/gcclibs/arm-linux-gnueabi/bin
|
||||
export PATH=$HOME/android-studio/bin:$HOME/.pub-cache/bin:$HOME/flutter/bin:$PATH
|
||||
export GOROOT=/usr/local/go
|
||||
export GOBIN=$GOROOT/bin
|
||||
export ANDROID_HOME=$HOME/Android/Sdk
|
||||
export PATH=$PATH:/usr/local/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
export DEVKITARM=${DEVKITPRO}/devkitARM
|
||||
export DEVKITA64=${DEVKITPRO}/devkitA64
|
||||
export PATH=$PATH:$DEVKITA64/bin:$DEVKITPRO/tools/bin
|
||||
export JAVA_HOME=/usr/lib/jvm/default-java
|
||||
export PATH=$HOME/.opam/4.05.0/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:$PATH
|
||||
export LD_LIBRARY_PATH="$HOME/Qt/5.13.1/gcc_64/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu"
|
||||
export LFS=/mnt/lfs
|
||||
export GODOT_BIN="$HOME/Godot/Godot_v3.2.2-stable_x11.64"
|
||||
export PYTHONSTARTUP="$HOME/.pythonstartup"
|
||||
export ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
|
||||
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
|
||||
# User specific aliases and functions:
|
||||
# alias vim="/usr/bin/vim.gtk"
|
||||
alias ls="ls -h --color=auto"
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
alias nv="nvim"
|
||||
alias sudo="sudo "
|
||||
alias vim="nvim"
|
||||
alias did="vim +'normal Go' +'r!date' ~/Documents/did.txt"
|
||||
|
||||
alias lcat='pygmentize -g -O style=colorful,linenos=1 | grep -P "^\d\d\d\d:"'
|
||||
alias ccat='pygmentize -g'
|
||||
alias hcat='highlight -n -O ansi --force'
|
||||
alias tcat='highlight -O ansi --force'
|
||||
|
||||
alias dc="docker-compose"
|
||||
|
||||
export WINEPREFIX=~/.WineItunes
|
||||
export WINEARCH=win32
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
|
||||
PS1="\n\[\e[30;01m\](\[\e[31;01m\]\w\[\e[30;01m\])\[\e[30;1m\]\n\[\e[30;1m\](\[\e[34m\]\$(/bin/date +'%a %b %e %-I:%M:%S %Z %Y')\[\e[30;1m\])\n\[\e[30;1m\](\[\e[32;1m\]\u @ \h\[\e[30;1m\])-> \[\e[0m\]"
|
||||
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
alias grep="grep --color"
|
||||
|
||||
alias openurl="x-www-browser"
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
#xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
#export PATH=/usr/lib/dart/bin:$HOME/.local/bin:/snap/bin:/usr/local/gradle/gradle-4.6/bin:/usr/local/kotlinc/bin:/usr/local/android-studio/bin:$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/sbin:/local/bin:/usr/local/bin:/sbin:/usr/games:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk
|
||||
export PATH=$PATH:$HOME/.cargo/bin:$HOME/yuzu/:$HOME/.nimble/bin:$HOME/nimlibs
|
||||
export PATH=$PATH:$HOME/gcclibs/aarch64-linux-gnu/bin:$HOME/gcclibs/arm-linux-gnueabi/bin
|
||||
export PATH=$HOME/.pub-cache/bin:$PATH
|
||||
export PATH=$PATH:$HOME/flutter/bin
|
||||
export GOROOT=/usr/lib/go-1.11/
|
||||
export GOPATH=$HOME/go
|
||||
export GOBIN=$GOROOT/bin
|
||||
export PATH=$PATH:$GOBIN
|
||||
alias nim='$HOME/.nimble/bin/nim'
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
export DEVKITARM=${DEVKITPRO}/devkitARM
|
||||
export DEVKITA64=${DEVKITPRO}/devkitA64
|
||||
export PATH=$PATH:$DEVKITA64/bin:$DEVKITPRO/tools/bin
|
||||
export JAVA_HOME=/usr/lib/jvm/default-java
|
||||
export PATH=$HOME/.opam/4.05.0/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:$PATH
|
||||
export LFS=/mnt/lfs
|
||||
export PYTHONSTARTUP="$HOME/.pythonstartup"
|
||||
export ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
|
||||
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
|
||||
export WINEPREFIX=~/.WineItunes
|
||||
export WINEARCH=win32
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export PATH="/home/joey/Nim/bin:$HOME/.cargo/bin:$PATH"
|
||||
source ~/.bash_profile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue