main
Alpha Chen 1 year ago
parent 405d97fe2a
commit e81f5334f3
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

132
.gitmodules vendored

@ -1,128 +1,12 @@
[submodule ".vim/pack/alpha/start/vim-commentary"]
path = .vim/pack/alpha/start/vim-commentary
url = https://github.com/tpope/vim-commentary.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-sensible"]
path = .vim/pack/alpha/start/vim-sensible
url = https://github.com/tpope/vim-sensible.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-surround"]
path = .vim/pack/alpha/start/vim-surround
url = https://github.com/tpope/vim-surround.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-sleuth"]
path = .vim/pack/alpha/start/vim-sleuth
url = https://github.com/tpope/vim-sleuth.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-tmux-navigator"]
path = .vim/pack/alpha/start/vim-tmux-navigator
url = https://github.com/christoomey/vim-tmux-navigator.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-unimpaired"]
path = .vim/pack/alpha/start/vim-unimpaired
url = https://github.com/tpope/vim-unimpaired.git
shallow = true
[submodule ".vim/pack/alpha/start/rust.vim"]
path = .vim/pack/alpha/start/rust.vim
url = https://github.com/rust-lang/rust.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-vinegar"]
path = .vim/pack/alpha/start/vim-vinegar
url = https://github.com/tpope/vim-vinegar.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-dispatch"]
path = .vim/pack/alpha/start/vim-dispatch
url = https://github.com/tpope/vim-dispatch.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-endwise"]
path = .vim/pack/alpha/start/vim-endwise
url = https://github.com/tpope/vim-endwise.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-ruby"]
path = .vim/pack/alpha/start/vim-ruby
url = https://github.com/vim-ruby/vim-ruby.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-repeat"]
path = .vim/pack/alpha/start/vim-repeat
url = https://github.com/tpope/vim-repeat.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-textobj-user"]
path = .vim/pack/alpha/start/vim-textobj-user
url = https://github.com/kana/vim-textobj-user.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-textobj-rubyblock"]
path = .vim/pack/alpha/start/vim-textobj-rubyblock
url = https://github.com/nelstrom/vim-textobj-rubyblock.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-indent-object"]
path = .vim/pack/alpha/start/vim-indent-object
url = https://github.com/michaeljsmith/vim-indent-object.git
shallow = true
[submodule ".vim/pack/alpha/start/tabular"]
path = .vim/pack/alpha/start/tabular
url = https://github.com/godlygeek/tabular.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-projectionist"]
path = .vim/pack/alpha/start/vim-projectionist
url = https://github.com/tpope/vim-projectionist.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-rake"]
path = .vim/pack/alpha/start/vim-rake
url = https://github.com/tpope/vim-rake.git
shallow = true
[submodule "src/giphy.alfredworkflow"]
path = src/giphy.alfredworkflow
url = https://github.com/kejadlen/giphy.alfredworkflow.git
[submodule "src/dark-sky.alfredworkflow"]
path = src/pirate-weather.alfredworkflow
url = https://github.com/kejadlen/pirate-weather.alfredworkflow.git
[submodule ".vim/pack/alpha/start/lightline.vim"]
path = .vim/pack/alpha/start/lightline.vim
url = https://github.com/itchyny/lightline.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-qf"]
path = .vim/pack/alpha/start/vim-qf
url = https://github.com/romainl/vim-qf.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-sexp"]
path = .vim/pack/alpha/start/vim-sexp
url = https://github.com/guns/vim-sexp.git
shallow = true
[submodule ".vim/pack/alpha/start/fzf.vim"]
path = .vim/pack/alpha/start/fzf.vim
url = https://github.com/junegunn/fzf.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/scribble.vim"]
path = .vim/pack/alpha/start/scribble.vim
url = https://github.com/vim-scripts/scribble.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/gundo.vim"]
path = .vim/pack/alpha/start/gundo.vim
url = https://github.com/sjl/gundo.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-operator-flashy"]
path = .vim/pack/alpha/start/vim-operator-flashy
url = https://github.com/haya14busa/vim-operator-flashy.git
shallow = true
[submodule ".vim/pack/alpha/start/vim-operator-user"]
path = .vim/pack/alpha/start/vim-operator-user
url = https://github.com/kana/vim-operator-user.git
shallow = true
[submodule "src/emoji.alfredworkflow"]
path = src/emoji.alfredworkflow
url = https://github.com/kejadlen/emoji.alfredworkflow.git
[submodule ".vim/pack/alpha/start/vim-colors-paramount"]
path = .vim/pack/alpha/start/vim-colors-paramount
url = https://github.com/owickstrom/vim-colors-paramount.git
shallow = true
[submodule ".vim/pack/alpha/start/is.vim"]
path = .vim/pack/alpha/start/is.vim
url = https://github.com/haya14busa/is.vim.git
shallow = true
[submodule ".vim/pack/alpha/start/typescript-vim"]
path = .vim/pack/alpha/start/typescript-vim
url = https://github.com/leafgarland/typescript-vim.git
shallow = true
[submodule "faker.alfredworkflow"]
path = src/faker.alfredworkflow
url = https://github.com/kejadlen/faker.alfredworkflow.git
@ -133,22 +17,6 @@
path = src/soulver.alfredworkflow
url = https://github.com/kejadlen/soulver.alfredworkflow.git
branch = main
[submodule ".vim/pack/alpha/start/vim-terraform"]
path = .vim/pack/alpha/start/vim-terraform
url = https://github.com/hashivim/vim-terraform.git
branch = master
[submodule ".vim/pack/alpha/start/vim-nix"]
path = .vim/pack/alpha/start/vim-nix
url = https://github.com/LnL7/vim-nix.git
shallow = true
[submodule ".vim/pack/alpha/start/riv.vim"]
path = .vim/pack/alpha/start/riv.vim
url = https://github.com/gu-fan/riv.vim
shallow = true
[submodule ".vim/pack/alpha/start/vim-ledger"]
path = .vim/pack/alpha/start/vim-ledger
url = https://github.com/ledger/vim-ledger
shallow = true
[submodule "frink.alfredworkflow"]
path = src/frink.alfredworkflow
url = https://github.com/kejadlen/frink.alfredworkflow

@ -1 +0,0 @@
setlocal commentstring=;;\ %s

@ -1,7 +0,0 @@
" set iskeyword+=:
set foldlevel=0
" noremap { ?^\d<cr>
" noremap } /^\d<cr>
let g:ledger_bin = "hledger"

@ -1,4 +0,0 @@
au BufEnter * RainbowToggleOn
setlocal foldmethod=syntax
setlocal lispwords+=define-macro,define-macro-cases,let/cc,syntax/loc,with-handlers,with-pattern
iabbrev :lambda: λ

@ -1,4 +0,0 @@
" https://github.com/vim-ruby/vim-ruby/issues/243
set regexpengine=1
set foldmethod=syntax

@ -1,2 +0,0 @@
compiler cargo
let g:rustfmt_command = 'cargo fmt --'

@ -1 +0,0 @@
set makeprg=scribble\ --dest\ scribble\ %

@ -1 +0,0 @@
setlocal commentstring=#\ %s

@ -1 +0,0 @@
nnoremap <silent><script><buffer> gl<Space> :VimwikiToggleListItem<CR>

@ -1 +0,0 @@
au BufRead,BufNewFile *.scrbl set filetype=scribble

@ -1 +0,0 @@
au BufRead,BufNewFile *.toml set filetype=toml

@ -1 +0,0 @@
Subproject commit 1dcdb21db618055134cd611f4f5918f6d00a5df0

@ -1 +0,0 @@
Subproject commit c5efef192b975b8e7d5fa3c6db932648d3b76323

@ -1 +0,0 @@
Subproject commit d393cb346dcdf733fecd7bbfc45b70b8c05e9eb4

@ -1 +0,0 @@
Subproject commit b1e91b41f5028d65fa3d31a425ff21591d5d957f

@ -1 +0,0 @@
Subproject commit 201ffc4e8dbfc3deeb26c6e278980f53d81d7f6a

@ -1 +0,0 @@
Subproject commit 889b9a7515db477f4cb6808bef1769e53493c578

@ -1 +0,0 @@
Subproject commit 73cef95895420c64b988ef11f79a75d1058e26f7

@ -1 +0,0 @@
Subproject commit 339091ac4dd1f17e225fe7d57b48aff55f99b23a

@ -1 +0,0 @@
Subproject commit 31ede5ad905ce4159a5e285073a391daa3bf83fa

@ -1 +0,0 @@
Subproject commit a5601d36fb6932e8d1a6f8b37b179a99b1456798

@ -1 +0,0 @@
Subproject commit e87cd90dc09c2a203e13af9704bd0ef79303d755

@ -1 +0,0 @@
Subproject commit 6cc2691576f97d43f8751664d1a1a908b99927e5

@ -1 +0,0 @@
Subproject commit e714ac3bcfd5a90038de49c3254eded7c70ae3c3

