Xinqi Bao's Git

vimrc bashrc: config minor updated
authorXinqi Bao <[email protected]>
Tue, 21 Jun 2022 03:39:06 +0000 (11:39 +0800)
committerXinqi Bao <[email protected]>
Tue, 21 Jun 2022 03:39:06 +0000 (11:39 +0800)
.bashrc
.config/nvim/init.vim

diff --git a/.bashrc b/.bashrc
index 8d5b0cb..166fbb8 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -11,6 +11,7 @@ alias vim='nvim'
 alias vimdiff='nvim -d'
 
 export EDITOR=nvim
+export BROWSER=firefox
 export PATH=$HOME/tool:$PATH
 export PS1="[\[\e[36;1m\]\u@\h \[\e[32;1m\]\w\[\e[m\]]\[\e[33m\](\$(git branch 2>/dev/null | grep '^*' | colrm 1 2))\n\[\e[m\]~~~>\$ "
 export TERM=xterm-256color
@@ -19,3 +20,14 @@ ulimit -c unlimited
 [ -f ~/.fzf.bash ] && source ~/.fzf.bash
 export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'"
 
+<<COMMENT
+export proxy_url=http://localhost:1080
+export http_proxy=$proxy_url
+export https_proxy=$proxy_url
+export HTTP_PROXY=$proxy_url
+export HTTPS_PROXY=$proxy_url
+COMMENT
+
+if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
+  exec startx
+fi
index 927f94b..76502a2 100644 (file)
@@ -250,6 +250,9 @@ nnoremap <silent> <Leader>- :resize -5<CR>
 nnoremap <silent> <Leader>v+ :vertical resize +5<CR>
 nnoremap <silent> <Leader>v- :vertical resize -5<CR>
 
+" shortcut for folding
+nnoremap <silent> <Leader>fi :set foldmethod=indent<CR>
+nnoremap <silent> <Leader>fd :set foldmethod=manual<CR>ggVGzD
 
 "HighLight trailing whitespace"
 highlight ExtraWhitespace ctermbg=red guibg=red