当前位置:网站首页>Shortcut key modification of TMUX and VIM
Shortcut key modification of TMUX and VIM
2022-06-12 07:22:00 【Java baa】
List of articles
Write it at the front
The notes come from acwing Of Linux course
Linux Video address :
https://www.acwing.com/activity/content/introduction/57/
0. Before knowledge points :
# Jump to the user folder
cd
# establish .tmux.conf file And edit
vim .tmux.conf
# Paste operation
i(<Shift>+<Insert>)<Esc>:wq
1.tmux To configure
Create in user directory .tmux.conf file
set-option -g status-keys vi
setw -g mode-keys vi
setw -g monitor-activity on
# setw -g c0-change-trigger 10
# setw -g c0-change-interval 100
# setw -g c0-change-interval 50
# setw -g c0-change-trigger 75
set-window-option -g automatic-rename on
set-option -g set-titles on
set -g history-limit 100000
#set-window-option -g utf8 on
# set command prefix
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind < resize-pane -L 7
bind > resize-pane -R 7
bind - resize-pane -D 7
bind + resize-pane -U 7
bind-key -n M-l next-window
bind-key -n M-h previous-window
set -g status-interval 1
# status bar
set -g status-bg black
set -g status-fg blue
#set -g status-utf8 on
set -g status-justify centre
set -g status-bg default
set -g status-left " #[fg=green]#[email protected]#H #[default]"
set -g status-left-length 20
# mouse support
# for tmux 2.1
# set -g mouse-utf8 on
set -g mouse on
#
# for previous version
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
#set -g status-right-length 25
set -g status-right "#[fg=green]%H:%M:%S #[fg=magenta]%a %m-%d #[default]"
# fix for tmux 1.9
bind '"' split-window -vc "#{pane_current_path}"
bind '%' split-window -hc "#{pane_current_path}"
bind 'c' new-window -c "#{pane_current_path}"
# run-shell "powerline-daemon -q"
# vim: ft=conf
2.vim To configure
Create in user directory .vimrc file
" An example for a vimrc file. "
" To use it, copy it to " for Unix and OS/2: ~/.vimrc
">-- for Amiga: s:.vimrc " for MS-DOS and Win32: $VIM\_vimrc
">-- for OpenVMS: sys$login:.vimrc " When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather then Vi settings (much better!). " This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode set backspace=indent,eol,start if has("vms") set nobackup>->---" do not keep a backup file, use versions instead
else
set backup>--->---" keep a backup file endif set history=50>->---" keep 50 lines of command line history
set ruler>-->---" show the cursor position all the time set showcmd>>---" display incomplete commands
set incsearch>-->---" do incremental searching "==========================================================================
"My Setting-sunshanlu "==========================================================================
vmap <leader>y :w! /tmp/vitmp<CR>
nmap <leader>p :r! cat /tmp/vitmp<CR>
" Syntax highlighting syntax enable syntax on " According to the line Numbers
set nu
" Change the default annotation color "hi Comment ctermfg=DarkCyan
" Allow backspace key to delete "set backspace=2
" Enable mouse set mouse=a set selection=exclusive set selectmode=mouse,key " Press C Language format indent
set cindent
set autoindent
set smartindent
set shiftwidth=4
" Allows buffer switching when there are unsaved changes "set hidden
" Set no backup files set writebackup set nobackup " Show bracket matching
set showmatch
" The bracket matching time is 1( The unit is one tenth of a second ) set matchtime=5 " Displays the current row number and column number :
set ruler
" The command being entered is displayed in the status bar set showcmd set foldmethod=syntax " Do not collapse by default
set foldlevel=100
" Open the status bar information set laststatus=2 " Command line height , The default is 1, Set here as 2
set cmdheight=2
" Show Tab operator , Use a highlighted vertical bar instead of set list "set listchars=tab:\|\ ,
set listchars=tab:>-,trail:-
" Detect file types filetype on " Load file type plug-in
filetype plugin on
" Load related indented files for a specific file type filetype indent on " Enable auto completion
filetype plugin indent on-
" Set up automatic recognition of coding , Chinese quotation marks show filetype on " Open file type detection
"set fileencodings=euc-cn,ucs-bom,utf-8,cp936,gb2312,gb18030,gbk,big5,euc-jp,euc-kr,latin1 set fileencodings=utf-8,gb2312,gbk,gb18030 " This can be very powerful , No matter encoding What's the code , Can display text in Chinese characters
"set termencoding=gb2312 set termencoding=utf-8 " The encoding used for the new file
set fileencoding=utf-8
"set fileencoding=gb2312 " Code for display , Just to show
set encoding=utf-8
"set encoding=utf-8 "set encoding=euc-cn
"set encoding=gbk "set encoding=gb2312
"set ambiwidth=double
set fileformat=unix
3. Written in the back
Welcome to your attention , Recently, I will often send some problems and notes encountered in work or study .
Please feel free to leave a message to discuss , Know all but answer !
边栏推荐
- Test manager defines and implements test metrics
- [college entrance examination] prospective college students look at it, choose the direction and future, and grasp it by themselves
- Elegantly spliced XML
- knife4j 初次使用
- d不能用非常ctfe指针
- AI狂想|来这场大会,一起盘盘 AI 的新工具!
- Junior high school education, less than 3k, to 30k+ monthly salary, how wonderful life is without restrictions
- 9 Sequence container
- Difference and application of SPI, UART and I2C communication
- Summary of software testing tools in 2021 - unit testing tools
猜你喜欢

Gradient epic memory for continuous learning

There is no solid line connection between many devices in Proteus circuit simulation design diagram. How are they realized?

Node, topic, parameter renaming and global, relative and private namespaces in ROS (example + code)

Esp8266 firmware upgrade method (esp8266-01s module)

LED lighting experiment with simulation software proteus

Pyhon的第五天

"I was laid off by a big factory"

Summary of machine learning + pattern recognition learning (I) -- k-nearest neighbor method

Day 5 of pyhon
![[yolo-v5 learning notes]](/img/f8/713210cafd7b750df540acbe03fd29.jpg)
[yolo-v5 learning notes]
随机推荐
Esp8266 firmware upgrade method (esp8266-01s module)
node:打不开/node:已拒绝访问
@DateTimeFormat @JsonFormat 的区别
Static coordinate transformation in ROS (analysis + example)
Golang 快速生成数据库表的 model 和 queryset
Explain ADC in stm32
Android studio uses database to realize login and registration interface function
Federated reconnaissance: efficient, distributed, class incremental learning paper reading + code analysis
Embedded gd32 code read protection
5 lines of code identify various verification codes
The most understandable explanation of coordinate transformation (push to + diagram)
Continuous local training for better initialization of Federated models
Summary of machine learning + pattern recognition learning (I) -- k-nearest neighbor method
SQL Server 2019 installation error. How to solve it
五、EL 表达式& JSTL 标签库
Federated meta learning with fast convergence and effective communication
Error mcrypt in php7 version of official encryption and decryption library of enterprise wechat_ module_ Open has no method defined and is discarded by PHP. The solution is to use OpenSSL
RT thread studio learning summary
Beginners can't tell the difference between framework and class library
d的扩大@nogc