From 0a20b92daf0d0295b1fb276b23a2796e35630501 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Tue, 3 May 2016 15:54:06 +0200 Subject: [PATCH] Add .inputrc .tmux.conf and .screenrc --- .gitconfig | 13 ++----- .inputrc | 63 +++++++++++++++++++++++++++++++++ .screenrc | 8 +++++ .tmux.conf | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++ .vimrc | 1 + README.md | 1 + 6 files changed, 175 insertions(+), 11 deletions(-) create mode 100644 .inputrc create mode 100644 .screenrc create mode 100644 .tmux.conf diff --git a/.gitconfig b/.gitconfig index ff5b146..1a819dc 100644 --- a/.gitconfig +++ b/.gitconfig @@ -60,7 +60,7 @@ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" # Remove branches that have already been merged with master - # a.k.a. ‘delete merged’ + # a.k.a. ?delete merged? dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" # List contributors with number of commits @@ -75,19 +75,10 @@ # Detect whitespace errors when applying a patch whitespace = fix -[init] - templatedir = ~/.git_template - -[repo] - reference = ~/gitcache - [core] - # Use custom `.gitignore` and `.gitattributes` + # Use custom `.gitignore` excludesfile = ~/.gitignore_global - # excludesfile = /proj/imt2000/ProSim/GIT/prosim_tools/.gitignore_global - attributesfile = ~/.gitattributes - # Treat spaces before tabs and all kinds of trailing whitespace as an error # [default] trailing-space: looks for spaces at the end of a line # [default] space-before-tab: looks for spaces before tabs at the beginning of a line diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..df0e02e --- /dev/null +++ b/.inputrc @@ -0,0 +1,63 @@ +# Use vi keybindings for everything that uses readline. +set editing-mode vi +set show-mode-in-prompt on + +# Adds punctuation as word delimiters +set bind-tty-special-chars off + +# Completion Options +set completion-ignore-case on +set show-all-if-ambiguous on +set show-all-if-unmodified on +"\es": menu-complete +set mark-symlinked-directories on +set match-hidden-files off +set page-completions on +set completion-query-items 200 +set visible-stats on +set skip-completed-text on + +$if mode=vi + set keymap vi-command + "gg": beginning-of-history + "G": end-of-history + "k": history-search-backward + "j": history-search-forward +# "\e[C": forward-char +# "\e[D": backward-char + + set keymap vi-insert + "\C-l": clear-screen + "\C-w": backward-kill-word + # auto-complete from the history + "\C-p": history-search-backward + "\C-n": history-search-forward +# "\e[C": forward-char +# "\e[D": backward-char +$endif + +$if Bash + # do history expansion when space entered + Space: magic-space +$endif + +$if Python +$endif + +$if Gdb + "\e[15~": "continue\n" + "\e[21~": "next\n" + "\e[23~": "step\n" + "\eOQ": "nexti\n" + "\eOR": "stepi\n" +$endif + +# Useful stuff for UTF-8 +set meta-flag on +set input-meta on +set output-meta on +set convert-meta off + +# Include system wide settings which is ignored +# by default if one has own .inputrc +# $include /etc/inputrc \ No newline at end of file diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..a4a33ba --- /dev/null +++ b/.screenrc @@ -0,0 +1,8 @@ +# Disable the startup message +startup_message off + +# Set a large scrollback buffer +defscrollback 32000 + +# Always start `screen` with UTF-8 enabled (`screen -U`) +defutf8 on diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..c4e2c39 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,100 @@ +# Setting the prefix from C-b to C-a +set -g prefix C-a +# Free the original Ctrl-b prefix keybinding +unbind C-b +#setting the delay between prefix and command +set -sg escape-time 1 +# Ensure that we can send Ctrl-A to other apps +bind C-a send-prefix +# Set the base index for windows to 1 instead of 0 +set -g base-index 1 +# Set the base index for panes to 1 instead of 0 +setw -g pane-base-index 1 + +# Set the default terminal mode to 256color mode +set -g default-terminal "screen-256color" +# enable activity alerts +setw -g monitor-activity on +set -g visual-activity on +# set the status line's colors +set -g status-fg white +set -g status-bg black +# set the color of the window list +setw -g window-status-fg cyan +setw -g window-status-bg default +setw -g window-status-attr dim +# set colors for the active window +setw -g window-status-current-fg white +setw -g window-status-current-bg red +setw -g window-status-current-attr bright +# pane colors +set -g pane-border-fg green +set -g pane-border-bg black +set -g pane-active-border-fg white +set -g pane-active-border-bg yellow +# Command / message line +set -g message-fg white +set -g message-bg black +set -g message-attr bright +# Status line left side +set -g status-left-length 40 +set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P" +set -g status-utf8 on +# Status line right side +# 15% | 28 Nov 18:15 +set -g status-right "#(~/battery Discharging) | #[fg=cyan]%d %b %R" +# Update the status bar every sixty seconds +set -g status-interval 60 +# Center the window list +set -g status-justify centre +set -g detach-on-destroy off +# Increase history-limit for scrolling (default is 2000) +set-option -g history-limit 15000 +# mouse support - set to on if you want to use the mouse +setw -g mode-mouse on +set -g mouse-select-pane on +set -g mouse-resize-pane on +set -g mouse-select-window on +set -g mouse-utf8 on +# enable vi keys. +setw -g mode-keys vi +# Reload the file with Prefix r +bind r source-file ~/.tmux.conf \; display "Reloaded!" +# splitting panes +bind c neww -c "#{pane_current_path}" +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" +# moving between panes +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R +# Quick pane selection +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ +# Pane resizing +bind -r H resize-pane -L 5 +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r L resize-pane -R 5 +# Open panes in the same directory using the tmux-panes script +unbind v +unbind n +bind v send-keys " ~/tmux-panes -h" C-m +bind n send-keys " ~/tmux-panes -v" C-m +# Maximize and restore a pane +unbind Up +bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp +unbind Down +bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp +# Log output to a text file on demand +bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log" +# better binding for copy mode +bind v copy-mode +# Select/yank like vim +bind -t vi-copy 'v' begin-selection +bind -t vi-copy 'y' copy-selection +# open tree instead of session list +bind s run 'tmuxer choose-session' +bind-key -t vi-choice h tree-collapse +bind-key -t vi-choice l tree-expand \ No newline at end of file diff --git a/.vimrc b/.vimrc index 7de0b3b..75281cd 100644 --- a/.vimrc +++ b/.vimrc @@ -14,6 +14,7 @@ Plugin 'altercation/vim-colors-solarized.git' Plugin 'plasticboy/vim-markdown' Plugin 'mileszs/ack.vim' Plugin 'brandonbloom/csearch.vim' +Plugin 'chazy/cscope_maps' call vundle#end() " required filetype plugin indent on " required diff --git a/README.md b/README.md index 5b42f27..474b5f8 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,4 @@ What you need to do on the new box is this: $ git fetch origin master $ git reset --hard origin/master $ git branch -u origin/master + $ git submodule update -- 2.43.0