From 09ec8203823279cbea35e6e15eded23dea36eceb Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 28 Apr 2017 01:08:53 -0400 Subject: [PATCH] vim changes --- vimrc | 61 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/vimrc b/vimrc index f255c97..8ec47fb 100644 --- a/vimrc +++ b/vimrc @@ -7,12 +7,12 @@ syntax on set noshowmode set mouse-=a syntax enable -set background=dark colorscheme solarized " Leader let mapleader = " " +set hidden " allow buffers to be hidden set backspace=2 " Backspace deletes like most programs in insert mode set nobackup set nowritebackup @@ -23,11 +23,13 @@ set showcmd " display incomplete commands set incsearch " do incremental searching set laststatus=2 " Always display the status line set autowrite " Automatically :write before running commands -" Softtabs, 4 spaces -set tabstop=4 softtabstop=0 expandtab shiftwidth=4 shiftround -" Make it obvious where 80 characters is -set textwidth=80 +set tabstop=4 softtabstop=0 expandtab shiftwidth=4 shiftround " Softtabs, 4 spaces +set textwidth=80 " Make it obvious where 80 characters is set colorcolumn=+1 +set autoindent +set preserveindent +set copyindent + " Numbers set number set numberwidth=4 @@ -36,20 +38,15 @@ set paste " Open new split panes to right and bottom, which feels more natural set splitbelow -set splitright +" set splitright " Quicker window movement -nnoremap j -nnoremap k -nnoremap h -nnoremap l " Switch between the last two files nnoremap " Easier tab changing -nnoremap rr :tabprevious -nnoremap tt :tabnext -nnoremap :tabnew +nnoremap rr :bprevious +nnoremap tt :bnext " configure syntastic syntax checking to check on open as well as save let g:syntastic_check_on_open=1 @@ -59,7 +56,7 @@ let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline_theme='base16' let g:tmuxline_powerline_separators = 0 - +let g:airline#extensions#tabline#fnamemod = ':t' " Treat
  • and

    tags like the block tags they are @@ -98,6 +95,38 @@ if executable('ag') let g:ctrlp_use_caching = 0 endif +" Setup some default ignores +let g:ctrlp_custom_ignore = { + \ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$', + \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$', +\} + +" Use the nearest .git directory as the cwd +" This makes a lot of sense if you are working on a project that is in version +" control. It also supports works with .svn, .hg, .bzr. +let g:ctrlp_working_path_mode = 'r' + +" Use a leader instead of the actual named binding +nmap p :CtrlP + +" Easy bindings for its various modes +nmap bb :CtrlPBuffer +nmap bm :CtrlPMixed +nmap bs :CtrlPMRU + + +" To open a new empty buffer +" This replaces :tabnew which I used to bind to this mapping +nmap t :enew + +" Move to the next buffer +nmap l :bnext + +" Move to the previous buffer +nmap h :bprevious + +" Close the current buffer and move to the previous one +nmap bq :bp bd # " Toggle line numbers with F1 - no more stupid help! nmap :set invnumber @@ -107,6 +136,6 @@ hi Normal ctermbg=none if filereadable($HOME . "/.vimrc.local") source ~/.vimrc.local endif -set background=dark let g:go_fmt_command = "goimports" -:nnoremap :buffers:buffer +nnoremap :buffers:buffer +set background=dark