diff --git a/.gitmodules b/.gitmodules index 841797a..c037534 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/install.conf.yaml b/install.conf.yaml index 3f64fd2..d3040ab 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -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] diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..9be5e35 --- /dev/null +++ b/tmux/tmux.conf @@ -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!" diff --git a/vim/vim/bundle/vimwiki b/vim/vim/bundle/vimwiki new file mode 160000 index 0000000..2c03d82 --- /dev/null +++ b/vim/vim/bundle/vimwiki @@ -0,0 +1 @@ +Subproject commit 2c03d82a0e4662adf1e347487d73a9bf4bf6fdac diff --git a/vim/vimrc b/vim/vimrc index 566b106..4f4196e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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 j gj +nnoremap k gk +nnoremap ^ g^ +nnoremap $ g$ -nmap :wincmd k -nmap :wincmd j -nmap :wincmd h -nmap :wincmd l " 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 n :set rnu! + +" Easy-toggle nohlsearch +nnoremap s :set nohlsearch! + +" Edit dotfiles with d +" v is for vim +nnoremap dv :tabnew ~/.vimrc +" b is for bash +nnoremap db :tabnew ~/.bashrc +" t is for tmux +nnoremap dt :tabnew ~/.tmux.conf +" d is for dotfiles install script +nnoremap dd :tabnew ~/.dotfiles/install.conf.yaml + +" Remap ESC in insert mode +inoremap jk