Skip to content

Instantly share code, notes, and snippets.

@VaughnGH
Last active February 17, 2018 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VaughnGH/1e9714df645e395468e5fc5f7a7c1bfd to your computer and use it in GitHub Desktop.
Save VaughnGH/1e9714df645e395468e5fc5f7a7c1bfd to your computer and use it in GitHub Desktop.
Dotfiles
#####
# Instructions
####
# BE SURE TO INSTALL TMUX Plugin Manager
# https://github.com/tmux-plugins/tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# then Load tmux configurations
#> tmux source-file ~/.tmux.conf
# Once installed load plugins in your session with
#> ctrl-b + I
# Once installed:
# prefix + y = copy line to clipboard
# prefix + ctrl-s = Persist session
# prefix + ctrl-r = Resurect session
# For all other commands, see cheat sheet:
# http://www.dayid.org/comp/tm.html
####
# Settings including active mouse, scrolling and more ...
####
# 0 is too far from ` ;)
set -g base-index 1
#retreuve persisted tmux after restart
#https://github.com/tmux-plugins/tmux-resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'
# automaticually saves tmux session every 15mins
# https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on'
#allow copy and paste from tmux
#https://github.com/tmux-plugins/tmux-yank
set -g @plugin 'tmux-plugins/tmux-yank'
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
set -g mouse on
setw -g monitor-activity on
bind-key v split-window -h
bind-key s split-window -v
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# No delay for escape key press
set -sg escape-time 0
# Reload tmux config
bind r source-file ~/.tmux.conf
# THEME
#set -g status-bg black
#set -g status-fg white
#set -g window-status-current-bg white
#set -g window-status-current-fg black
#set -g window-status-current-attr bold
#set -g status-interval 60
#set -g status-left-length 30
#set -g status-left '#[fg=green](#S) #(whoami)'
#set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# 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'
set number
set relativenumber
set com=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,b:-
set expandtab
set backspace=indent,eol,start " Make backspace work as expected
set mouse=nicr " Enables mouse scrolling in vim inside iterm2
set ruler
set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%) "Add time to statusbar
set list lcs=tab:\¦\ "adds lines under tabs
set background=dark
"Set `;` to also map to `:`, so you don't have to hold shift
map ; :
"funcionally disabling ex mode
map Q <Nop>
"run python script
command Rpy !python %
command WRpy w <bar> Rpy
command WRPY w <bar> Rpy
noremap <Leader>W :WRpy <cr>
command Rpyy !python3 %
command WRpyy w <bar> Rpyy
command WRPYY w <bar> Rpyy
noremap <Leader>w :WRpyy <cr>
"run go
command Rgo !go run %
command WRgo w <bar> Rgo
command WRGO w <bar> Rpy
noremap <Leader>g :WRgo <cr>
"compile/run verilog (with icarus $iverlog)
command Rv !iverilog % && vvp a.out
"^ can also use ./a.out
command WRv w <bar> Rv
command WRV w <bar> Rv
noremap <Leader>v :WRv <cr>
"run node
command Rnode !node %
command WRnode w <bar> Rnode
command RNode !node %
command WRNode w <bar> Rnode
"run c
command Rc !gcc % && ./a.out
command WRc w <bar> Rc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Keep Plugin commands between vundle#begin/end.
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Plugin 'scrooloose/syntastic'
Plugin 'morhetz/gruvbox'
Plugin 'valloric/YouCompleteMe'
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Search highlight
set hlsearch
" Default tab sizes
set ts=2 sts=2 sw=2
" Different tab sizes based on filetypes
autocmd Filetype html setlocal ts=2 sts=2 sw=2
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2
autocmd Filetype json setlocal ts=2 sts=2 sw=2
autocmd Filetype css setlocal ts=2 sts=2 sw=2
autocmd Filetype python setlocal ts=4 sts=4 sw=4
autocmd Filetype c setlocal ts=2 sts=2 sw=2
autocmd Filetype cpp setlocal ts=2 sts=2 sw=2
"associate handlebars with html
au BufNewFile,BufRead *.handlebars set filetype=html
"syntax enable
"set tabstop=4 shiftwidth=4 expandtab "sets 4 spaces instead of tabs
"colorscheme gruvbox
"IndentLine -- Recommended chars: ¦ , ┆ , ︙, │ --but only works with UTF-8 encoded files
" Vim
"let g:indentLine_color_term = 239
"let g:indentLine_loaded = 1
"let g:indentLine_char = '¦'
"let g:indentLine_enabled = 1
if !exists("g:syntax_on")
syntax enable
colorscheme gruvbox
endif
"Status Line indent options
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
""Connormcd.com Notetaking in Markdown
map <leader>n :e! ~/notes
map <leader>] :Note
map <leader>[ :NoteTab
map <leader>0 :Nls
command -nargs=1 Note :exe "e! " . fnameescape("~/notes/<args>.txt")
command -nargs=1 NoteTab :exe "tabnew " . fnameescape("~/notes/<args>.txt")
command -nargs=1 Nls :Ack --text "<args>" ~/notes
""Note-taking snippets
"snippet img
"![${1}](~/notes/img/${2})${3}
"snippet t
"# `expand("%:r")`
"> Date: `strftime("%m-%d-%y")`
"> Instructor: ${1} `
"
"## ${2}
"Markdown settings : http://technicalpickles.com/posts/using-markdown-in-vim/
augroup mkd
autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:>
augroup END
#!/bin/bash
# Assumes (bash), vim, tmux, and git are installed
# Copy dotfiles to home dir
cp -t ~/ .vimrc .tmux.conf
# Install Vundle, a vim package manager
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# Install tpm, a tmux package manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "Now, in vim run :PluginInstall , in tmux run prefix + I"
alias vpnin_old='sudo openvpn --up /etc/openvpn/update-resolv-conf --down /etc/openvpn/update-resolv-conf --config ~/client.ovpn'
alias vpnin-old='vpnin_old'
# Now includes script to fix docker bridge. See: https://github.com/docker/libnetwork/issues/779#issuecomment-231727303
alias vpnin='sudo openvpn --up /etc/openvpn/update-resolv-conf --down /etc/openvpn/update-resolv-conf --config ~/.config/client.ovpn --route-up ~/.config/fix-ovpn-routes-for-docker.sh'
alias vpnoff='sudo service openvpn stop'
alias sshin='ssh vganemhaka@dmz-streamflow.intellisis.com'
alias rmpyc='rm *.pyc'
alias rmswp='rm .*.swp'
alias cl='clear && ls'
alias clp='clear && ls && pwd'
alias cpl='clear && pwd && ls'
alias fixmouse='sudo modprobe -r psmouse && sudo modprobe psmouse proto=imps'
alias fixnet='sudo service network-manager restart && sudo dhclient && sudo service iptables-persistent flush'
alias update='sudo apt-get update || sudo apt-get upgrade'
alias eclipse='/opt/eclipse/eclipse'
alias refresh='nohup compiz --replace'
alias dns='nm-tool | grep DNS'
alias redis-desktop-manager='/usr/share/redis-desktop-manager/bin/rdm'
alias rdm='source /opt/qt56/bin/qt56-env.sh && /usr/share/redis-desktop-manager/bin/rdm'
alias swagger2pdf='/usr/lib/node_modules/swagger-spec-to-pdf/bin/swagger2pdf'
alias open='gnome-open'
alias search='grep -rnw '.' -e'
alias ack="ack-grep --color"
alias vim-all='vim -p *'
alias tabe='vim'
export VISUAL=vim
export EDITOR="$VISUAL"
#export PAGER="most"
export PAGER="less"
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
export RANCHER_URL=https://rancher.knuedge.com/v2-beta/projects/1a476
export RANCHER_ACCESS_KEY=62DA6A1C0E0E11F80B34
export RANCHER_SECRET_KEY=7FkefobijC8W5x8tZDtKJfiXZk9NRBqLLrQFeiQW
alias kws_nfs_dev='ssh vganemhaka@sspd-ranchernode-01.intellisis.com'
alias gco="$HOME/Documents/branch_complete.sh"
alias dict="sdcv --color" # See : https://askubuntu.com/questions/191125/is-there-an-offline-command-line-dictionary
alias dictionary="sdcv --color"
# sets custom keymap (`Caps_Lock' to `Escape')
xmodmap ~/.speedswapper
#sudo loadkeys ~/.keymap
#Golang GOPATH locations
export GOPATH=/usr/local/share/go
#export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
#Scala Path and Enviroment
export SCALA_HOME=/usr/local/share/scala
export PATH=$PATH:$SCALA_HOME/bin
# libevent path (used in building tmux)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# https://news.ycombinator.com/item?id=16357917
notes() {
local fpath=$HOME/notes.md
if [ "$1" == "gvim" ]; then
gvim + $fpath
elif [ "$1" == "vim" ]; then
vim + $fpath
elif [ "$1" == "vi" ]; then
vi + $fpath
elif [ "$1" == "emacs" ]; then
emacs + $fpath
elif [ "$1" == "date" ]; then
echo '' >> $fpath
echo '# '`date +"%m-%d-%Y-%T"` >> $fpath
echo '---------------------' >> $fpath
elif [ "$1" == "" ]; then
less +G $fpath
else
echo '' >> $fpath
echo $@ >> $fpath
fi
}
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
export TERM='xterm-256color'
else
export TERM='xterm-color'
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
function ag_search(){
if [ -z "$1" ]; then
ag --nobreak --nonumbers --noheading -f . | fzf
else
ag --nobreak --nonumbers --noheading -f . "$1" | fzf
fi
}
alias agf="ag_search"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
complete -F _fzf_path_completion -o default -o bashdefault ag
# fzf via local installation
#if [ -e ~/.fzf ]; then
# _append_to_path ~/.fzf/bin
# source ~/.fzf/shell/key-bindings.zsh
# source ~/.fzf/shell/completion.zsh
#fi
# fzf + ag configuration
#if _has fzf && _has ag; then
export FZF_DEFAULT_COMMAND='ag --color -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS='
--color fg:242,bg:236,hl:65,fg+:15,bg+:239,hl+:108
--color info:108,prompt:109,spinner:108,pointer:168,marker:168
'
#fi
se t_Co=256
"set g:gruvbox_termcolors=16
set number
set relativenumber
syntax on
set expandtab
set backspace=indent,eol,start " Make backspace work as expected
set mouse=nicr " Enables mouse scrolling in vim inside iterm2
set ruler
"set background=dark
"colorscheme delek
"colorscheme evening
colorscheme gruvbox
"colorscheme slate
"colorscheme darkblue
"set background=light
set background=dark
"colorscheme morning
"Add column to show 80 char limit
highlight ColorColumn ctermbg=cyan
set colorcolumn=80
" set <leader>
let mapleader=','
set timeoutlen=1000
set ttimeoutlen=10
" Get rid of annoying f1 help, hit escape like you meant to
" map = normal mode mapping, imap = insert mode mapping
map <F1> <Esc>
imap <F1> <Esc>
map ; :
" imap ; :
map <Tab> :NERDTreeFocus
imap <Tab> :NERDTreeFocus
" Honestly, the page up/down are TERRIBLE on some dell laptops
map <PageUp> <Nop>
imap <PageUp> <Nop>
map <PageDown> <Nop>
imap <PageDown> <Nop>
" set list lcs=tab:\¦\ "adds lines under tabs
"run python script
nmap <Leader>r !python %<CR>
command Rpyy !python2 %
command RPyy !python2 %
command Rpy !python3 %
command RPy !python3 %
command WRpy w <bar> Rpy
command WRPY w <bar> Rpy
nnoremap <leader>w :WRpy<CR>
nnoremap <leader>r :Rpy<CR>
command Rnode !nodejs %
command WRnode w <bar> Rnodejs
command Rc !gcc --std=c11 % && ./a.out
command WRc w <bar> Rc
command Rcpp !g++ -std=c++11 % && ./a.out
command WRcpp w <bar> Rcpp
command Q q
command WQ wq
command Rgo !echo 'Go running... Ctrl+C to exit' && go run %
command WRgo w <bar> Rgo
command WRGO WRgo
nnoremap <leader>q :q<CR>
nnoremap <leader>w :w<CR>
" LaTeX (rubber) macro for compiling
nnoremap <leader>c :w<CR>:!rubber --pdf --warn all %<CR>
" View PDF macro; '%:r' is current file's root (base) name.
nnoremap <leader>v :!mupdf %:r.pdf &<CR><CR>
" Open file in UI env
nnoremap <leader>o :!open %<CR>
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Keep Plugin commands between vundle#begin/end.
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-syntastic/syntastic'
Plugin 'fatih/vim-go'
Plugin 'Valloric/YouCompleteMe'
Plugin 'romainl/vim-cool'
Plugin 'scrooloose/nerdtree'
Plugin 'solarnz/thrift.vim'
Plugin 'morhetz/gruvbox'
Plugin 'tpope/vim-fugitive'
Plugin 'tmux-plugins/vim-tmux'
Plugin 'AndrewRadev/linediff.vim'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'ekalinin/Dockerfile.vim'
Plugin 'sickill/vim-monokai'
"Plugin 'mileszs/ack.vim'
Plugin 'johngrib/vim-game-snake'
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Search highlight
set hlsearch
" Default tab sizes
set ts=2 sts=2 sw=2
" Different tab sizes based on filetypes
autocmd Filetype html setlocal ts=2 sts=2 sw=2
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2
autocmd Filetype json setlocal ts=2 sts=2 sw=2
autocmd Filetype css setlocal ts=2 sts=2 sw=2
autocmd Filetype python setlocal ts=4 sts=4 sw=4
"associate handlebars with html
au BufNewFile,BufRead *.handlebars set filetype=html
"associate md with markdown
au BufNewFile,BufRead *.md set filetype=markdown
"Status Line indent options
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
"YouCompleteMe
"set shortmess+=c
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
set conceallevel=2
set concealcursor=vin
let g:clang_snippets=1
let g:clang_conceal_snippets=1
" The single one that works with clang_complete
let g:clang_snippets_engine='clang_complete'
"let g:ycm_add_preview_to_completeopt = 1
"debug
""let g:ycm_server_keep_logfiles = 1
""let g:ycm_server_log_level = 'debug'
" Complete options (disable preview scratch window, longest removed to aways
" show menu)
set completeopt=menu,menuone,preview
let g:ycm_autoclose_preview_window_after_insertion = 1
"close preview immediately when completion finishes
""autocmd CompleteDone * pclose
" Limit popup menu height
set pumheight=20
" SuperTab completion fall-back
let g:SuperTabDefaultCompletionType='<c-x><c-u><c-p>'
" Automatically open NerdTree
" autocmd vimenter * NERDTree
" Go to prew window focus
autocmd vimenter * wincmd p
" Close NerdTree if it is the only window left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
""""""""""""" fzf """"""""""""""""""
" If installed using git
set rtp+=~/.fzf
"nmap ' :Buffers<CR>
"nmap <Leader>r :Files<CR>
"nmap <Leader>t :Tags<CR>
"nmap <M-k> :Ack! "\b<cword>\b" <CR>
"nmap <Esc>k :Ack! "\b<cword>\b" <CR>
"nmap <M-S-k> :Ggrep! "\b<cword>\b" <CR>
"nmap <Esc>K :Ggrep! "\b<cword>\b" <CR>
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" Default fzf layout
" - down / up / left / right
let g:fzf_layout = { 'down': '~40%' }
" In Neovim, you can set up fzf window using a Vim command
let g:fzf_layout = { 'window': 'enew' }
let g:fzf_layout = { 'window': '-tabnew' }
let g:fzf_layout = { 'window': '10split enew' }
" Customize fzf colors to match your color scheme
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
" Enable per-command history.
" CTRL-N and CTRL-P will be automatically bound to next-history and
" previous-history instead of down and up. If you don't like the change,
" explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS.
let g:fzf_history_dir = '~/.local/share/fzf-history'
@VaughnGH
Copy link
Author

VaughnGH commented Oct 8, 2017

  • linediff.vim is incredible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment