Merge branch 'master' of ssh://git.blakenorth.net:6102/home/git/dotfiles

This commit is contained in:
PowerUser64 2021-10-01 02:58:57 -07:00
commit 1e7429a055
2 changed files with 48 additions and 29 deletions

View file

@ -88,25 +88,14 @@ vim.cmd [[
vnoremap J :m '>+1<CR>gv=gv vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv
" Make vim a hex editor " Format text with Q, rather than gw
" Edit *.bin files as binaries rather than text files (if your file isn't a .bin, nnoremap Q gw
" make a symlink that points to it with the .bin extension and edit the symlink ;)
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END
colorscheme slate colorscheme slate
]] ]]
-- 24-bit color
vim.cmd [[ vim.cmd [[
""""""" Quality of life things that aren't one line (also from stack overflow and stuff)
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support "If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) "(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
@ -119,12 +108,31 @@ endif
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors")) if (has("termguicolors"))
set termguicolors "set termguicolors
endif endif
endif endif
]] ]]
-- Make vim a hex editor
-- Edit *.bin files as binaries rather than text files (if your file isn't a .bin,
-- make a symlink that points to it with the .bin extension and edit the symlink ;)
vim.cmd [[
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END
]]
-- 'Visual At' plugin (https://github.com/stoeffel/.dotfiles/blob/master/vim/visual-at.vim) -- 'Visual At' plugin (https://github.com/stoeffel/.dotfiles/blob/master/vim/visual-at.vim)
-- basically, record a macro, select some lines, then run it, and the macro
-- will be executed on all visual selected lines individually
vim.cmd [[ vim.cmd [[
xnoremap @ :<C-u>call ExecuteMacroOverVisualRange()<CR> xnoremap @ :<C-u>call ExecuteMacroOverVisualRange()<CR>
function! ExecuteMacroOverVisualRange() function! ExecuteMacroOverVisualRange()
@ -136,3 +144,12 @@ endfunction
-- Automatically jump to the last position in a file when opening -- Automatically jump to the last position in a file when opening
vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
-- Highlight trailing whitespace in red
vim.cmd [[
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
au BufWinEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhitespace /\s\+$/
au BufWinLeave * call clearmatches()
]]

View file

@ -1,5 +1,7 @@
[credential] [credential]
helper = store helper = store
[pull]
rebase = false
[user] [user]
email = blakelysnorth@gmail.com email = blakelysnorth@gmail.com
name = PowerUser64 name = PowerUser64