diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2024-01-15 22:04:29 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2024-01-15 22:04:29 +1300 |
commit | e4195b44a1e3015d052c84539710580879db6532 (patch) | |
tree | 767ee887fa20e53f8a72fd9734aca273d467e778 | |
parent | Merge branch 'master' into feature/vim9script (diff) | |
parent | Update date in vimrc (diff) | |
download | dotfiles-feature/vim9script.tar.gz dotfiles-feature/vim9script.zip |
Merge branch 'develop' into feature/vim9scriptfeature/vim9script
* develop:
Update date in vimrc
Set 'smoothscroll' if it exists
Set 'cdhome' if it exists
Prevent loading the manpager plugin
Update flavor comment for stub vimrc
Remove sudo wrapper forcing -H/--set-home
Remove picom completely
Update comment on <Backspace> vimrc mapping
Remove picom config for now
Revert "Remove picom (X compositor)"
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | sh/shrc.d/sudo.sh | 8 | ||||
-rw-r--r-- | vim/after/plugin/dist.vim | 1 | ||||
-rw-r--r-- | vim/plugin/dist.vim | 2 | ||||
-rw-r--r-- | vim/vimrc | 25 | ||||
-rw-r--r-- | vim/vimrc.stub | 14 |
6 files changed, 31 insertions, 21 deletions
@@ -240,8 +240,6 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include: - `ll()` runs `ls -Al` if it can, or `ls -al` otherwise. - `path()` manages the contents of `PATH` conveniently. - `scp()` tries to detect forgotten hostnames in `scp(1)` command calls. -- `sudo()` forces `-H` for `sudo(8)` calls so that `$HOME` is never preserved; - I hate having `root`-owned files in my home directory. - `tor()` is just a terse shortcut for using Torsocks to anonymize TCP connections from the current shell. - `tree()` colorizes GNU `tree(1)` output if possible (without having diff --git a/sh/shrc.d/sudo.sh b/sh/shrc.d/sudo.sh deleted file mode 100644 index d9e30bc4..00000000 --- a/sh/shrc.d/sudo.sh +++ /dev/null @@ -1,8 +0,0 @@ -# Add the -H parameter to sudo(8) calls, always use the target user's $HOME -sudo() { - case $1 in - -v) ;; - *) set -- -H "$@" ;; - esac - command sudo "$@" -} diff --git a/vim/after/plugin/dist.vim b/vim/after/plugin/dist.vim index 98574de8..c53ebd2c 100644 --- a/vim/after/plugin/dist.vim +++ b/vim/after/plugin/dist.vim @@ -7,3 +7,4 @@ unlet loaded_rrhelper unlet loaded_spellfile_plugin unlet loaded_tarPlugin unlet loaded_zipPlugin +unlet loaded_manpager_plugin diff --git a/vim/plugin/dist.vim b/vim/plugin/dist.vim index 3a84abaa..94974f5f 100644 --- a/vim/plugin/dist.vim +++ b/vim/plugin/dist.vim @@ -14,3 +14,5 @@ let loaded_netrwPlugin = 1 let loaded_rrhelper = 1 " I don't need extra spelling files let loaded_spellfile_plugin = 1 +" No thanks, just plain `less` is fine for manual pages +let loaded_manpager_plugin = 1 @@ -4,7 +4,7 @@ vim9script # Tom Ryder (tejr)'s Literate Vimrc # ----------------------------------- # -# Last updated: Fri, 06 May 2022 12:23:48 +0000 +# Last updated: Sun, 14 Jan 2024 03:06:40 +0000 # # > And I was lifted up in heart, and thought # > Of all my late-shown prowess in the lists, @@ -494,6 +494,14 @@ endif # set breakindent +# I use `cd` with no argument to go $HOME in the shell all the time. +# Analogous behavior for Vim with :cd makes sense to me. I can use :pwd (or +# my <Leader>g mapping) if I want to see where I am. +# +if exists('+cdhome') + set cdhome +endif + # Rather than rejecting operations like :write or :saveas when 'readonly' is # set or in other situations in which data might be lost, Vim should give me # a prompt to allow me to confirm that I know what I'm doing. @@ -722,6 +730,15 @@ set noshowcmd # set shortmess+=I +# Scrolling by screen line rather than file line makes sense to me. Turn the +# option to do so on, if it's there. This only works with mouse scrolling, +# which I don't use, and with CTRL-E, CTRL-Y, which I should be using more +# anyway. +# +if exists('+smoothscroll') + set smoothscroll +endif + # I find the defaults of new windows opening above or to the left of the # previous window too jarring, because I'm used to both the i3 window manager # and the tmux terminal multiplexer doing it the other way around, in reading @@ -929,9 +946,9 @@ endif # many of these. # -# Use backspace as an even quicker way to switch to the current buffer's -# alternate buffer. User nickspoons of #vim was incredulous that I had never -# used CTRL-^ and indeed did not know about it. I have since repented. +# I use Mosh (the mobile shell) a lot, which uses CTRL-^ as its escape key. +# That shadows Vim's shortcut to switch to the alternate buffer. Map +# <Backspace> to do that instead. # nnoremap <Backspace> \ <C-^> diff --git a/vim/vimrc.stub b/vim/vimrc.stub index c8e9c441..7a7e80f0 100644 --- a/vim/vimrc.stub +++ b/vim/vimrc.stub @@ -13,13 +13,13 @@ if !&compatible && !exists('$POSIXLY_CORRECT') endif " If we got this far, it means we're running a tiny, 'compatible', and/or -" ancient version of Vim. -" -" So, strip out the user runtime directories from 'runtimepath', force -" 'compatible' on, source your trusty '~/.exrc', put on your dubbed cassette -" copy of Kraftwerk's 'Computerwelt', and start using vi v3.7 on your -" engineering department's Sun OS 4.x server via your VT220 terminal. It's -" July 1985, you write K&R C, and it's good for you, like raisin bran. +" ancient version of Vim. So: strip out the user runtime dirs from +" 'runtimepath', force 'compatible' on, :source your trusty ~/.exrc, put on +" your dubbed cassette copy of Kraftwerk's 'Computerwelt', and start using vi +" v3.7 on your engineering department's SunOS 2.0 server via your shiny new +" VT220 terminal. It's December 1985, and you're going home soon for the +" holidays. You're writing K&R C tonight. It's good for you, like raisin +" bran. " set runtimepath-=~/.vim set runtimepath-=~/.vim/after |