From cc83934f398eb2f465f47f5251f327893a81e778 Mon Sep 17 00:00:00 2001 From: Keegan Date: Tue, 23 Aug 2022 18:34:34 -0400 Subject: [PATCH] added vim packages as well as fzf support --- .gitmodules | 18 ++++++++ bin/startup/tmux_start.sh | 20 +++------ fzf | 1 + install.conf.yaml | 19 ++++++-- vim/pack/man/start/vim-airline | 1 + vim/pack/man/start/vim-commentary | 1 + vim/pack/man/start/vim-fugitive | 1 + vim/pack/man/start/vim-fugitive.git | 1 + vim/pack/man/start/vim-fzf | 1 + vim/pack/man/start/vim-surround | 1 + vimrc | 67 ++++++++++++++++++++++++++--- zshrc | 5 +++ 12 files changed, 114 insertions(+), 22 deletions(-) create mode 160000 fzf create mode 160000 vim/pack/man/start/vim-airline create mode 160000 vim/pack/man/start/vim-commentary create mode 160000 vim/pack/man/start/vim-fugitive create mode 160000 vim/pack/man/start/vim-fugitive.git create mode 160000 vim/pack/man/start/vim-fzf create mode 160000 vim/pack/man/start/vim-surround diff --git a/.gitmodules b/.gitmodules index c93c8d5..2963e50 100644 --- a/.gitmodules +++ b/.gitmodules @@ -32,3 +32,21 @@ [submodule ".priv"] path = .priv url = git@github.com:KeeganForelight/private_info.git +[submodule "vim/pack/man/start/vim-fugitive.git"] + path = vim/pack/man/start/vim-fugitive.git + url = https://github.com/tpope/vim-fugitive.git +[submodule "vim/pack/man/start/vim-commentary"] + path = vim/pack/man/start/vim-commentary + url = https://github.com/tpope/vim-commentary.git +[submodule "vim/pack/man/start/vim-surround"] + path = vim/pack/man/start/vim-surround + url = https://github.com/tpope/vim-surround.git +[submodule "fzf"] + path = fzf + url = https://github.com/junegunn/fzf.git +[submodule "vim/pack/man/start/vim-fzf"] + path = vim/pack/man/start/vim-fzf + url = https://github.com/junegunn/fzf.vim.git +[submodule "vim/pack/man/start/vim-airline"] + path = vim/pack/man/start/vim-airline + url = https://github.com/vim-airline/vim-airline.git diff --git a/bin/startup/tmux_start.sh b/bin/startup/tmux_start.sh index bb1f47d..08b97a8 100755 --- a/bin/startup/tmux_start.sh +++ b/bin/startup/tmux_start.sh @@ -1,15 +1,5 @@ #!/usr/bin/env bash -print_output=false - -while getopts "s" arg; do - case $arg in - s) - print_output=true - ;; - esac -done - SESSION="doormat" # welcom session name START_SERVER=false @@ -37,6 +27,10 @@ set_session() { set_session -if $print_output ; then - echo "SESSION=$SESSION" -fi +while getopts "s" arg; do + case $arg in + s) + echo "SESSION=$SESSION" + ;; + esac +done diff --git a/fzf b/fzf new file mode 160000 index 0000000..9d041aa --- /dev/null +++ b/fzf @@ -0,0 +1 @@ +Subproject commit 9d041aa58246fbcaf15ae60224ec8121b86f51cd diff --git a/install.conf.yaml b/install.conf.yaml index eff3a81..7adf1f8 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -8,7 +8,7 @@ - shell: - [git submodule update --init --recursive --force, Installing submodules] - - [$HOME/.dotfiles/bin/fonts_install.sh, Install Hack font] + - [bin/font_install.sh, Installing Hack font] - link: ~/.vim: @@ -17,6 +17,7 @@ force: true ~/.tmux: ~/.tmux.conf: tmux.conf + ~/.fzf: ~/.ranger.py: ranger/ranger.py ~/.config/ranger/rc.conf: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions: @@ -25,8 +26,20 @@ ~/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme: oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme - shell: - - [$HOME/.dotfiles/bin/weather/symbol_test.sh, Testing weather symbols] - [cp ./vim/hybrid/colors/hybrid.vim ./vim/colors/hybrid.vim, Setting up theme] - [tmux/plugins/tpm/bin/install_plugins, Installing Tmux Plugins] - [tmux/plugins/tpm/bin/update_plugins all, Updating Tmux Plugins] - - [bin/tmux_mem_cpu_build.sh, Building tmux-mem-cpu-load] + - + command: fzf/install + stdin: true + stdout: true + description: Installing Fzf + - + command: bin/tmux_mem_cpu_load.sh + stdin: true + stdout: true + description: Building the mem-cpu-load tracker for tmux + - + command: bin/weather/symbol_test.sh + stdout: true + description: Testing weather symbols in Stdout diff --git a/vim/pack/man/start/vim-airline b/vim/pack/man/start/vim-airline new file mode 160000 index 0000000..9d20473 --- /dev/null +++ b/vim/pack/man/start/vim-airline @@ -0,0 +1 @@ +Subproject commit 9d20473e912ab39008a25b1902e5f35189e67aad diff --git a/vim/pack/man/start/vim-commentary b/vim/pack/man/start/vim-commentary new file mode 160000 index 0000000..3654775 --- /dev/null +++ b/vim/pack/man/start/vim-commentary @@ -0,0 +1 @@ +Subproject commit 3654775824337f466109f00eaf6759760f65be34 diff --git a/vim/pack/man/start/vim-fugitive b/vim/pack/man/start/vim-fugitive new file mode 160000 index 0000000..b411b75 --- /dev/null +++ b/vim/pack/man/start/vim-fugitive @@ -0,0 +1 @@ +Subproject commit b411b753f805b969cca856e2ae51fdbab49880df diff --git a/vim/pack/man/start/vim-fugitive.git b/vim/pack/man/start/vim-fugitive.git new file mode 160000 index 0000000..b411b75 --- /dev/null +++ b/vim/pack/man/start/vim-fugitive.git @@ -0,0 +1 @@ +Subproject commit b411b753f805b969cca856e2ae51fdbab49880df diff --git a/vim/pack/man/start/vim-fzf b/vim/pack/man/start/vim-fzf new file mode 160000 index 0000000..c491d70 --- /dev/null +++ b/vim/pack/man/start/vim-fzf @@ -0,0 +1 @@ +Subproject commit c491d702b76c6b4918abb80be3cfb57d1b618ffa diff --git a/vim/pack/man/start/vim-surround b/vim/pack/man/start/vim-surround new file mode 160000 index 0000000..bf3480d --- /dev/null +++ b/vim/pack/man/start/vim-surround @@ -0,0 +1 @@ +Subproject commit bf3480dc9ae7bea34c78fbba4c65b4548b5b1fea diff --git a/vimrc b/vimrc index 44b9826..d05d131 100644 --- a/vimrc +++ b/vimrc @@ -1,8 +1,11 @@ filetype plugin indent on " show existing tab with 4 spaces width -set tabstop=4 -set shiftwidth=4 -set expandtab +" editing to be more usual +" set tabstop=4 +" set shiftwidth=4 +" set expandtab +" set backspace=indent,eol,start +set ts=4 sts=4 sw=2 expandtab set backspace=indent,eol,start " basics @@ -21,6 +24,16 @@ let g:go_highlight_function_calls=1 let g:go_highlight_operators=1 let g:go_highlight_extra_types=1 +" airline settings +let g:airline_powerline_fonts = 1 +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif +" setting nf symbols +let g:airline_symbols.linenr = '' +let g:airline_symbols.maxlinenr = '' +let g:airline_symbols.dirty = '' + " nerdtree settings let NERDTreeHighlightCursorLine=1 let NERDTreeQuitOnOpen=1 @@ -28,10 +41,52 @@ autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " nerdtree binds -nnoremap :NERDTree -nnoremap :NERDTreeToggle -nnoremap :NERDTreeFocus +nnoremap :NERDTree +nnoremap :NERDTreeToggle +" nnoremap :NERDTreeFocus going to conflict with fzf and I dont use +" this anyway + +" fzf integration +set rtp+=~/.fzf + +let g:fzf_preview_window = ['right:50%', 'ctrl-/'] +let g:fzf_buffers_jump = 1 + " Customize fzf colors to match your color scheme + " " - fzf#wrap translates this to a set of `--color` options + let g:fzf_colors = + \ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Comment'], + \ 'fg+': ['fg', 'MarchParen', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'MatchParen', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Constant'], + \ 'info': ['fg', 'PreProc'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Conditional'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'gutter' : ['bg', 'Normal'], + \ 'header': ['fg', 'Comment']} + +" open in floating tmux pane if available +if exists('$TMUX') + let g:fzf_layout = { 'tmux': '-p60%,70%' } +else + let g:fzf_layout = { 'window': { 'width': 0.6, 'height': 0.7} } +endif +" fzf functions and keybinds +command! -bang -nargs=? -complete=dir Find + \ call fzf#vim#files(, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline']}), 0) + +nnoremap ff :Find +nnoremap fh :Find $HOME +nnoremap fg :GFiles +nnoremap fs :GFiles? +" tweaking timeout to quit instatnly via esc +set ttimeout +set ttimeoutlen=0 " time to learn vim noremap :echoerr "Umm, use k instead" noremap :echoerr "Umm,use j instead" diff --git a/zshrc b/zshrc index c540bcb..9f3ed17 100644 --- a/zshrc +++ b/zshrc @@ -151,3 +151,8 @@ alias water="$HOME/.dotfiles/bin/water/water.sh" # setting up location variables # source "$HOME/.dotfiles/bin/weather/location.sh" source "$HOME/.dotfiles/bin/startup/tmux_start.sh" + +# fzf stuff +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +export FZF_DEFAULT_OPTS='--layout=reverse --border --height=40%' +alias bat="batcat"