Skip to content

Commit

Permalink
add tmux fingers url matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
3ximus committed Jun 28, 2023
1 parent 08612ac commit cbda685
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ alias tmux-attach-session='tmux list-sessions; read -r -p "Attach to > " REPLY;
alias tmux-kill-session='tmux list-sessions; read -r -p "Kill session > " REPLY; tmux kill-session -t $REPLY'

# i keep forgetting this...
alias man-pipes='echo "Generic form #>/dev/null (# is 1 by default) or #>&# to send one fd to another"; echo " 2>&- ----> #>&- (close fd)"; echo " |& ----> 2>&1 |"; echo " &>/dev/null ----> 1>/dev/null 2>&1"'
alias man-pipes='echo "Generic form #>/dev/null (# is 1 by default) or #>&# to send one fd to another"; echo " 2>&- ----> #>&- (close fd)"; echo " |& ----> 2>&1 |"; echo " >&/dev/null ----> 1>/dev/null 2>&1"'

# wget to download directory, use -P to specify output directory
# -k option might give memory issues when continuing (-c) the download of large files but without it wget wont check for partially downlaoded files and will assume they are downloaded if they exist
Expand Down
4 changes: 3 additions & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,11 @@ set -g @batt_color_charge_primary_tier1 'red,bold'

set -g @fingers-key C-f
set -g @fingers-hint-format "#[fg=red,bold]%s"
set -g @fingers-highlight-format "#[fg=yellow,dim]%s"
set -g @fingers-highlight-format "#[fg=cyan]%s"
set -g @fingers-pattern-1 '["].*["]' # match quoted text, useful when files path are quoted
set -g @fingers-pattern-2 "['][^']+[']" # match quoted text, useful when files path are quoted
# generic URL matcher
set -g @fingers-pattern-3 "([a-z][a-z0-9+\-.]*)://(([a-z0-9._~%!\$&()*+,;=\-]+)?:?([a-z0-9._~%!\$&()*+,;=\-]+)?@)?([a-z0-9._~%\-]+|\[[a-f0-9:.]+\]|\[v[a-f0-9][a-z0-9._~%!\$&()*+,;=:\-]+\])(:[0-9]+)?(/[a-z0-9._~%!\$&()*+,;=:@\-]+)*/?"

set -g @easy-motion-prefix "Space"

Expand Down
12 changes: 11 additions & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ Plug 'AndrewRadev/linediff.vim'
Plug 'Xuyuanp/nerdtree-git-plugin', {'on':['NERDTreeToggle', 'NERDTreeFind']}
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'

Plug 'godlygeek/tabular', { 'on': ['Tabularize'] }

Expand All @@ -124,6 +123,8 @@ if exists('$TMUX')
Plug 'preservim/vimux'
endif

Plug 'CoderCookE/vim-chatgpt', {'on': ['<Plug>(chatgpt-menu)', 'Ask', 'Review', 'Rewrite', 'Explain', 'Fix', 'Test']}

" EXTRA SYNTAX HIGHLIGHT
let g:polyglot_disabled = ["sensible"]
Plug 'sheerun/vim-polyglot'
Expand All @@ -134,6 +135,7 @@ Plug 'mattn/emmet-vim'
" DATABASE
Plug 'tpope/vim-dadbod'
Plug 'kristijanhusak/vim-dadbod-ui'
Plug 'jidn/vim-dbml'

" OTHER
Plug 'mhinz/vim-startify'
Expand Down Expand Up @@ -449,6 +451,11 @@ let g:startify_lists = [
\ { 'type': function('s:gitUntracked'), 'header': [' Git untracked']},
\ ]

" chatgpt
if glob("~/.config/openai.apikey")!=#""
let g:chat_gpt_key=join(readfile(expand("~/.config/openai.apikey")),'')
" let g:chat_gpt_model='gpt-4'
endif

"NERDTree
let g:NERDTreeDirArrowExpandable = ''
Expand Down Expand Up @@ -659,6 +666,9 @@ if isdirectory(expand("~/.vim/plugged/tabular"))
nmap <leader>a<Bar> :Tabularize /<Bar><CR>
vmap <leader>a<Bar> :Tabularize /<Bar><CR>
endif

"Chat GPT
vmap <silent> <leader>0 <Plug>(chatgpt-menu)
" }}}

" AIRLINE CONFIGURATION {{{
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# My Dotfiles

## Showcase

## Vim

To install all the vim plugins open vim and run `:PluginInstall`
Expand All @@ -14,10 +12,6 @@ Check the `.vimrc` on the `VIM PLUG PLUGINS` section for the list of plugins

![7](screenshots/vim.png)

## Tmux

To install the tmux plugins press `<prefix>+I` (it will freeze for a few seconds...)

## Prompts

### Current prompt:
Expand All @@ -40,6 +34,10 @@ z,s
- show the respective tty. **except 6, 7**
- display virtual machine environment indicator **only prompt 7**

## Tmux

To install the tmux plugins press `<prefix>+I` (it will freeze for a few seconds...)

![8](screenshots/tmux.png)

Tmux has a lot of custom configurations added in `.tmux.conf` and a few plugins inside `.tmux` added as submodules that are managed through [TPM (Tmux Plugin Manager)](https://github.com/tmux-plugins/tpm)
Expand Down

0 comments on commit cbda685

Please sign in to comment.