update
This commit is contained in:
parent
c6d8d73765
commit
84b3a04fbc
3 changed files with 62 additions and 33 deletions
|
@ -1,6 +1,38 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- {{{ Vim options
|
||||
|
||||
-- tabs
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.smartindent = true
|
||||
|
||||
|
||||
-- disable modeline
|
||||
vim.opt.modeline = false
|
||||
|
||||
-- folding
|
||||
vim.opt.foldmethod = "marker"
|
||||
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- undos
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.writebackup = false
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
-- }}}
|
||||
-- {{{ Plugins
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
|
@ -217,7 +249,19 @@ require("lazy").setup({
|
|||
main_image = "file"
|
||||
})
|
||||
end,
|
||||
}
|
||||
},
|
||||
{
|
||||
-- heuristically detect file indentation
|
||||
'tpope/vim-sleuth',
|
||||
},
|
||||
{
|
||||
'https://github.com/github/copilot.vim',
|
||||
cmd = "Copilot",
|
||||
},
|
||||
{
|
||||
'RRethy/vim-illuminate',
|
||||
event = "User EnableIDE",
|
||||
},
|
||||
})
|
||||
-- }}}
|
||||
-- {{{ Keymap
|
||||
|
@ -242,37 +286,6 @@ vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
|||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||
|
||||
vim.keymap.set("n", "<leader>fv", "<cmd>Ex<cr>")
|
||||
-- }}}
|
||||
-- {{{ Vim options
|
||||
|
||||
-- tabs
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.smartindent = true
|
||||
|
||||
|
||||
-- disable modeline
|
||||
vim.opt.modeline = false
|
||||
|
||||
-- folding
|
||||
vim.opt.foldmethod = "marker"
|
||||
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- undos
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.writebackup = false
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
-- }}}
|
||||
-- {{{ IDE mode
|
||||
vim.api.nvim_create_user_command("IDE", function ()
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d8590288417fef2430f85bc8b312fae8b1cf2c40" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "f084f4a6a716f55bf9c4026e73027bb24a0325a3" },
|
||||
|
@ -18,5 +19,7 @@
|
|||
"tokyodark.nvim": { "branch": "master", "commit": "4bfb42924274abc5de9f5f4779075b77c6112c85" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "572c8510123cbde02e8a1dafcd376c98e1e13f43" },
|
||||
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "addb64a772cb4a3ae1f1363583012b2cada2cd66" }
|
||||
}
|
15
zsh/.zshrc
15
zsh/.zshrc
|
@ -29,7 +29,7 @@ on_edit() {
|
|||
echo "Running:"
|
||||
echo " $ $2"
|
||||
echo "on all edits in \"$1\""
|
||||
inotifywait -r -m fe -e CREATE -e CLOSE_WRITE -e DELETE -e MOVE ${=1} \
|
||||
inotifywait -r -m -e CREATE -e CLOSE_WRITE -e DELETE -e MOVE ${=1} \
|
||||
| while read dir action file; do echo "$dir $action $file"; $2; done
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,22 @@ certinfo() {
|
|||
openssl x509 -subject -issuer -nameopt multiline -noout
|
||||
}
|
||||
|
||||
ns() {
|
||||
sed -n "/^\!\!\! *.*$@.*$/,/^\!\!\!/p" ~/notes | head -n -2 | bat -l markdown --style "plain"
|
||||
}
|
||||
|
||||
alias ne="vim ~/notes"
|
||||
|
||||
alias yay="GNUPGHOME=$HOME/.gnupg-yay yay"
|
||||
alias md2fancyhtml="py -m markdown -x fenced_code -x codehilite"
|
||||
|
||||
[ -f "/home/bain/.ghcup/env" ] && source "/home/bain/.ghcup/env" # ghcup-env
|
||||
|
||||
export PGHOST=localhost
|
||||
|
||||
alias c="ipython -c 'from math import *; from random import randint as rand' -i --no-confirm-exit --no-banner --quick"
|
||||
|
||||
autoload -Uz compinit
|
||||
zstyle ':completion:*' menu select
|
||||
fpath+=~/.zfunc
|
||||
|
||||
|
|
Loading…
Reference in a new issue