From 787b8088c4cfc38902b7711021e5601c03e2e20e Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Thu, 22 Jun 2017 10:12:39 -0400 Subject: [PATCH] Add (neo)vimrc and tmux.conf --- home/.config/nvim/init.vim | 103 +++++++++++++++++++++++++++++++++++++ home/.tmux.conf | 41 +++++++++++++++ home/.vimrc | 1 + 3 files changed, 145 insertions(+) create mode 100644 home/.config/nvim/init.vim create mode 100755 home/.tmux.conf create mode 120000 home/.vimrc diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim new file mode 100644 index 0000000..5648b63 --- /dev/null +++ b/home/.config/nvim/init.vim @@ -0,0 +1,103 @@ +scriptencoding utf-8 + +let s:uname = system("echo -n \"$(uname)\"") +if v:shell_error + let s:uname = 'Unknown' +endif + +function GoPostUpdate() + :GoInstallBinaries + :GoUpdateBinaries +endfunction + +call plug#begin($HOME.'/.nvim/plugged') + +if s:uname == "Linux" + Plug 'Valloric/YouCompleteMe', { 'do': './install.py --all' } +else + " OSX is terrible about everything nice + Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --gocode-completer --racer-completer --tern-completer' } +endif + +Plug 'Chiel92/vim-autoformat' +Plug 'FelikZ/ctrlp-py-matcher' +Plug 'Lokaltog/vim-easymotion' +Plug 'airblade/vim-gitgutter' +Plug 'bling/vim-airline' +Plug 'bronson/vim-trailing-whitespace' +Plug 'fatih/vim-go', { 'do': ':exec GoPostUpdate()' } +Plug 'jbgutierrez/vim-babel' +Plug 'kien/ctrlp.vim' +Plug 'majutsushi/tagbar' +Plug 'mattn/webapi-vim' +Plug 'nanotech/jellybeans.vim' +Plug 'rking/ag.vim' +Plug 'rust-lang/rust.vim', { 'for': 'rust' } +Plug 'scrooloose/nerdcommenter' +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'shawncplus/phpcomplete.vim', { 'for': 'php' } +Plug 'terryma/vim-multiple-cursors' +Plug 'tmux-plugins/vim-tmux-focus-events' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-surround' +Plug 'vim-airline/vim-airline-themes' +Plug 'w0rp/ale' + +call plug#end() + +" speed improvements for ctrlp +if executable('ag') + set grepprg=ag\ --nogroup\ --nocolor + let g:ctrlp_user_command = 'ag %s -i -l --nocolor --nogroup --hidden + \ --ignore .git + \ --ignore .svn + \ --ignore .hg + \ --ignore .DS_Store + \ --ignore "**/*.min.js" + \ --ignore "**/*.min.map" + \ --ignore "**/*.pyc" + \ -g ""' + let g:ctrlp_use_caching = 0 +endif +let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' } +" end speed improvements for ctrlp + +colorscheme jellybeans " Color scheme +set laststatus=2 " Enable airline +let g:airline_theme = 'jellybeans' " Airline color scheme +let g:airline#extensions#tabline#enabled = 1 " Enable tab list in airline +let g:airline#extensions#tabline#left_sep = ' ' +let g:airline#extensions#tabline#left_alt_sep = '|' +let g:airline#extensions#whitespace#mixed_indent_algo = 1 +let g:airline_powerline_fonts = 1 +set list " Show tabs +set listchars=tab:\|\ " Show tabs by using the pipe symbol +set tabstop=4 " Tabs look like 4 spaces +set softtabstop=0 noexpandtab " Tabs look like 4 spaces +set shiftwidth=4 " Tabs look like 4 spaces +set number " Show line numbers +set cursorline " Highlight entire line that cursor is on +let g:tagbar_left = 1 " Make tagbar appear on the left +autocmd CompleteDone * pclose " Remove scratchpad after selection +set mouse= " Disable mouse + +if getcwd() =~ '/repos/cuda' + " codesniff files + let g:ale_php_phpcs_standard=''.$HOME.'/repos/cuda/Cuda-PHP-Code-Standards/PHP_CodeSniffer/Barracuda' +endif + +" Enable syntax-highlighting for Go +let g:go_highlight_functions = 1 +let g:go_highlight_methods = 1 +let g:go_highlight_fields = 1 +let g:go_highlight_types = 1 +let g:go_highlight_operators = 1 +let g:go_highlight_build_constraints = 1 + +" Use goimports instead of gofmt for import paths +let g:go_fmt_command = "goimports" + +" Key mappings +map :NERDTreeToggle +map :TagbarToggle diff --git a/home/.tmux.conf b/home/.tmux.conf new file mode 100755 index 0000000..4474f58 --- /dev/null +++ b/home/.tmux.conf @@ -0,0 +1,41 @@ +set-window-option -g mode-keys vi + +set -g default-terminal "xterm-256color" + +set -g base-index 1 +set -g bell-action any +set -g bell-on-alert on +set -g visual-bell on +set -g history-limit 10000 +set -g renumber-windows on +set -g allow-rename off +set -g escape-time 0 + +set -g message-bg default +set -g message-fg green +set -g pane-active-border-bg default +set -g pane-active-border-fg green +set -g pane-border-bg default +set -g pane-border-fg white +set -g status-bg default +set -g status-fg green +set -g status-position top +set -g window-status-bg default +set -g window-status-fg green +set -g window-status-current-bg default +set -g window-status-current-fg '#5B92E5' +set -g window-status-bell-bg red +set -g window-status-bell-fg green + +# List of plugins +set -g @tpm_plugins ' \ + tmux-plugins/tmux-pain-control \ + tmux-plugins/tmux-prefix-highlight \ + tmux-plugins/tmux-sensible \ + tmux-plugins/tmux-yank \ + tmux-plugins/tpm \ + tmux-plugins/vim-tmux-focus-events \ + ' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) + run '~/.tmux/plugins/tpm/tpm' diff --git a/home/.vimrc b/home/.vimrc new file mode 120000 index 0000000..25b6a3b --- /dev/null +++ b/home/.vimrc @@ -0,0 +1 @@ +.config/nvim/init.vim \ No newline at end of file