bashrc, zshrc: some syntax altered; tmux.conf, xresources: some tweaks; vimplugrc: get rid of some plugins, bring back gvim
This commit is contained in:
		
							parent
							
								
									8ed77f7db4
								
							
						
					
					
						commit
						ea9ede6627
					
				
					 5 changed files with 30 additions and 39 deletions
				
			
		
							
								
								
									
										12
									
								
								bashrc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								bashrc
									
										
									
									
									
								
							| 
						 | 
					@ -22,8 +22,8 @@ prompt_command() {
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
((UID)) && ps_clr=4 || ps_clr=1
 | 
					((UID)) && ps_clr=4 || ps_clr=1
 | 
				
			||||||
# just a colored version of [ $USER@$HOSTNAME:~ ]
 | 
					# just a colored version of [ $USER $HOSTNAME:$CWD ]
 | 
				
			||||||
PS1='\[\e[47;30m\][ \[\e[3'"$ps_clr"'m\]\u\[\e[30m\] \h:\[\e[32m\w\[\e[30m\] ]\[\e[0m\]\n\$ '
 | 
					printf -v PS1 '\\[\\e[0m\\][ \\[\\e[3%sm\\]\\u\\[\\e[0m\\] \\h:\\[\\e[32m\\w\\[\\e[0m\\] ]\n\\$ ' $ps_clr
 | 
				
			||||||
unset ps_clr
 | 
					unset ps_clr
 | 
				
			||||||
PROMPT_COMMAND=prompt_command
 | 
					PROMPT_COMMAND=prompt_command
 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
| 
						 | 
					@ -92,14 +92,6 @@ gdf() {
 | 
				
			||||||
        gdiff "$@"
 | 
					        gdiff "$@"
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
# more compatible TERM for ssh sessions
 | 
					 | 
				
			||||||
s() {
 | 
					 | 
				
			||||||
    if termcompat=$(command -v termcompat); then
 | 
					 | 
				
			||||||
        "$termcompat" ssh "$@"
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        ssh "$@"
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
# we want to see exit code on error (it also has to be the last entry here)
 | 
					# we want to see exit code on error (it also has to be the last entry here)
 | 
				
			||||||
trap_msg='\e[31m>>\e[0m exit \e[31m%s\e[0m\n'
 | 
					trap_msg='\e[31m>>\e[0m exit \e[31m%s\e[0m\n'
 | 
				
			||||||
trap 'printf "$trap_msg" "$?" >&2' ERR
 | 
					trap 'printf "$trap_msg" "$?" >&2' ERR
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,9 +11,10 @@ bind -T resize -r h resize-pane -L 5
 | 
				
			||||||
bind -T resize -r j resize-pane -D 5
 | 
					bind -T resize -r j resize-pane -D 5
 | 
				
			||||||
bind -T resize -r k resize-pane -U 5
 | 
					bind -T resize -r k resize-pane -U 5
 | 
				
			||||||
bind -T resize -r l resize-pane -R 5
 | 
					bind -T resize -r l resize-pane -R 5
 | 
				
			||||||
bind p command-prompt -p "ssh:" "new-session -As 'ssh'; new-window -n '%1' 'termcompat ssh %%'"
 | 
					bind p command-prompt -p "ssh:" "new-window 's %%'"
 | 
				
			||||||
bind t command-prompt -p "attach pane to:"  "join-pane -t '%%'"
 | 
					bind t command-prompt -p "attach pane to:"  "join-pane -t '%%'"
 | 
				
			||||||
bind y command-prompt break-pane
 | 
					bind y command-prompt break-pane
 | 
				
			||||||
 | 
					bind N new-session
 | 
				
			||||||
bind -n M-w next-window
 | 
					bind -n M-w next-window
 | 
				
			||||||
bind -n M-q previous-window
 | 
					bind -n M-q previous-window
 | 
				
			||||||
set -g prefix C-g
 | 
					set -g prefix C-g
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								vimplugrc
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								vimplugrc
									
										
									
									
									
								
							| 
						 | 
					@ -9,25 +9,21 @@ silent!call plug#begin(plugdir)
 | 
				
			||||||
Plug 'junegunn/vim-plug'
 | 
					Plug 'junegunn/vim-plug'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" general plugins
 | 
					" general plugins
 | 
				
			||||||
 | 
					"Plug 'sheerun/vim-polyglot'
 | 
				
			||||||
Plug 'junegunn/fzf.vim'
 | 
					Plug 'junegunn/fzf.vim'
 | 
				
			||||||
Plug 'junegunn/vim-easy-align'
 | 
					Plug 'junegunn/vim-easy-align'
 | 
				
			||||||
Plug 'lifepillar/vim-solarized8'
 | 
					Plug 'lifepillar/vim-solarized8'
 | 
				
			||||||
Plug 'lifepillar/vim-gruvbox8'
 | 
					Plug 'lifepillar/vim-gruvbox8'
 | 
				
			||||||
Plug 'mhinz/vim-signify'
 | 
					Plug 'mhinz/vim-signify'
 | 
				
			||||||
Plug 'sheerun/vim-polyglot'
 | 
					 | 
				
			||||||
Plug 'tpope/vim-commentary'
 | 
					Plug 'tpope/vim-commentary'
 | 
				
			||||||
Plug 'tpope/vim-fugitive'
 | 
					Plug 'tpope/vim-fugitive'
 | 
				
			||||||
Plug 'tpope/vim-rsi'
 | 
					Plug 'tpope/vim-rsi'
 | 
				
			||||||
Plug 'tpope/vim-vinegar'
 | 
					Plug 'tpope/vim-vinegar'
 | 
				
			||||||
Plug 'davidhalter/jedi-vim', {'for': 'python'}
 | 
					Plug 'w0rp/ale', {'for': ['sh']}
 | 
				
			||||||
Plug 'w0rp/ale', {'for': ['python', 'sh']}
 | 
					 | 
				
			||||||
Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
 | 
					Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
call plug#end()
 | 
					call plug#end()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" ale
 | 
					 | 
				
			||||||
let g:ale_python_flake8_executable = 'python2'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" easy-align
 | 
					" easy-align
 | 
				
			||||||
xmap <Leader>a <Plug>(EasyAlign)
 | 
					xmap <Leader>a <Plug>(EasyAlign)
 | 
				
			||||||
nmap <Leader>a <Plug>(EasyAlign)
 | 
					nmap <Leader>a <Plug>(EasyAlign)
 | 
				
			||||||
| 
						 | 
					@ -39,11 +35,18 @@ nmap <Leader>fb :Buffers<CR>
 | 
				
			||||||
nmap <Leader>fl :Lines<CR>
 | 
					nmap <Leader>fl :Lines<CR>
 | 
				
			||||||
nmap <Leader>ft :Filetypes<CR>
 | 
					nmap <Leader>ft :Filetypes<CR>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" vimwiki
 | 
					 | 
				
			||||||
let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
 | 
					let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" colorschemes
 | 
					if has('gui_running')
 | 
				
			||||||
if $TERM =~ '^tmux' || $TERM =~ '^xterm' || $TERM =~ '^st'
 | 
					    set guifont=Fantasque\ Sans\ Mono\ 14
 | 
				
			||||||
 | 
					    set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
 | 
				
			||||||
 | 
					    set bg=dark guiheadroom=0 guioptions=aei mouse=a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    map <S-Insert> <MiddleMouse>
 | 
				
			||||||
 | 
					    map! <S-Insert> <MiddleMouse>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    colorscheme gruvbox8
 | 
				
			||||||
 | 
					elseif $TERM =~ '^tmux' || $TERM =~ '^xterm' || $TERM =~ '^st'
 | 
				
			||||||
    set bg=dark tgc
 | 
					    set bg=dark tgc
 | 
				
			||||||
    let g:gruvbox_filetype_hi_groups = 1
 | 
					    let g:gruvbox_filetype_hi_groups = 1
 | 
				
			||||||
    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
 | 
					    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ Xft.hinting:            true
 | 
				
			||||||
Xft.hintstyle:          hintslight
 | 
					Xft.hintstyle:          hintslight
 | 
				
			||||||
Xft.dpi:                96
 | 
					Xft.dpi:                96
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define TERMINUS        -xos4-terminus-bold-*-*-*-14-*-*-*-*-*-iso10646-1
 | 
					#define TERMINUS        -xos4-terminus-bold-*-*-*-18-*-*-*-*-*-iso10646-1
 | 
				
			||||||
#define TERMINUS_SMALL  -xos4-terminus-*-*-*-*-12-*-*-*-*-*-iso10646-1
 | 
					#define TERMINUS_SMALL  -xos4-terminus-*-*-*-*-12-*-*-*-*-*-iso10646-1
 | 
				
			||||||
#define FONT            xft:Fantasque Sans Mono:12
 | 
					#define FONT            xft:Fantasque Sans Mono:12
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										31
									
								
								zshrc
									
										
									
									
									
								
							
							
						
						
									
										31
									
								
								zshrc
									
										
									
									
									
								
							| 
						 | 
					@ -71,13 +71,16 @@ bindkey -s '^j'   '^atime ^m'          # ctrl + j
 | 
				
			||||||
bindkey '^x^e'    edit-command-line
 | 
					bindkey '^x^e'    edit-command-line
 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
# {{{ prompt
 | 
					# {{{ prompt
 | 
				
			||||||
prompt_state_file=/tmp/zsh_gitstatus_$$.tmp
 | 
					prompt_fmt='%%k%%f[ %s %s:%s %s]\n> '
 | 
				
			||||||
prompt_ln1='%K{white}%F{black}[ %F{%(!.red.blue)}%n%F{black} %m:%F{green}%d%F{black} '
 | 
					prompt_user='%F{%(!.red.blue)}%n%f'
 | 
				
			||||||
prompt_ln2=$']%f%k\n> '
 | 
					prompt_host='%m'
 | 
				
			||||||
PROMPT=$prompt_ln1$prompt_ln2
 | 
					prompt_cwd='%F{green}%d%f'
 | 
				
			||||||
PROMPT2='%K{white}%F{black}[ %_ ]%f%k '
 | 
					prompt_git_fmt='\ue0a0 %s %s%%f '
 | 
				
			||||||
PROMPT3='%K{white}%F{black}[ ?# ]%f%k '
 | 
					prompt_state_file=/run/user/$UID/zsh_gitstatus_$$.tmp
 | 
				
			||||||
PROMPT4='%K{white}%F{black}[ +%N:%i ]%f%k '
 | 
					PROMPT=$'%k%f[ %n %m:%d ]\n> '
 | 
				
			||||||
 | 
					PROMPT2='%k%f[ %_ ] '
 | 
				
			||||||
 | 
					PROMPT3='%k%f[ ?# ] '
 | 
				
			||||||
 | 
					PROMPT4='%k%f[ +%N:%i ] '
 | 
				
			||||||
precmd.title() {
 | 
					precmd.title() {
 | 
				
			||||||
    case $TERM in
 | 
					    case $TERM in
 | 
				
			||||||
        (screen*) printf '\033k%s\033\'  ${HOST%%.*};;
 | 
					        (screen*) printf '\033k%s\033\'  ${HOST%%.*};;
 | 
				
			||||||
| 
						 | 
					@ -122,10 +125,10 @@ precmd.git() {
 | 
				
			||||||
    (( unmerged_count  )) && git_status+=%F{cyan}*$unmerged_count
 | 
					    (( unmerged_count  )) && git_status+=%F{cyan}*$unmerged_count
 | 
				
			||||||
    [[ -z $git_status  ]] && git_status=%F{green}ok
 | 
					    [[ -z $git_status  ]] && git_status=%F{green}ok
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    printf '\ue0a0 %s %s%%F{black} ' $branch_status $git_status > $prompt_state_file
 | 
					    printf $prompt_git_fmt $branch_status $git_status > $prompt_state_file
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
precmd.prompt() {
 | 
					precmd.prompt() {
 | 
				
			||||||
    PROMPT=$prompt_ln1$1$prompt_ln2
 | 
					    printf -v PROMPT $prompt_fmt $prompt_user $prompt_host $prompt_cwd $1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
precmd.git_update() {
 | 
					precmd.git_update() {
 | 
				
			||||||
    precmd.git
 | 
					    precmd.git
 | 
				
			||||||
| 
						 | 
					@ -137,7 +140,7 @@ precmd() {
 | 
				
			||||||
        precmd.prompt $'\ue0a0 ... '
 | 
					        precmd.prompt $'\ue0a0 ... '
 | 
				
			||||||
        precmd.git_update &!
 | 
					        precmd.git_update &!
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        precmd.prompt
 | 
					        precmd.prompt ''
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
TRAPUSR1() {
 | 
					TRAPUSR1() {
 | 
				
			||||||
| 
						 | 
					@ -181,14 +184,6 @@ scr()     { command screen sudo -Es }
 | 
				
			||||||
# vim
 | 
					# vim
 | 
				
			||||||
vi()  { $(whence -p nvim || whence -p vim || return 1) $@ }
 | 
					vi()  { $(whence -p nvim || whence -p vim || return 1) $@ }
 | 
				
			||||||
vim() { vi $@ }
 | 
					vim() { vi $@ }
 | 
				
			||||||
 | 
					 | 
				
			||||||
# termcompat
 | 
					 | 
				
			||||||
s() {
 | 
					 | 
				
			||||||
    [[ -n $TMUX ]] && /usr/bin/tmux renamew $1
 | 
					 | 
				
			||||||
    $(whence -p termcompat||return 0) ssh $@
 | 
					 | 
				
			||||||
    [[ -n $TMUX ]] && /usr/bin/tmux renamew $HOST
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
# {{{ plugins
 | 
					# {{{ plugins
 | 
				
			||||||
# grc
 | 
					# grc
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue