Editor setup changes
This commit is contained in:
parent
e986f0eabb
commit
263aeed08f
26
root.bashrc
26
root.bashrc
@ -3,14 +3,22 @@
|
|||||||
# --------------------------------
|
# --------------------------------
|
||||||
# Shell RC
|
# Shell RC
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostnamectl hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
|
||||||
|
|
||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
export EDITOR=n
|
|
||||||
export PATH=~/bin:$PATH
|
export PATH=~/bin:$PATH
|
||||||
|
|
||||||
|
#
|
||||||
|
# Editor setup
|
||||||
|
#
|
||||||
|
function n () {
|
||||||
|
/opt/neovim/nvim $* || nvim $*
|
||||||
|
}
|
||||||
|
|
||||||
|
export EDITOR=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
@ -18,20 +26,10 @@ alias ls='ls -al --color'
|
|||||||
alias q=exit
|
alias q=exit
|
||||||
alias a=clear
|
alias a=clear
|
||||||
alias h=history
|
alias h=history
|
||||||
alias e=$EDITOR
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Functions
|
# Functions
|
||||||
#
|
#
|
||||||
function myvim () {
|
|
||||||
gvim $1 >& /dev/null &
|
|
||||||
disown %1
|
|
||||||
}
|
|
||||||
|
|
||||||
function n () {
|
|
||||||
/opt/neovim/nvim $* || nvim $*
|
|
||||||
}
|
|
||||||
|
|
||||||
function hgrep () {
|
function hgrep () {
|
||||||
history | grep $1
|
history | grep $1
|
||||||
}
|
}
|
||||||
@ -42,10 +40,10 @@ function pgrep () {
|
|||||||
|
|
||||||
function u2d () {
|
function u2d () {
|
||||||
~mahesh/git/snips/get_neovim.sh
|
~mahesh/git/snips/get_neovim.sh
|
||||||
~mahesh/git/snips/get_wezterm.sh
|
# ~mahesh/git/snips/get_wezterm.sh
|
||||||
cd
|
cd
|
||||||
if [ -e /etc/arch-release ]; then
|
if [ -e /etc/arch-release ]; then
|
||||||
pacman -Syu
|
pacman --sync --refresh --sysupgrade --noconfirm
|
||||||
elif [ -e /etc/debian_version ]; then
|
elif [ -e /etc/debian_version ]; then
|
||||||
apt update && apt full-upgrade -y && apt autoremove -y
|
apt update && apt full-upgrade -y && apt autoremove -y
|
||||||
else
|
else
|
||||||
|
@ -17,9 +17,17 @@ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostnamectl hostname)\[\
|
|||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
#export EDITOR=vim
|
|
||||||
export EDITOR=nvim
|
|
||||||
export PATH=~/bin:~/.local/bin:$PATH
|
export PATH=~/bin:~/.local/bin:$PATH
|
||||||
|
export IGNOREEOF=50 # Ignore first 50 Ctrl-D on shell
|
||||||
|
|
||||||
|
#
|
||||||
|
# Editor setup
|
||||||
|
#
|
||||||
|
function n () {
|
||||||
|
/opt/neovim/nvim $* || nvim $*
|
||||||
|
}
|
||||||
|
|
||||||
|
export EDITOR=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Aliases
|
# Aliases
|
||||||
@ -28,18 +36,11 @@ alias ls='ls -altrh --color'
|
|||||||
alias q=exit
|
alias q=exit
|
||||||
alias a=clear
|
alias a=clear
|
||||||
alias h=history
|
alias h=history
|
||||||
alias e=$EDITOR
|
|
||||||
alias n=$EDITOR
|
|
||||||
alias gn='neovide --fork'
|
alias gn='neovide --fork'
|
||||||
|
|
||||||
#
|
#
|
||||||
# Functions
|
# Functions
|
||||||
#
|
#
|
||||||
function myvim () {
|
|
||||||
gvim $1 >& /dev/null &
|
|
||||||
disown %1
|
|
||||||
}
|
|
||||||
|
|
||||||
function pyedit () {
|
function pyedit () {
|
||||||
gedit $1 >& /dev/null &
|
gedit $1 >& /dev/null &
|
||||||
disown %1
|
disown %1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user