From 1a47a9f316258d4c208cd5c1cf8d6e37a1e666c9 Mon Sep 17 00:00:00 2001 From: Fabian Ising Date: Sun, 29 Jul 2018 16:26:51 +0200 Subject: [PATCH] Add neovim --- nvim | 1 + tmux/.mac_config | 4 ++++ tmux/.tmux.conf | 16 ++++++++++++---- tmux/.tmux_config_powerline_mac.example | 1 + tmux/mac_tmux_wrapper.sh | 11 +++++++++++ tmux/plugins/tpm | 2 +- tmux/sidebar/directory_widths.txt | 1 + zsh/.zshrc | 15 ++++++++++++--- 8 files changed, 43 insertions(+), 8 deletions(-) create mode 120000 nvim create mode 100644 tmux/.mac_config create mode 100644 tmux/.tmux_config_powerline_mac.example create mode 100755 tmux/mac_tmux_wrapper.sh create mode 100644 tmux/sidebar/directory_widths.txt diff --git a/nvim b/nvim new file mode 120000 index 0000000..c6c4038 --- /dev/null +++ b/nvim @@ -0,0 +1 @@ +/Users/fabian/.config/nvim \ No newline at end of file diff --git a/tmux/.mac_config b/tmux/.mac_config new file mode 100644 index 0000000..8a62422 --- /dev/null +++ b/tmux/.mac_config @@ -0,0 +1,4 @@ +set-option -g default-shell /bin/zsh +bind -Tcopy-mode-vi y send -X copy-pipe "pbcopy" \; display-message "copied to system clipboard" +bind C-p run "tmux set-buffer \"$pbpaste\"; tmux paste-buffer" +bind C-y run "tmux save-buffer - | pbcopy" diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 241b989..4b33d56 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -54,18 +54,25 @@ bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" # move x clipboard into tmux paste buffer bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" # move tmux copy buffer into x clipboard -bind C-y run "tmux save-buffer - | xclip -i" set-option -s set-clipboard off +if '[ `uname` == Darwin ]' \ + 'source-file ~/.tmux/.mac_config' source-file ~/.tmux/.tmux_config_powerline + +# Escape timeout for nvim +set -sg escape-time 10 + + # List of plugins set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' +#set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-yank' -# set -g @open-editor 'C-b' +set -g @plugin 'jimeh/tmux-themepack' +set -g @themepack 'powerline/double/red' # Other examples: # set -g @plugin 'github_username/plugin_name' @@ -73,4 +80,5 @@ set -g @plugin 'tmux-plugins/tmux-yank' # set -g @plugin 'git@bitbucket.com/user/plugin' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.tmux/plugins/tpm/tpm' +run "echo 'New run' > /tmp/tpm_out" +run '~/.tmux/plugins/tpm/tpm >> /tmp/tpm_out 2>&1 >> /tmp/tpm_out' diff --git a/tmux/.tmux_config_powerline_mac.example b/tmux/.tmux_config_powerline_mac.example new file mode 100644 index 0000000..b2f7029 --- /dev/null +++ b/tmux/.tmux_config_powerline_mac.example @@ -0,0 +1 @@ +source '/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf' diff --git a/tmux/mac_tmux_wrapper.sh b/tmux/mac_tmux_wrapper.sh new file mode 100755 index 0000000..d63f04f --- /dev/null +++ b/tmux/mac_tmux_wrapper.sh @@ -0,0 +1,11 @@ +#! /bin/sh +# +# test.sh +# Copyright (C) 2018 fabian +# +# Distributed under terms of the MIT license. +# + + +export PATH=$PATH:/usr/local/bin +tmux diff --git a/tmux/plugins/tpm b/tmux/plugins/tpm index 51ff07a..95f7833 160000 --- a/tmux/plugins/tpm +++ b/tmux/plugins/tpm @@ -1 +1 @@ -Subproject commit 51ff07a729b4b67f692936ad75cb0650149afbb4 +Subproject commit 95f78336c3972f3e6648b7b3db754f2224320a5e diff --git a/tmux/sidebar/directory_widths.txt b/tmux/sidebar/directory_widths.txt new file mode 100644 index 0000000..ac720ab --- /dev/null +++ b/tmux/sidebar/directory_widths.txt @@ -0,0 +1 @@ +/Users/fabian/Masterarbeit/thesis 40 diff --git a/zsh/.zshrc b/zsh/.zshrc index b471a30..9e70254 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,7 +1,13 @@ +# Set path to work with pycharm ... +[[ "$PATH" =~ /usr/local/bin ]] || export PATH=$PATH:/usr/local/bin + [[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config [[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config [[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh [[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh +[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config + +POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k # Load Antigen source ~/.zsh/antigen/antigen.zsh @@ -14,8 +20,7 @@ antigen use oh-my-zsh # # Antigen Theme # - -antigen theme agnoster +antigen theme bhilburn/powerlevel9k powerlevel9k # # Antigen Bundles @@ -28,6 +33,7 @@ antigen bundle go # antigen bundle tmuxinator antigen bundle zsh-users/zsh-syntax-highlighting +antigen bundle zsh-users/zsh-autosuggestions # For SSH, starting ssh-agent is annoying antigen bundle ssh-agent @@ -37,5 +43,8 @@ antigen bundle pip antigen bundle python antigen bundle virtualenv +antigen bundle virtualenv + antigen apply -export EDITOR='vim' +alias vim=nvim +export EDITOR='nvim'