diff options
author | Max Christian Pohle | 2023-01-20 00:42:58 +0100 |
---|---|---|
committer | Max Christian Pohle | 2023-01-20 00:42:58 +0100 |
commit | 5ec73d44d6eddb9491311f633f4be6ef609768b6 (patch) | |
tree | 65202f3f49df82992bfc72443ebbe8455fb0a509 /utils | |
parent | 5107a24190ebf257b8abe3bf959a0c1b1e032e53 (diff) | |
download | vim-5ec73d44d6eddb9491311f633f4be6ef609768b6.tar.bz2 vim-5ec73d44d6eddb9491311f633f4be6ef609768b6.zip |
qol improvements
Diffstat (limited to 'utils')
-rw-r--r-- | utils/bashrc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/bashrc b/utils/bashrc index 24c51a0..f0ee98b 100644 --- a/utils/bashrc +++ b/utils/bashrc | |||
@@ -28,3 +28,19 @@ git config --global --replace-all core.pager 'vim -c":set noswapfile filetype=gi | |||
28 | # export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" | 28 | # export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" |
29 | 29 | ||
30 | # --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A | 30 | # --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A |
31 | |||
32 | function vim() { | ||
33 | SERVER=$(ls -tr "$XDG_RUNTIME_DIR"/nvim.* | tail -n1) | ||
34 | if [ $# -gt 0 ] && [ -n "$SERVER" ]; then | ||
35 | for i in "$@"; do | ||
36 | NEXT=$(realpath "$i") | ||
37 | nvim --server "$SERVER" --remote-silent "$NEXT" | ||
38 | done | ||
39 | else | ||
40 | nvim $@ | ||
41 | fi | ||
42 | |||
43 | } | ||
44 | |||
45 | |||
46 | |||