Using nvim now.

This commit is contained in:
Andrey Parhomenko 2023-08-24 12:48:42 +03:00
parent b27c41a75b
commit 33cb8594d5
4 changed files with 36 additions and 1 deletions

View file

@ -53,6 +53,7 @@ export_loop \
MYVIMRC '$HOME/.vimrc'\ MYVIMRC '$HOME/.vimrc'\
test -r $SETENV && . "$SETENV" && setenv profile test -r $SETENV && . "$SETENV" && setenv profile
test -r $HOME/lib/script/lf.sh && . $HOME/lib/script/lf.sh
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
export SSH_TTY=$(tty) export SSH_TTY=$(tty)

1
nvim
View file

@ -1 +0,0 @@
dot/file/vim

16
nvim/init.lua Normal file
View file

@ -0,0 +1,16 @@
vim.o.smarttab = true
vim.o.swapfile = false
vim.o.number = true
vim.api.nvim_cmd({
cmd = 'colorscheme',
args = {'slate'},
}, {})
-- Key mapping
local map = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true}
map('n', 'confr', ':source $HOME/lib/nvim/init.lua\n', opts)
map('n', 'confe', ':e $HOME/lib/nvim/init.lua\n', opts)

19
script/lf.sh Normal file
View file

@ -0,0 +1,19 @@
if test $OS = "Windows_NT" ; then
lf() {
winpty lf
}
fi
lfcd () {
tmp="$(mktemp)"
# `command` is needed in case `lfcd` is aliased to `lf`
command lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
if [ -d "$dir" ]; then
if [ "$dir" != "$(pwd)" ]; then
cd "$dir"
fi
fi
fi
}