Add tmux configuration, beef up vimrc, add vimwiki

This commit is contained in:
Bill Niblock 2015-10-27 17:37:22 -04:00
parent 971e5ad544
commit f7175c1c47
5 changed files with 97 additions and 14 deletions

3
.gitmodules vendored
View file

@ -19,3 +19,6 @@
[submodule "vim/vim/bundle/vim-template"]
path = vim/vim/bundle/vim-template
url = https://github.com/ap/vim-templates.git
[submodule "vim/vim/bundle/vimwiki"]
path = vim/vim/bundle/vimwiki
url = https://github.com/vimwiki/vimwiki

View file

@ -4,12 +4,13 @@
~/.dotfiles: ''
~/.vim: vim/vim/
~/.vimrc: vim/vimrc
~/.fonts/DroidSansMonoDottedPowerline.ttf:
create: true
path: vim/fonts/DroidFont.ttf
#~/.fonts/DroidSansMonoDottedPowerline.ttf:
# create: true
# path: vim/fonts/DroidFont.ttf
~/.gitconfig: git/gitconfig
~/.gitignore: git/gitignore
~/.tmux.conf: tmux/tmux.conf
- shell:
- [git submodule update --init --recursive, Installing submodules]
- [fc-cache -f ~/.fonts, Resetting font cache]
# - [fc-cache -f ~/.fonts, Resetting font cache]

46
tmux/tmux.conf Normal file
View file

@ -0,0 +1,46 @@
############
######
# Tmux Configuration for niblock
###
############
#tmux display things in 256 colors
set -g default-terminal "screen-256color"
set -g status-utf8 on
#start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
#renumber windows sequentially after closing any of them
set -g renumber-windows on
######
# Keybinds
###
#act like vim
setw -g mode-keys vi
#pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#window movement
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
#pane resizing
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
#split window and fix path for tmux 1.9
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"

@ -0,0 +1 @@
Subproject commit 2c03d82a0e4662adf1e347487d73a9bf4bf6fdac

View file

@ -1,12 +1,19 @@
"========================"
" vimrc file for niblock "
"========================"
"#========================#"
"# vimrc file for niblock #"
"#========================#"
" +++ Settings +++
" Type :so % to refresh .vimrc after making changes
"######
"# Settings
"##
" https://stackoverflow.com/questions/5845557/in-a-vimrc-is-set-nocompatible-completely-useless
set nocompatible
" Auto-reload files changed outside Vim
set autoread
" Map Leader key
let mapleader = ","
@ -26,8 +33,9 @@ let g:airline_powerline_fonts = 1
syntax on
filetype plugin indent on
" Enable line numbers
" Enable line numbers, and make them relative
set number
set rnu
" Indendation modifications
" Auto indent; set spacing; use spaces
@ -41,6 +49,7 @@ set softtabstop=5
" Set width; word wrap; scroll mods
set scrolloff=5
set tw=80
set colorcolumn=+1
set wrap
" Enable auto-completion for vim commands
@ -56,11 +65,34 @@ set hlsearch
" Set color scheme... duh...
colorscheme desert
" +++ Mappings +++
"######
"# Mappings
"##
" Making moving up/down work on wrapped lines of text
nnoremap <silent> j gj
nnoremap <silent> k gk
nnoremap <silent> ^ g^
nnoremap <silent> $ g$
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
" Toggle relative numbering
nnoremap <silent> <leader>n :set rnu!<CR>
" Easy-toggle nohlsearch
nnoremap <silent> <leader>s :set nohlsearch!<CR>
" Edit dotfiles with <leader>d
" v is for vim
nnoremap <silent> <leader>dv :tabnew ~/.vimrc<CR>
" b is for bash
nnoremap <silent> <leader>db :tabnew ~/.bashrc<CR>
" t is for tmux
nnoremap <silent> <leader>dt :tabnew ~/.tmux.conf<CR>
" d is for dotfiles install script
nnoremap <silent> <leader>dd :tabnew ~/.dotfiles/install.conf.yaml<CR>
" Remap ESC in insert mode
inoremap jk <esc>