Update
This commit is contained in:
parent
41cfe31f38
commit
1250cbd2ef
11 changed files with 102 additions and 81 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.swp
|
||||||
|
*.pyc
|
4
bashrc
4
bashrc
|
@ -123,7 +123,3 @@ alias kgp="kubectl get pods -o wide"
|
||||||
for bin in kubectl helm talosctl ; do
|
for bin in kubectl helm talosctl ; do
|
||||||
type $bin &>/dev/null && source <($bin completion bash)
|
type $bin &>/dev/null && source <($bin completion bash)
|
||||||
done
|
done
|
||||||
|
|
||||||
if type dpkg &>/dev/null && ! dpkg -l fonts-powerline &>/dev/null; then
|
|
||||||
echo "Notice: Please install fonts-powerline"
|
|
||||||
fi
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"root"
|
"root"
|
||||||
],
|
],
|
||||||
"cwd": {
|
"cwd": {
|
||||||
|
"mode": "plain",
|
||||||
"max_depth": 8,
|
"max_depth": 8,
|
||||||
"max_dir_size": 20
|
"max_dir_size": 20
|
||||||
},
|
},
|
||||||
|
|
1
config/powerline-shell/powerline-shell
Symbolic link
1
config/powerline-shell/powerline-shell
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline-shell
|
Binary file not shown.
1
config/powerline/powerline
Symbolic link
1
config/powerline/powerline
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/.autofs/lunixpf001/home-TI16/pannekge-admin/git/homedir-config/config/config/powerline
|
|
@ -64,6 +64,9 @@ bind -n 'S-Up' resize-pane -U 1
|
||||||
bind -n 'S-Left' resize-pane -L 1
|
bind -n 'S-Left' resize-pane -L 1
|
||||||
bind -n 'S-Right' resize-pane -R 1
|
bind -n 'S-Right' resize-pane -R 1
|
||||||
|
|
||||||
|
bind -n End send-key C-e
|
||||||
|
bind -n Home send-key C-a
|
||||||
|
|
||||||
# copypaste
|
# copypaste
|
||||||
#bind-key -n -t emacs-copy C-x copy-pipe "xclip -i -sel p -f | xclip -i -sel c "
|
#bind-key -n -t emacs-copy C-x copy-pipe "xclip -i -sel p -f | xclip -i -sel c "
|
||||||
#bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
|
#bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
|
||||||
|
@ -87,8 +90,8 @@ bind -n C-left swap-window -t -1
|
||||||
bind -n C-right swap-window -t +1
|
bind -n C-right swap-window -t +1
|
||||||
|
|
||||||
## Splitting panes
|
## Splitting panes
|
||||||
bind 'v' split-window -v
|
bind 'h' split-window -v
|
||||||
bind 'h' split-window -h
|
bind 'v' split-window -h
|
||||||
|
|
||||||
## Mouse toggling
|
## Mouse toggling
|
||||||
bind m \
|
bind m \
|
||||||
|
@ -99,6 +102,8 @@ bind k \
|
||||||
set -g mouse off \;\
|
set -g mouse off \;\
|
||||||
display 'Mouse: OFF'
|
display 'Mouse: OFF'
|
||||||
|
|
||||||
|
set-window-option -g xterm-keys on
|
||||||
|
|
||||||
#### COLOUR (Solarized 256)
|
#### COLOUR (Solarized 256)
|
||||||
|
|
||||||
# default statusbar colors
|
# default statusbar colors
|
||||||
|
@ -138,7 +143,7 @@ set -g @plugin 'tmux-plugins/tmux-sidebar'
|
||||||
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
||||||
|
|
||||||
set -g @tmux_power_theme 'forest'
|
set -g @tmux_power_theme 'forest'
|
||||||
|
#set -g @tmux_power_theme '#483D8B'
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
|
@ -10,7 +10,8 @@ Plugin 'altercation/vim-colors-solarized'
|
||||||
Plugin 'scrooloose/nerdtree'
|
Plugin 'scrooloose/nerdtree'
|
||||||
Plugin 'vim-syntastic/syntastic'
|
Plugin 'vim-syntastic/syntastic'
|
||||||
Plugin 'farmergreg/vim-lastplace.git'
|
Plugin 'farmergreg/vim-lastplace.git'
|
||||||
Plugin 'yggdroot/indentline'
|
Plugin 'dense-analysis/ale'
|
||||||
|
Plugin 'fatih/vim-go'
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
filetype plugin indent on " required
|
filetype plugin indent on " required
|
||||||
"
|
"
|
||||||
|
@ -51,13 +52,15 @@ set incsearch "Just to searchresult while typing
|
||||||
set hlsearch " Highlight search results
|
set hlsearch " Highlight search results
|
||||||
hi Search guibg=lightRed
|
hi Search guibg=lightRed
|
||||||
|
|
||||||
|
set cursorcolumn " Show vertical cursorline
|
||||||
|
set cursorline
|
||||||
|
|
||||||
" Press Space to turn off highlighting and clear any message already displayed.
|
" Press Space to turn off highlighting and clear any message already displayed.
|
||||||
:nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
|
:nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
|
||||||
" ------------------------------------ Colors / Theme -------------------------------------------
|
" ------------------------------------ Colors / Theme -------------------------------------------
|
||||||
"let g:solarized_visibility = "high"
|
"let g:solarized_visibility = "high"
|
||||||
"let g:solarized_contrast = "low"
|
"let g:solarized_contrast = "low"
|
||||||
"let g:solarized_termcolors = 256
|
"let g:solarized_termcolors = 256
|
||||||
let g:airline_solarized_bg='dark'
|
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
augroup CursorLine
|
augroup CursorLine
|
||||||
|
@ -77,6 +80,7 @@ nnoremap <C-V> <C-W><C-V>
|
||||||
|
|
||||||
" ------------------------------------ AirLine -------------------------------------------
|
" ------------------------------------ AirLine -------------------------------------------
|
||||||
let g:airline_theme='solarized'
|
let g:airline_theme='solarized'
|
||||||
|
let g:airline_solarized_bg='dark'
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
"let g:airline#extensions#tabline#left_sep = ' '
|
"let g:airline#extensions#tabline#left_sep = ' '
|
||||||
"let g:airline#extensions#tabline#left_alt_sep = '|'
|
"let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||||
|
@ -112,22 +116,23 @@ let g:NERDTreeDirArrowCollapsible = 'v'
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
|
||||||
" ------------------------------------ GitGutter -------------------------------------------
|
" ------------------------------------ GitGutter -------------------------------------------
|
||||||
"" GitGutter Setup
|
|
||||||
set updatetime=250
|
set updatetime=250
|
||||||
let g:gitgutter_enabled = 1
|
let g:gitgutter_enabled = 1
|
||||||
let g:gitgutter_signs = 1
|
let g:gitgutter_signs = 1
|
||||||
let g:gitgutter_highlight_lines = 0
|
let g:gitgutter_highlight_lines = 0
|
||||||
if executable('/usr/bin/git') == 0
|
if executable('/usr/bin/git') == 0
|
||||||
let g:gitgutter_git_executable = "/bin/true"
|
let g:gitgutter_git_executable = "/bin/true"
|
||||||
let g:gitgutter_enabled = 1
|
let g:gitgutter_enabled = 1
|
||||||
endif
|
endif
|
||||||
let g:gitgutter_max_signs = 500 " default value
|
let g:gitgutter_max_signs = 500 " default value
|
||||||
let g:gitgutter_realtime = 1
|
let g:gitgutter_realtime = 1
|
||||||
let g:gitgutter_eager = 1
|
let g:gitgutter_eager = 1
|
||||||
|
|
||||||
" ------------------------------------ Indent Line -------------------------------------------
|
" ------------------------------------ ALE -------------------------------------------
|
||||||
let g:indentLine_color_term = 0
|
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||||
"let g:indentLine_char_list = ['|', '¦', '┆', '┊']
|
let g:ale_sign_error = '✘'
|
||||||
|
let g:ale_sign_warning = '⚠'
|
||||||
|
let g:ale_lint_on_text_changed = 'never'
|
||||||
|
|
||||||
" ------------------------------------ Whitespace Highlighting -------------------------------------------
|
" ------------------------------------ Whitespace Highlighting -------------------------------------------
|
||||||
autocmd ColorScheme * highlight ExtraWhitespaces ctermbg=red guibg=red
|
autocmd ColorScheme * highlight ExtraWhitespaces ctermbg=red guibg=red
|
||||||
|
@ -137,56 +142,58 @@ highlight ExtraWhitespaces ctermbg=red guibg=red
|
||||||
"Show trailing whitespace only after some text (ignores blank lines)
|
"Show trailing whitespace only after some text (ignores blank lines)
|
||||||
"Show tabs that are not at the start of a line (and all spaces after too)
|
"Show tabs that are not at the start of a line (and all spaces after too)
|
||||||
function! <SID>MatchExtraWhitespacesNow()
|
function! <SID>MatchExtraWhitespacesNow()
|
||||||
if exists("b:sew")
|
if exists("b:sew")
|
||||||
if b:sew == 1
|
if b:sew == 1
|
||||||
match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+$\| *\zs\(\t\+ *\)\+\)/
|
match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+$\| *\zs\(\t\+ *\)\+\)/
|
||||||
else
|
else
|
||||||
if exists("b:sewb")
|
if exists("b:sewb")
|
||||||
if b:sewb == 1
|
if b:sewb == 1
|
||||||
match ExtraWhitespaces /\S\zs\s\+$/
|
match ExtraWhitespaces /\S\zs\s\+$/
|
||||||
else
|
else
|
||||||
:call clearmatches()
|
:call clearmatches()
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! <SID>MatchExtraWhitespacesNowInsert()
|
function! <SID>MatchExtraWhitespacesNowInsert()
|
||||||
if exists("b:sew")
|
if exists("b:sew")
|
||||||
if b:sew == 1
|
if b:sew == 1
|
||||||
match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+\%#\@<!$\| *\zs\(\t\+ *\)\+\)/
|
match ExtraWhitespaces /^\t* \+\zs\(\t\+ *\)\+\|\S\zs\(\s\+\%#\@<!$\| *\zs\(\t\+ *\)\+\)/
|
||||||
else
|
else
|
||||||
if exists("b:sewb")
|
if exists("b:sewb")
|
||||||
if b:sewb == 1
|
if b:sewb == 1
|
||||||
match ExtraWhitespaces /\S\zs\s\+\%#\@<!$/
|
match ExtraWhitespaces /\S\zs\s\+\%#\@<!$/
|
||||||
else
|
else
|
||||||
:call clearmatches()
|
:call clearmatches()
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"" Extra Whitespace Stripping
|
"" Extra Whitespace Stripping
|
||||||
function! <SID>StripExtraWhitespaces()
|
function! <SID>StripExtraWhitespaces()
|
||||||
if exists("b:sewb")
|
if exists("b:sewb")
|
||||||
if b:sewb == 1
|
if b:sewb == 1
|
||||||
let l = line(".")
|
let l = line(".")
|
||||||
let c = col(".")
|
let c = col(".")
|
||||||
"Remove trailing whitespace only after some text (ignores blank lines)
|
"Remove trailing whitespace only after some text (ignores blank lines)
|
||||||
%s/\S\zs\s\+$//ge
|
%s/\S\zs\s\+$//ge
|
||||||
if exists("b:sew")
|
if exists("b:sew")
|
||||||
if b:sew == 1
|
if b:sew == 1
|
||||||
"Remove tabs and spaces after the inital (tabs and) spaces
|
"Remove tabs and spaces after the inital (tabs and) spaces
|
||||||
%s/^\t* \+\zs\(\t\+ *\)\+//ge
|
%s/^\t* \+\zs\(\t\+ *\)\+//ge
|
||||||
"Replace tabs that are not at the start of a line
|
"Replace tabs that are not at the start of a line
|
||||||
"(and all spaces after too) with a single space to keep
|
"(and all spaces after too) with a single space to keep
|
||||||
"tokens apart
|
"tokens apart
|
||||||
%s/\S *\zs\(\t\+ *\)\+/ /ge
|
%s/\S *\zs\(\t\+ *\)\+/ /ge
|
||||||
endif
|
|
||||||
endif
|
|
||||||
call cursor(l, c)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
call cursor(l, c)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufWinEnter * :call <SID>MatchExtraWhitespacesNow()
|
autocmd BufWinEnter * :call <SID>MatchExtraWhitespacesNow()
|
||||||
autocmd InsertEnter * :call <SID>MatchExtraWhitespacesNowInsert()
|
autocmd InsertEnter * :call <SID>MatchExtraWhitespacesNowInsert()
|
||||||
|
@ -200,6 +207,7 @@ command Sewbnow let b:sewb=1 | let b:sew=0 | :call <SID>StripExtraWhitespaces()
|
||||||
command Sewnow let b:sewb=1 | let b:sew=1 | :call <SID>StripExtraWhitespaces() | :call <SID>MatchExtraWhitespacesNow()
|
command Sewnow let b:sewb=1 | let b:sew=1 | :call <SID>StripExtraWhitespaces() | :call <SID>MatchExtraWhitespacesNow()
|
||||||
command Nosewb let b:sewb=0 | let b:sew=0 | :call <SID>MatchExtraWhitespacesNow()
|
command Nosewb let b:sewb=0 | let b:sew=0 | :call <SID>MatchExtraWhitespacesNow()
|
||||||
command Nosew let b:sew=0 | :call <SID>MatchExtraWhitespacesNow()
|
command Nosew let b:sew=0 | :call <SID>MatchExtraWhitespacesNow()
|
||||||
|
|
||||||
""------------------------------------ Vimdiff Setup ----------------------------------------------------
|
""------------------------------------ Vimdiff Setup ----------------------------------------------------
|
||||||
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
||||||
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
||||||
|
@ -207,16 +215,19 @@ highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Re
|
||||||
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
|
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
|
||||||
"" Disable syntax highlighting in diff mode only
|
"" Disable syntax highlighting in diff mode only
|
||||||
if &diff
|
if &diff
|
||||||
syntax off
|
syntax off
|
||||||
endif
|
endif
|
||||||
" ------------------------------------ More Cool Stuff -------------------------------------------
|
" ------------------------------------ More Cool Stuff -------------------------------------------
|
||||||
"" UTF-8 Setup
|
"" UTF-8 Setup
|
||||||
if has("multi_byte")
|
if has("multi_byte")
|
||||||
if &termencoding == ""
|
if &termencoding == ""
|
||||||
let &termencoding = &encoding
|
let &termencoding = &encoding
|
||||||
endif
|
endif
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
setglobal fileencoding=utf-8
|
setglobal fileencoding=utf-8
|
||||||
"setglobal bomb
|
"setglobal bomb
|
||||||
set fileencodings=ucs-bom,utf-8,latin1
|
set fileencodings=ucs-bom,utf-8,latin1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
"------------- AutoCMD / Fixes
|
||||||
|
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
36
setup.sh
36
setup.sh
|
@ -1,23 +1,27 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -u
|
||||||
|
mkdir -p ~/.config/homedir-backup 2>/dev/null
|
||||||
|
|
||||||
LINK_FILES=(vimrc tmux.conf gitconfig dircolors)
|
function linkfiles {
|
||||||
mkdir -p ~/.config/home-git-back/config 2>/dev/null
|
for file in $@; do
|
||||||
for file in ${LINK_FILES[@]}; do
|
name=$(basename $file)
|
||||||
if [ ! -L ~/.${file} ] ; then
|
dir=$(dirname $file)
|
||||||
mv -v ~/.${file} ~/.config/home-git-back
|
if [ "$dir" == "dotfiles" ] ; then
|
||||||
ln -s $(pwd)/${file} ~/.${file}
|
targetdir=""
|
||||||
fi
|
else
|
||||||
done
|
targetdir="$dir/"
|
||||||
|
fi
|
||||||
|
|
||||||
# Link .config dirs
|
if [ ! -L ~/.${targetdir}${name} ] ; then
|
||||||
for file in config/*; do
|
mv -v ~/.${targetdir}${name} ~/.config/homedir-backup
|
||||||
dir=$(basename $file)
|
ln -s $(pwd)/$dir/${name} ~/.${targetdir}${name}
|
||||||
if [ ! -L ~/.config/${dir} ] ; then
|
fi
|
||||||
mv -v ~/.config/${dir} ~/.config/home-git-back/config
|
done
|
||||||
ln -s $(pwd)/${file} ~/.config/${dir}
|
}
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
linkfiles 'dotfiles/*'
|
||||||
|
linkfiles 'config/*'
|
||||||
|
exit
|
||||||
# Install powerline if possible
|
# Install powerline if possible
|
||||||
if which pip3 ; then
|
if which pip3 ; then
|
||||||
pip3 install --user -U -r requirements.txt
|
pip3 install --user -U -r requirements.txt
|
||||||
|
|
Loading…
Reference in a new issue