diff --git a/.gitmodules b/.gitmodules index 05c3a10..6864822 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,6 @@ [submodule "tmux/plugins/tmux-fzf"] path = tmux/plugins/tmux-fzf url = https://git::@github.com/sainnhe/tmux-fzf +[submodule "tmux/plugins/tmux-open"] + path = tmux/plugins/tmux-open + url = https://git::@github.com/tmux-plugins/tmux-open diff --git a/dotfiles_private b/dotfiles_private index a274885..d56be89 160000 --- a/dotfiles_private +++ b/dotfiles_private @@ -1 +1 @@ -Subproject commit a27488549dedf528406d4b41c35bf0708b0aa242 +Subproject commit d56be89504ad11d3ac3d3da26196b3f2ff2b8ed2 diff --git a/nvim b/nvim new file mode 120000 index 0000000..2cb2c29 --- /dev/null +++ b/nvim @@ -0,0 +1 @@ +/home/adrien/.config/nvim \ No newline at end of file diff --git a/sublime/Package Control.sublime-settings b/sublime/Package Control.sublime-settings index 3a5d843..b558fd6 100644 --- a/sublime/Package Control.sublime-settings +++ b/sublime/Package Control.sublime-settings @@ -9,7 +9,6 @@ "ayu", "Compare Side-By-Side", "Dartlight", - "Diffy", "DocBlockr_Python", "Dockerfile Syntax Highlighting", "ExportHtml", @@ -38,6 +37,7 @@ "SwitchDictionary", "Terraform", "WordingStatus", + "Diffable", ], "submit_usage": false, } diff --git a/sublime/Preferences.sublime-settings b/sublime/Preferences.sublime-settings index 1c7562f..f5dc7d4 100644 --- a/sublime/Preferences.sublime-settings +++ b/sublime/Preferences.sublime-settings @@ -158,4 +158,5 @@ "predawn_sidebar_small": true, "predawn_tabs_small": true, "theme": "predawn-DEV.sublime-theme", + "index_files": true, } diff --git a/tmux.conf b/tmux.conf index 9c432b6..832c24b 100644 --- a/tmux.conf +++ b/tmux.conf @@ -11,23 +11,17 @@ # Prefix + U => Update packages set -g @plugin 'tmux-plugins/tpm' -# Tmux OneDark: http://github.com/odedlaz/tmux-onedark-themetheme -#set -g @plugin 'odedlaz/tmux-onedark-theme' -# Tmux-Themepack (feat Powerline) -set -g @plugin 'jimeh/tmux-themepack' -set -g @themepack 'powerline/default/blues' - # Save and restore Tmux sessions # Prefix + Ctrl-s => Save current session # Prefix + Ctrl-r => Restore -set -g @plugin 'tmux-plugins/tmux-resurrect' +#set -g @plugin 'tmux-plugins/tmux-resurrect' # Continuous saving tmux environment (depends on Ressurect) # Also auto-starts tmux on boot and auto-restores last session -set -g @plugin 'tmux-plugins/tmux-continuum' +#set -g @plugin 'tmux-plugins/tmux-continuum' #set -g status-right 'Continuum status: #{continuum_status}' -set -g @continuum-restore 'on' # Auto restore previous session -set -g @continuum-save-interval '15' # save time in minutes +#set -g @continuum-restore 'on' # Auto restore previous session +#set -g @continuum-save-interval '15' # save time in minutes # Copy to system clipboard # Normal mode: @@ -35,25 +29,55 @@ set -g @continuum-save-interval '15' # save time in minutes # Copy mode: # y => copy selection to clipboard # Y => Put (copy a selection then paste it to cmd) -set -g @plugin 'tmux-plugins/tmux-yank' +#set -g @plugin 'tmux-plugins/tmux-yank' # Manage sessions, windows etc. with fzf -set -g @plugin 'sainnhe/tmux-fzf' +#set -g @plugin 'sainnhe/tmux-fzf' +# Opens stuff +#set -g @plugin 'tmux-plugins/tmux-open' +#set -g @open-S 'https://www.startpage.com/do/search?cat=web&cmd=process_search&language=english&engine0=v1all&abp=1&query=' +#set -g @open 'C-f' +#set -g @open-editor 'C-e' ########### # Theming # ########### +# Set current dir name as tab (window) name +# * Shows pwd #{b:pane_current_path} +# * Shows full path #{pane_current_path} +# path="#(if [[ $HOME == #{pane_current_path} ]]; then echo \"~\" ; else echo #{b:pane_current_path}; fi)" +# set -g status-interval 1 +# set-window-option -g window-status-separator "" +# set-window-option -g window-status-current-format " #{b:pane_current_path} " +#set-window-option -g window-status-format " #{b:pane_current_path} " + + +# Tmux OneDark: http://github.com/odedlaz/tmux-onedark-themetheme +#set -g @plugin 'odedlaz/tmux-onedark-theme' +# Tmux-Themepack (feat Powerline) +set -g @plugin 'jimeh/tmux-themepack' +set -g @themepack 'powerline/default/blues' + # Make tmux display true colors -set -g default-terminal "screen-256color" -#set -g default-terminal "xterm-256color" +#set -g default-terminal "screen-256color" +set -g default-terminal "xterm-256color" +# Creates a visual glitch with e.g. colored comments, don't use. #set -ga terminal-overrides ",*256col*:Tc" +#set-option -g allow-rename off + ######## # Misc # ######## +set -g mouse on + +# Home/End keys handled in [n]vim maybe? +bind-key -n Home send Escape "OH" +bind-key -n End send Escape "OF" + # Set the display duration of message (in ms) set-option -g display-time 4000 @@ -79,6 +103,7 @@ bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' + #tmux_version='$(tmux -V | sed -En "s/^tmux ([1-9]+(.[0-9]+)?).*/\1/p")' #if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ # "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" @@ -152,12 +177,5 @@ bind j select-pane -D bind ^H previous-window bind ^L next-window -# OTHER OPTIONS - -set -g mouse on - -# don't rename windows automatically -set-option -g allow-rename off - # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' diff --git a/tmux/plugins/tmux-open b/tmux/plugins/tmux-open new file mode 160000 index 0000000..763d0a8 --- /dev/null +++ b/tmux/plugins/tmux-open @@ -0,0 +1 @@ +Subproject commit 763d0a852e6703ce0f5090a508330012a7e6788e diff --git a/vimrc b/vimrc index f408679..f044c24 100644 --- a/vimrc +++ b/vimrc @@ -62,8 +62,9 @@ set scrolloff=12 """""""""""""""""""" " auto-reload tmux conf when updated -autocmd bufwritepost ~/dotfiles/.tmux.conf execute ':!tmux source-file %' - +if has("autocmd") + autocmd bufwritepost ~/dotfiles/.tmux.conf execute ':!tmux source-file %' +endif """"""""""" " Theming " """"""""""" @@ -78,6 +79,12 @@ let g:airline_powerline_fonts=1 " Make airline use powerline fonts (pretty arrow " Misc " """""""" +" Autoreload vimrc +if has("autocmd") + autocmd! bufwritepost .vimrc source ~/.vimrc + autocmd! bufwritepost vimrc source ~/.vimrc +endif + " Allow saving of files as sudo when I forgot to start vim using sudo. cmap w!! w !sudo tee > /dev/null % @@ -98,6 +105,9 @@ augroup numbertoggle autocmd! autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber augroup END +" jk to +inoremap jk + " Yank vim text to system & selection clipboard with Ctrl+C " Paste with Ctrl+V " Requires `gvim` that is the following flags to your `vim --version` @@ -108,6 +118,9 @@ augroup END vnoremap "*y :let @+=@* map "+P +" Toggle search high-lighting +nnoremap :set hlsearch! + " You wanna suffer? Disable arrow keys " noremap " noremap diff --git a/zshrc b/zshrc index c72789a..40f0df9 100644 --- a/zshrc +++ b/zshrc @@ -58,6 +58,9 @@ alias o="xdg-open > /dev/null 2>&1" alias awsdf="aws --endpoint-url https://garage.deuxfleurs.fr" alias sshfs="sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3" alias sshfs_rasp="sshfs coloc@warez.luxeylab.net:/hdd/shared/ /media/adrien/rasp" +alias ctrlc="xclip -selection clipboard" +alias icat="kitty icat" + # You may need to manually set your language environment export LANG=fr_FR.UTF-8