Skip to content

Commit

Permalink
sync configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Aug 30, 2017
1 parent ba96067 commit a7d5ae6
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 6 deletions.
18 changes: 16 additions & 2 deletions .tmux.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Touch ID
set-option -g default-command "reattach-to-user-namespace -l $SHELL"

# colors
set -g default-terminal "screen-256color"

Expand All @@ -10,6 +13,8 @@ bind - split-window -c "#{pane_current_path}"
set -g prefix C-x
unbind C-b
bind C-x send-prefix
bind-key x send-prefix
bind-key a send-prefix

# Act like Vim
set-window-option -g mode-keys vi
Expand All @@ -19,8 +24,8 @@ bind-key k select-pane -U
bind-key l select-pane -R

# Vim copying
bind-key -t vi-copy 'v' begin-selection
bind -t vi-copy y copy-pipe 'pbcopy'
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

# Enable mouse support (works in iTerm)
set-option -g mouse on
Expand Down Expand Up @@ -74,3 +79,12 @@ set-option -g display-panes-colour colour166 #orange

# clock
set-window-option -g clock-mode-colour colour64 #green

# Smart pane switching with awareness of Vim splits.
# See: /~https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
49 changes: 45 additions & 4 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,29 @@ Plugin 'Lokaltog/vim-easymotion'
Plugin 'justinmk/vim-sneak'
Plugin 'kien/ctrlp.vim'
Plugin 'dantler/vim-alternate'
Plugin 'flazz/vim-colorschemes'
Plugin 'Shougo/neocomplete.vim'
Plugin 'vim-scripts/Figlet.vim'
Plugin 'rking/ag.vim'
Plugin 'mhinz/vim-signify'
Plugin 'tpope/vim-fugitive'
Plugin 'dadgar/vim-luna'
Plugin 'kshenoy/vim-signature'
Plugin 'fatih/vim-go'
Plugin 'leshill/vim-json'
Plugin 'moll/vim-bbye'
Plugin 'henrik/vim-indexed-search'
Plugin 'Shougo/deoplete.nvim'
Plugin 'zchee/deoplete-go', { 'do': 'make'}
"Plugin 'fatih/vim-hclfmt'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'shime/vim-livedown'
Plugin 'junegunn/goyo.vim'
Plugin 'fatih/vim-hclfmt'
Plugin 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

" Colors
Plugin 'ayu-theme/ayu-vim'
Plugin 'dadgar/vim-luna'
Plugin 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}

call vundle#end() " required
filetype plugin indent on " required

Expand All @@ -44,56 +52,67 @@ if $TERM_PROGRAM =~ "iTerm"
set termguicolors
endif

colorscheme luna
colorscheme Tomorrow-Night-Eighties

" Disable arrows
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" Line num and position
set relativenumber
set number
set ruler
set scrolloff=5 " Number of lines above or bellow the current line

" Highlighting
set hlsearch
set incsearch
set ignorecase

"Indents
set smartindent
set smarttab
set smartcase
set autoindent
set expandtab
set tabstop=4

" Undo File
set undofile
set undodir=~/.vimundo/

" Keep selection after tab adjust
vnoremap < <gv
vnoremap > >gv
" Enable file backup (atomic)
set noswapfile
set backupdir=~/.vimbackup
set backup
set writebackup

" Syntax
syntax on
filetype plugin indent on
set showmatch

" Wrapping
set textwidth=80
set fo+=t
set nowrap

" Buffer navigation
map <Leader>bn :bn<cr>
map <Leader>bp :bp<cr>
map <Leader>bd :Bdelete<cr>
" List navigation
map <Leader>ll :lfirst<cr>
map <Leader>ln :lnext<cr>
map <Leader>lp :lprevious<cr>
" MISC
set shortmess+=filmnrxoOtT " Abbreviate and avoid hit enter
set virtualedit=onemore " Allow for cursor beyond last character
Expand All @@ -105,48 +124,60 @@ set updatetime=4000
set backspace=2
set ttyfast
set lazyredraw

" Default to 2 spaces per tab
set tabstop=4
set softtabstop=4
set shiftwidth=4

" Remove toolbar from gui
if has("gui_running")
set guioptions-=T
endif

" More history
set history=10000
set undolevels=1000

" Ag
let g:ag_working_path_mode="r"

" CtrlP
let g:ctrlp_extensions = ['tag', 'buffertag', 'undo', 'changes']
map <C-p> :CtrlP<Enter>
map <C-b> :CtrlPBuffer<Enter>
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]vendor$',
\ }

" Airline
set laststatus=2
let g:airline_theme='luna'
let g:signify_mapping_toggle_highlight = '<leader>gh'
let g:airline#extensions#tabline#enabled = 1

" Signify
nnoremap <leader>gt :SignifyToggle<CR>
nnoremap <leader>gh :SignifyToggleHighlight<CR>
nmap <leader>gj <plug>(signify-next-hunk)
nmap <leader>gk <plug>(signify-prev-hunk)
" vim-go
let g:go_def_mapping_enabled = 1
let g:go_fmt_command = "goimports"
let g:go_list_type = "quickfix"

" Easy-align
vnoremap <silent> <leader>a :EasyAlign<Enter>
" TagBar
nnoremap <silent> <leader>tt :TagbarToggle<CR>
let g:tagbar_autoclose=1
let g:tagbar_autofocus=1

" Index Search
let g:indexed_search_colors=0

" Syntastic
let g:syntastic_c_check_header = 1
let g:syntastic_c_compiler_options = '-std=gnu99 -fno-strict-aliasing
Expand All @@ -163,15 +194,18 @@ 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

" NerdTree
map <C-e> :NERDTreeToggle<CR>:NERDTreeMirror<CR>
map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeIgnore=['\.class', '\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr', '\.o']
let NERDTreeQuitOnOpen=1

" Cscope
nmap <leader>s :cs find s <C-R>=expand("<cword>")<CR><CR>
set cscopetag

"Deocomplete
if has('nvim')
let g:deoplete#enable_at_startup = 1
Expand Down Expand Up @@ -251,18 +285,25 @@ else
set conceallevel=2 concealcursor=i
endif
endif

" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
" <CR>: close popup
" <s-CR>: close popup and save indent.
inoremap <expr><s-CR> pumvisible() ? neocomplete#close_popup()"\<CR>" : "\<CR>"
inoremap <expr><CR> pumvisible() ? neocomplete#close_popup() : "\<CR>"
" Disable the neosnippet preview candidate window
" When enabled, there can be too much visual noise
" especially when splits are used.
set completeopt-=preview

" GO Syntax
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on

" HCL Syntax
let g:hcl_fmt_autosave = 0

0 comments on commit a7d5ae6

Please sign in to comment.