2021-05-22

This commit is contained in:
Ezra Barrow 2021-05-22 01:12:18 -04:00
parent d08c342678
commit 985e4fb101
No known key found for this signature in database
GPG Key ID: 5EF8BA3CE9180419
7 changed files with 69 additions and 8 deletions

View File

@ -34,9 +34,9 @@ HISTCONTROL=ignoreboth
# Path {{{
export PATH=$HOME/bin:$HOME/.local/bin:$PATH
export PATH=$HOME/bin:$HOME/.local/bin:$HOME/Apps/arduino/bin:$PATH
export STAGING_DIR="/home/barrow/Documents/openwrt/staging_dir"
export PATH="/home/barrow/Documents/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin:$PATH"
# export PATH="/home/barrow/Documents/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin:$PATH"
# Set vim to user-installed neovim
# Otherwise, system-installed neovim
@ -57,6 +57,7 @@ alias vim=$EDITOR
# displays the total size of all folders in the working directory, sorted small -> large
alias size='du --max-depth=1 -h | sort -h'
alias hr='numfmt --to=iec --suffix=B'
# ls defaults
alias ls='ls --color=auto'

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
!.bashrc
!.gitignore
!.vimrc
!.ungitrc
!LICENSE
!barrow_rust.yml
!templates

4
.ungitrc Normal file
View File

@ -0,0 +1,4 @@
{
"port": 8081,
"isForceGPGSign": true
}

View File

@ -1,6 +1,6 @@
" I think these two enable true color in terminal,, or something
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors
" set termguicolors
set background=dark
set noshowmode " Dont show --INSERT-- --NORMAL-- etc in the command line,, we have it in the statusline

49
.vimrc
View File

@ -17,12 +17,12 @@
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'honza/vim-snippets/'
Plug 'bling/vim-bufferline'
Plug 'itchyny/lightline.vim'
Plug 'scrooloose/syntastic'
Plug 'godlygeek/tabular'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'mattn/emmet-vim'
Plug 'wellle/targets.vim'
@ -191,7 +191,16 @@
nnoremap <C-S> :w<CR>
" F8 to toggle tagbar
nnoremap <F8> :TagbarToggle<CR>
nnoremap <silent> <F8> :TagbarToggle<CR>
" F10 to clear highlight
nnoremap <silent> <F10> :nohl<CR>
" Leader-rh to toggle rust-analyzer type hints
nnoremap <silent> <Leader>rh :CocCommand rust-analyzer.toggleInlayHints<CR>
" Leader-j to join lines with rust-analyzer
nnoremap <silent> <Leader>j :CocCommand rust-analyzer.joinLines<CR>
vnoremap <silent> <Leader>j :CocCommand rust-analyzer.joinLines<CR>
" Leader-w to toggle wrapping
nnoremap <silent> <Leader>w :set wrap!<CR>
@ -205,6 +214,23 @@
nnoremap <silent> [c :cprev<CR>
nnoremap <silent> <Leader>[c :cfirst<CR>
nnoremap <silent> <Leader>]c :clast<CR>
" Toggle quickfix list {{{
nnoremap <silent> <F9> :CToggle<CR>
command! -nargs=0 CToggle call s:ToggleCList()
function! s:ToggleCList()
if empty(filter(getwininfo(), 'v:val.quickfix'))
copen
else
cclose
endif
endfunction
" End Toggle quickfix list }}}
" Convenience for navigating the location list (i think?)
nnoremap <silent> ]l :lnext<CR>
nnoremap <silent> [l :lprev<CR>
nnoremap <silent> <Leader>[l :lfirst<CR>
nnoremap <silent> <Leader>]l :llast<CR>
" Vim-Endwise {{{
" Disable endwise mappings
@ -250,6 +276,22 @@
" vim -c :Help starts a fullscreen help
command! Help :tab help | :tabonly
" Todo List {{{
command! -nargs=0 Todo call s:LoadTodoList()
function! s:LoadTodoList()
" Nabbed from https://stackoverflow.com/a/271709
let all = range(1, bufnr('$'))
let res = []
for b in all
if buflisted(b)
call add(res, bufname(b))
endif
endfor
" echom string(res)
exec 'vimgrep /TODO/ '.join(res, ' ')
endfunction
" End Todo List }}}
" Indent Config {{{
command! -nargs=? -complete=custom,s:IndentArgs SpacesOnly call s:IndentConfig(1, <q-args>)
command! -nargs=? -complete=custom,s:IndentArgs TabsOnly call s:IndentConfig(0, <q-args>)
@ -369,6 +411,7 @@
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap <leader>a :CocAction<CR>
" Snippets {{{
" inoremap <silent><expr> <C-l> coc#rpc#request('doKeymap', ['snippets-expand-jump',''])

14
templates/ino.template Normal file
View File

@ -0,0 +1,14 @@
/*
* THIS FILE IS LICENSED UNDER THE FOLLOWING TERMS
*
* this code may not be used for any purpose. be gay, do crime
*
* THE FOLLOWING MESSAGE IS NOT A LICENSE
*
* <barrow@tilde.team> wrote this file.
* by reading this message, you are reading "TRANS RIGHTS".
* this file and the content within it is the queer agenda.
* if we meet some day, and you think this stuff is worth it,
* you can buy me a beer, tea, or something stronger.
* -Ezra Barrow
*/

View File

@ -14,6 +14,4 @@
* -{{NAME}}
* --------------------
*/
{{CURSOR}}