linux高效办公环境配置(vim、tmux、bash_profile)
生活随笔
收集整理的這篇文章主要介紹了
linux高效办公环境配置(vim、tmux、bash_profile)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- Vim
- 個人設置(.vimrc)
- tmux
- 安裝參考
- 個人配置(.tmux.conf)
- bash_prifile
- 個人配置(.bash_profile)
- shell
Vim
個人設置(.vimrc)
set ai " 自動縮進,新行與前面的行保持—致的自動空格
set aw " 自動寫,轉入shell或使用:n編輯其他文件時,當前的緩沖區被寫入
set flash " 在出錯處閃爍但不嗚叫(缺省)
set ic " 在查詢及模式匹配時忽賂大小寫
set nu
set number " 屏幕左邊顯示行號
set showmode " 處于文本輸入方式時加亮按鈕條中的模式指示器
set showcmd " 在狀態欄顯示目前所執行的指令,未完成的指令片段亦會顯示出來
set autoindent " 設置自動縮進:即每行的縮進值與上一行相等;使用 noautoindent 取消設置
set cindent " 以C/C++的模式縮進
set noignorecase " 默認區分大小寫
set ruler " 打開狀態欄標尺
set scrolloff=5 " 設定光標離窗口上下邊界 5 行時窗口自動滾動
set tabstop=4 " 設定 tab 長度為 4
set wrap " 自動換行顯示
set shiftwidth=4 "indent width
set expandtab "expand tab to space
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set foldmethod=indent "set default foldmethod
tmux
安裝參考
tmux:打造精致與實用并存的終端
tmux的使用方法和個性化配置
個人配置(.tmux.conf)
# 設置前綴為Ctrl + a
set -g prefix C-a# 解除前綴為Ctrl + b
unbin C-b#將r 設置為加載配置文件,并顯示"reloaded!"信息
bind r source-file ~/.tmux.conf \; display "Reloaded!"#up
bind-key k select-pane -U#down
bind-key j select-pane -D#left
bind-key h select-pane -L#right
bind-key l select-pane -R#select last window
bind-key C-l select-window -l# 綁定Ctrl+hjkl鍵為面板上下左右調整邊緣的快捷指令
bind -r ^k resizep -U 5 # 綁定Ctrl+k為往↑調整面板邊緣10個單元格
bind -r ^j resizep -D 5 # 綁定Ctrl+j為往↓調整面板邊緣10個單元格
bind -r ^h resizep -L 5 # 綁定Ctrl+h為往←調整面板邊緣10個單元格
bind -r ^l resizep -R 5 # 綁定Ctrl+l為往→調整面板邊緣10個單元格#copy-mode 將快捷鍵設置為vi 模式
setw -g mode-keys vi# zoom pane <-> window
# #http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/examples/tmux-zoom.sh
bind ^z run "tmux-zoom"# 設置鼠標支持
#set-option -g mouse on
#setw -g mode-mouse off
bash_prifile
個人配置(.bash_profile)
# .bash_profile# Get the aliases and functions
if [ -f ~/.bashrc ]; then. ~/.bashrc
fiulimit -c unlimited
#export LANG=zh_CN.GBK
#export LC_COLLATE=C
#export LC_ALL=zh_CN.GBKexport LANG=en_US.UTF-8
export LC_COLLATE=C
export LC_ALL=en_US.UTF-8getscp ()
{echo $USER@$(hostname -i | awk '{print $1}'):$(readlink -f $1)
}# alias some shell
ip=`hostname -I | awk '{print $1}'`
alias al='axel -n 10 -o'
alias topsty='top -u sutaoyu'
alias jynt='jupyter notebook --no-browser --port 8080 --ip='${ip}
alias gm='git push origin master'
alias sp='source ~/.bash_profile'
alias sshgen='ssh-keygen -t rsa -C "sutaoyu@yeah.net"'
alias conda_set_0='conda config --set auto_activate_base false'
shell
可以參考這里 打造高效的工作環境
其中本人嘗試的插件包括:
shell 命令自動補全工具fish : 用起來超級爽,可以自動補全經常使用過的命令行名稱
ubuntu安裝如下:
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt-get update
sudo apt-get install fish
centos安裝如下:
對于 RedHat RHEL-6,請以根用戶 root 運行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/shells:fish:release:3/RedHat_RHEL-6/shells:fish:release:3.repo
yum install fish對于 RHEL 7,請以根用戶 root 運行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/shells:fish:release:3/RHEL_7/shells:fish:release:3.repo
yum install fish
總結
以上是生活随笔為你收集整理的linux高效办公环境配置(vim、tmux、bash_profile)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: windows安装MongoDB环境以及
- 下一篇: Qt中如何改变三角形图形项的包围盒