@ -1 +0,0 @@
Subproject commit 5c5b24c959478929b54a9e831a8e2e651a465965

@ -1 +0,0 @@
Subproject commit 8e735f84d2d954229ee65f4dc71bfc0bec897d98

@ -1 +0,0 @@
Subproject commit 7d23e97d13c40fcc6d603b291fe9b6e5f92516ee

@ -1 +0,0 @@
Subproject commit b24673a9b0d5d60b26d202deb13d4ebf90d7a2ae

@ -1 +0,0 @@
Subproject commit c3dfd41c1ed516b4b901c97562e644de62c367aa

@ -1 +0,0 @@
Subproject commit e292c4e33b2c44074c47c06e8ce8b309fd8099bc

@ -1 +0,0 @@
Subproject commit 7e65325651ff5a0b06af8df3980d2ee54cf10e14

@ -1 +0,0 @@
Subproject commit e08049f812d241bbc72127aeafa8afa2f6720886

@ -1 +0,0 @@
Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a

@ -1 +0,0 @@
Subproject commit 0960d0f59ce2bb576177a3cfed2bb55c53552a71

@ -1 +0,0 @@
Subproject commit 3e878abfd6ddc6fb5dba48b41f2b72c3a2f8249f

@ -1 +0,0 @@
Subproject commit 14464d4580af43424ed8f2614d94e62bfa40bb4d

@ -1 +0,0 @@
Subproject commit 1cc4557420f215d02c4d2645a748a816c220e99b

@ -1 +0,0 @@
Subproject commit 3d188ed2113431cf8dac77be61b842acb64433d9

@ -1 +0,0 @@
Subproject commit 2bbc5f65a80c79a5110494a2ba1b869075fcf7a0

@ -1 +0,0 @@
Subproject commit 2b882e2cc2599078f75e6e88cd268192bf7b27bf

@ -1 +0,0 @@
Subproject commit 41a675ddbeefd6a93664a4dc52f302fe3086a933

@ -1 +0,0 @@
Subproject commit cdd66d6a37d991bba7997d593586fc51a5b37aa8

@ -1 +0,0 @@
Subproject commit 6d44a6dc2ec34607c41ec78acf81657248580bf1

@ -1 +0,0 @@
Subproject commit bb1bcddf43cfebe05eb565a84ab069b357d0b3d6

269
.vimrc

