aliases
This commit is contained in:
parent
9d94bfa4f9
commit
9764834e79
@ -66,7 +66,8 @@ alias svi="sudo -E nvim"
|
||||
# net
|
||||
alias ports='ss -tlnp'
|
||||
alias wget='wget -c'
|
||||
alias myip='curl ipinfo.io/ip'
|
||||
# alias myip='curl ipinfo.io/ip'
|
||||
alias myip='dig +short myip.opendns.com @resolver1.opendns.com'
|
||||
alias sprunge='curl -F "sprunge=<-" http://sprunge.us 2>/dev/null' # CLI pastebin
|
||||
alias weather='(curl -4 wttr.in/$(cat) 2>/dev/null | head -n -1) <<<'
|
||||
alias ip='ip -c'
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
[alias]
|
||||
a = "!git ls-files --exclude-standard -m --others -t | fzf -0 -m --bind load:last --preview 'git diff --color=always {2}' | cut -d' ' -f2 | xargs -r git add"
|
||||
s = "!git diff --name-only --cached | fzf -0 -m --bind load:last --preview 'git diff --staged --color=always {1}' | xargs -r git restore --staged"
|
||||
u = "!git diff --name-only --cached | fzf -0 -m --bind load:last --preview 'git diff --staged --color=always {1}' | xargs -r git restore --staged"
|
||||
d = diff
|
||||
di = diff
|
||||
ds = diff --staged
|
||||
@ -55,6 +55,7 @@
|
||||
ci = commit
|
||||
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"
|
||||
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
|
||||
pr = "pull --rebase"
|
||||
st = status
|
||||
br = branch
|
||||
bm = branch --merged
|
||||
|
||||
@ -101,6 +101,7 @@ map("c", '%%', [[getcmdtype() == ':' ? expand('%:h').'/' : '%%']], {expr = true}
|
||||
|
||||
-- Save from root
|
||||
vim.api.nvim_create_user_command('W', [[execute 'silent! write !SUDO_ASKPASS=vim_askpass_helper sudo -A tee % >/dev/null' <bar> edit!]], {})
|
||||
vim.api.nvim_create_user_command('X', [[execute 'silent! write !SUDO_ASKPASS=vim_askpass_helper sudo -A tee % >/dev/null' <bar> edit! | q]], {})
|
||||
vim.cmd([[autocmd FileChangedRO * set readonly!]])
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user