From 4af49ed67fbf358674d45fb8af3c4c3efaf90f58 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Thu, 7 Jul 2022 15:55:41 -0500 Subject: tons of changes from when website was down --- nvim/init.vim | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'nvim/init.vim') diff --git a/nvim/init.vim b/nvim/init.vim index bf9ccc4..17e721b 100755 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,13 +1,9 @@ " Manage plugins using vim-plug -if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) - echo "Downloading junegunn/vim-plug to manage plugins..." - silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim - autocmd VimEnter * PlugInstall -endif - -call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"')) -"Plug 'jiangmiao/auto-pairs' +"if ! exists('*plug#begin') +" echo "Downloading junegunn/vim-plug to manage plugins..." +"endif +" +call plug#begin() Plug 'alvan/vim-closetag' Plug 'ap/vim-css-color' Plug 'junegunn/goyo.vim' @@ -95,13 +91,13 @@ nmap gwh3 I

l5xA

if ($USER) == 'root' colorscheme koehler else - if empty($DISPLAY) - colorscheme koehler - else +" if empty($DISPLAY) +" colorscheme koehler +" else set bg=dark let g:gruvbox_contrast_dark = 'hard' colorscheme gruvbox-timmy - endif +" endif endif " Functions for changing the terminal emulator's class name to 'Vim' @@ -144,3 +140,16 @@ function DelWS() call winrestview(l:save_view) endfunction autocmd BufWritePre * call DelWS() + + +" vim -b : edit binary using xxd-format! +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 -- cgit v1.2.3