@ -1,269 +0,0 @@
" vim:foldmethod=marker:foldlevel=0
" Mappings {{{
let mapleader="\<Space>"
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>
nnoremap ' `
nnoremap ` '
" nnoremap Y y$
nnoremap H ^
nnoremap L $
nnoremap Q @@
nnoremap <leader>/ :nohlsearch<cr>
" don't unindent lines starting with #
inoremap # X#
nnoremap \\ :write<cr>
inoremap \\ <esc>:write<cr>
" rerun the last command
nnoremap !! :!!<cr>
inoremap !! <esc>:!!<cr>
" }}}
" Commands {{{
set undolevels=1000
set wildmode=list:longest,full
"}}}
" Display {{{
" set t_Co=256
set background=dark
colorscheme paramount
fun! s:highlight()
" Use the terminal background color
highlight Normal ctermbg=NONE
highlight htmlH1 ctermbg=NONE
highlight htmlH2 ctermbg=NONE
highlight htmlH3 ctermbg=NONE
highlight htmlH4 ctermbg=NONE
highlight htmlH5 ctermbg=NONE
highlight htmlH6 ctermbg=NONE
" highlight CursorLine ctermbg=236
" highlight MatchParen ctermbg=238
" Bump the contrast a bit for the cursorline color
highlight Comment ctermfg=243 guifg=#767676
endfun
augroup MyHighlight
autocmd!
autocmd ColorScheme * call s:highlight()
augroup end
call s:highlight()
" highlight LongLine term=reverse cterm=reverse ctermfg=1 guifg=Black guibg=Yellow
" match LongLine /\%101v./
" set foldlevelstart=10
" set foldmethod=indent
set linebreak
set list
let &listchars="tab:\u21e5 ,trail:\u2423,extends:\u21c9,precedes:\u21c7,nbsp:\u00b7"
set number
set ttyfast
set splitbelow
set splitright
set lazyredraw
" only show cursorline in current window
augroup CursorLine
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au WinLeave * setlocal nocursorline
augroup END
" }}}
" {{{ Folding
" set foldclose=all " Close folds if you leave them in any way
" set foldcolumn=1 " Show the foldcolumn
" set foldenable " Turn on folding
set foldlevel=3
set foldmethod=syntax " Fold on the syntax
" set foldnestmax=1 " I only like to fold outer functions
" set foldopen=all " Open folds if you touch them in any way
" }}}
" Editing {{{
set hidden
if !has("nvim")
set noesckeys
endif
set virtualedit=block
set noshowmode
set tags=.git/tags
function! RestoreCursor()
let pos = line("'\"")
if pos > 0 && pos <= line("$")
normal! g`"zz
return 1
endif
endfunction
augroup RestoreCursor
autocmd!
autocmd BufWinEnter * call RestoreCursor()
augroup end
augroup DisableAutoComment
autocmd BufEnter * setlocal formatoptions-=o
augroup END
" :help ins-completion
function! CleverTab()
" https://vim.fandom.com/wiki/Autocomplete_with_TAB_when_typing_words
" if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
" return "\<C-N>"
" if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
" return "\<Tab>"
if col('.') <= 1 || strpart(getline('.'), col('.')-2, 1) =~ '\s'
return "\<Tab>"
" https://vim.fandom.com/wiki/Smart_mapping_for_tab_completion
elseif exists('&omnifunc') && &omnifunc != ''
return "\<C-X>\<C-O>"
else
return "\<C-N>"
endif
endfunction
inoremap <Tab> <C-R>=CleverTab()<CR>
" }}}
" GUI {{{
if has("gui_running")
" set background=light
" causes flickering in the terminal for some reason
set macligatures
end
set guicursor+=a:blinkon0 " disable blinking
set guifont=Source\ Code\ Pro:h13
set guioptions-=T
if has("mac") && !has("nvim")
set macmeta
endif
set mousehide
" }}}
" Persistence {{{
set directory=~/.vim_tmp
set encoding=utf8
set fileencoding=utf8
set fileformat=unix
set nobackup
set undodir=~/.vim_undo
set undofile
" }}}
" Search {{{
set gdefault
set hlsearch
set ignorecase
set smartcase
" https://github.com/haya14busa/is.vim/issues/4
map n <Plug>(is-n)zv
map N <Plug>(is-N)zv
" }}}
" Plugins {{{
" netrw
" https://github.com/tpope/vim-vinegar/issues/13
let g:netrw_fastbrowse=0
" let g:netrw_liststyle=0
autocmd FileType netrw setl bufhidden=wipe
let g:netrw_home="~/.vim_tmp"
" ripgrep
if executable('rg')
set grepprg=rg\ --no-heading\ --vimgrep
set grepformat=%f:%l:%c:%m
endif
" projectionist
nnoremap <leader>a :A<cr>
" dispatch
nnoremap <leader>d :Dispatch<cr>
" fzf
if executable('fzf')
if isdirectory('/opt/homebrew/opt/fzf/plugin')
set rtp+=/opt/homebrew/opt/fzf
elseif isdirectory('/home/alpha/.fzf')
set rtp+=~/.fzf
endif
nmap <Leader>b :Buffers<CR>
nmap <Leader>f :Files<CR>
nmap <Leader>t :Tags<CR>
" https://coreyja.com/vim-spelling-suggestions-fzf/
function! FzfSpellSink(word)
exe 'normal! "_ciw'.a:word
endfunction
function! FzfSpell()
let suggestions = spellsuggest(expand("<cword>"))
return fzf#run({'source': suggestions, 'sink': function("FzfSpellSink"), 'down': 10 })
endfunction
nnoremap z= :call FzfSpell()<CR>
endif
" gundo
nnoremap <leader>u :GundoToggle<CR>
" operator-flashy
map y <Plug>(operator-flashy)
nmap Y <Plug>(operator-flashy)$
" vimwiki
let g:vimwiki_global_ext = 0
let g:vimwiki_key_mappings = { 'headers': 0 } " `-` conflicts w/vim-vinegar
let g:vimwiki_list = [{'path': '~/sync/alphanote/', 'syntax': 'markdown', 'ext': '.md'}]
map <leader>wx <Plug>VimwikiToggleListItem
" vim-sleuth
" https://github.com/tpope/vim-sleuth/pull/55
if get(g:, '_has_set_default_indent_settings', 0) == 0
" Set the indenting level to 2 spaces for the following file types.
" autocmd FileType typescript,javascript,jsx,tsx,css,html,ruby,elixir,kotlin,vim,plantuml
" \ setlocal expandtab tabstop=2 shiftwidth=2
set expandtab
set tabstop=2
set shiftwidth=2
let g:_has_set_default_indent_settings = 1
endif
" terraform
let g:terraform_fmt_on_save = 1
" }}}
Loading…
Cancel
Save