2013-08-08 02:54:11 +00:00
|
|
|
|
" Install Vundle Packages
|
|
|
|
|
filetype off
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
|
|
|
|
set rtp+=~/.vim/bundle/vundle/
|
|
|
|
|
call vundle#rc()
|
|
|
|
|
|
|
|
|
|
" let Vundle manage Vundle
|
|
|
|
|
" required!
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'gmarik/vundle'
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
|
|
|
|
" Rest of my bundles
|
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- File Nav --
|
2014-08-28 22:17:21 +00:00
|
|
|
|
"Plugin 'scrooloose/nerdtree' " File tree navigation
|
|
|
|
|
Plugin 'tpope/vim-vinegar' " Simple file navigation
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'a.vim' " Switch to alternate file
|
|
|
|
|
Plugin 'file-line' " Allow opening to a line from file name using :
|
|
|
|
|
Plugin 'tpope/vim-fugitive' " Git integration
|
2014-11-04 18:20:11 +00:00
|
|
|
|
Plugin 'christoomey/vim-tmux-navigator'
|
2014-06-17 19:09:01 +00:00
|
|
|
|
|
|
|
|
|
" -- Fuzzy Finders --
|
2014-11-04 18:15:54 +00:00
|
|
|
|
Plugin 'ctrlpvim/ctrlp.vim' " Quick find files in project
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- Buffer Nav --
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'sandeepcr529/Buffet.vim' " Quick buffer switching
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- Nav in file --
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'majutsushi/tagbar' " Ctags file parsing
|
|
|
|
|
Plugin 'scrooloose/syntastic' " Syntax checking
|
|
|
|
|
Plugin 'ViViDboarder/QFixToggle' " Easy Toggle of QuickFix window
|
2014-11-04 18:17:21 +00:00
|
|
|
|
if executable('ag')
|
|
|
|
|
Plugin 'rking/ag.vim' " Project searching
|
|
|
|
|
else
|
|
|
|
|
Plugin 'mileszs/ack.vim' " Project Searching
|
|
|
|
|
endif
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- Text Manipulation --
|
2014-11-04 18:18:22 +00:00
|
|
|
|
Plugin 'tomtom/tcomment_vim' " Easy comments
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'tpope/vim-surround' " Surround for wrapping text
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- GUI --
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'gregsexton/MatchTag'
|
|
|
|
|
Plugin 'bling/vim-airline' " Custom Status Line
|
2013-01-08 20:51:22 +00:00
|
|
|
|
"Powerline Config
|
2013-10-27 16:25:27 +00:00
|
|
|
|
"If using a patched font: https://github.com/Lokaltog/vim-powerline/wiki/Patched-fonts
|
2013-08-16 21:26:00 +00:00
|
|
|
|
"let g:airline_powerline_fonts = 1
|
2012-07-02 17:25:36 +00:00
|
|
|
|
|
2014-08-28 22:17:21 +00:00
|
|
|
|
" -- System --
|
|
|
|
|
Plugin 'tpope/vim-dispatch' " Allow async make
|
|
|
|
|
Plugin 'tpope/vim-rsi' " emacs bindinds in insert
|
|
|
|
|
Plugin 'tpope/vim-repeat' " Repeat mapped commands with .
|
2014-08-08 19:32:23 +00:00
|
|
|
|
" Needs to be compiled
|
2014-08-28 22:17:21 +00:00
|
|
|
|
Plugin 'Shougo/vimproc.vim' " Async for plugins
|
2013-12-05 02:39:19 +00:00
|
|
|
|
|
2014-11-04 18:16:56 +00:00
|
|
|
|
if has('lua')
|
|
|
|
|
Plugin 'Shougo/neocomplete.vim' " Autocomplete
|
|
|
|
|
else
|
|
|
|
|
Plugin 'Shougo/neocomplcache.vim' " Autocomplete
|
|
|
|
|
end
|
|
|
|
|
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" -- Themes --
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'vividchalk.vim'
|
|
|
|
|
Plugin 'wombat256.vim'
|
|
|
|
|
Plugin 'nanotech/jellybeans.vim'
|
|
|
|
|
Plugin 'candy.vim'
|
|
|
|
|
Plugin 'therubymug/vim-pyte'
|
|
|
|
|
Plugin 'eclipse.vim'
|
|
|
|
|
Plugin 'summerfruit256.vim'
|
|
|
|
|
Plugin 'nuvola.vim'
|
|
|
|
|
Plugin 'altercation/vim-colors-solarized'
|
|
|
|
|
Plugin 'morhetz/gruvbox'
|
|
|
|
|
"Plugin 'BusyBee.vim'
|
|
|
|
|
"Plugin 'github.vim'
|
2013-10-27 16:25:27 +00:00
|
|
|
|
|
2013-01-08 20:51:22 +00:00
|
|
|
|
" -- Filetypes --
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'ViViDboarder/vim-forcedotcom'
|
|
|
|
|
Plugin 'pdurbin/vim-tsv'
|
|
|
|
|
Plugin 'pangloss/vim-javascript'
|
2014-09-02 17:15:30 +00:00
|
|
|
|
Plugin 'fatih/vim-go'
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'PreserveNoEOL'
|
2014-11-04 18:18:22 +00:00
|
|
|
|
Plugin 'hsanson/vim-android'
|
2014-06-17 19:09:01 +00:00
|
|
|
|
Plugin 'groovy.vim'
|
|
|
|
|
Plugin 'tfnico/vim-gradle'
|
2014-08-08 19:32:23 +00:00
|
|
|
|
Plugin 'dart-lang/dart-vim-plugin'
|
2014-11-04 18:18:22 +00:00
|
|
|
|
"Plugin 'ViViDboarder/force-vim'
|
2014-06-17 19:09:01 +00:00
|
|
|
|
"Plugin 'ViViDboarder/vim-abuse-the-force'
|
|
|
|
|
"Plugin 'chrisbra/csv.vim'
|
2012-10-15 19:18:14 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" ***************************
|
|
|
|
|
" Built in settings
|
|
|
|
|
" ***************************
|
|
|
|
|
|
|
|
|
|
"Allows filetype detection
|
|
|
|
|
filetype on
|
|
|
|
|
|
|
|
|
|
" Set settings values
|
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
|
|
|
|
" Allow arrow keys
|
2012-04-24 14:09:19 +00:00
|
|
|
|
set nocompatible
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Use more convenient leader
|
2012-07-02 19:26:56 +00:00
|
|
|
|
let mapleader=","
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Enable mouse input
|
2012-07-02 17:25:36 +00:00
|
|
|
|
set mousehide
|
|
|
|
|
set mouse=a
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Tab functionality
|
2012-03-29 03:18:33 +00:00
|
|
|
|
set expandtab
|
|
|
|
|
set tabstop=4
|
|
|
|
|
set shiftwidth=4
|
|
|
|
|
set softtabstop=4
|
|
|
|
|
set autoindent
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Ensure backspace actually works
|
2012-07-31 15:54:33 +00:00
|
|
|
|
set backspace=2
|
2013-08-08 02:54:11 +00:00
|
|
|
|
"
|
|
|
|
|
" allow for cursor beyond last character
|
|
|
|
|
set virtualedit=onemore
|
|
|
|
|
" lines to scroll when cursor leaves screen
|
|
|
|
|
set scrolljump=5
|
|
|
|
|
" minimum lines to keep above and below cursor
|
|
|
|
|
set scrolloff=3
|
2012-04-24 14:09:19 +00:00
|
|
|
|
|
2012-12-10 19:29:24 +00:00
|
|
|
|
" Display filename at bottom of window
|
|
|
|
|
set ls=2
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Set backup dirs
|
2012-07-02 17:25:36 +00:00
|
|
|
|
set backup
|
|
|
|
|
set backupdir=~/.vim/backup
|
|
|
|
|
set directory=~/.vim/tmp
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
"enable line numbers
|
|
|
|
|
set nu
|
|
|
|
|
|
|
|
|
|
" Highlights the line the cursor is on
|
|
|
|
|
set cursorline
|
|
|
|
|
:hi CursorLine cterm=NONE ctermbg=darkred guibg=darkred guifg=white
|
|
|
|
|
|
|
|
|
|
" Syntax Hightlighting
|
|
|
|
|
syntax on
|
|
|
|
|
|
2013-08-08 16:19:27 +00:00
|
|
|
|
" Enable search highlighting
|
2013-08-08 02:54:11 +00:00
|
|
|
|
set hls
|
|
|
|
|
|
2013-08-08 16:19:27 +00:00
|
|
|
|
" Change Working Directory to that of the current file
|
|
|
|
|
cmap cwd lcd %:p:h
|
|
|
|
|
cmap cd. lcd %:p:h
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" ********************************
|
|
|
|
|
" GUI SETTINGS
|
|
|
|
|
" *****************************
|
|
|
|
|
|
|
|
|
|
" Set theme based on $VIM_COLOR variable
|
2012-07-02 17:37:30 +00:00
|
|
|
|
try
|
2013-01-02 17:12:41 +00:00
|
|
|
|
if !empty($VIM_COLOR)
|
|
|
|
|
colorscheme $VIM_COLOR
|
|
|
|
|
else
|
|
|
|
|
if has("gui_running")
|
2013-10-27 16:25:27 +00:00
|
|
|
|
colorscheme wombat256mod
|
2013-01-02 17:12:41 +00:00
|
|
|
|
else
|
|
|
|
|
colorscheme vividchalk
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2012-07-02 17:37:30 +00:00
|
|
|
|
catch /^Vim\%((\a\+)\)\=:E185/
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" Colorschemes not installed yet
|
|
|
|
|
" This happens when first installing bundles
|
2013-12-03 23:55:08 +00:00
|
|
|
|
colorscheme default
|
2012-07-02 17:37:30 +00:00
|
|
|
|
endtry
|
|
|
|
|
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" Set Airline theme
|
|
|
|
|
if g:colors_name == 'github'
|
|
|
|
|
let g:airline_theme = 'solarized'
|
|
|
|
|
endif
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Set gui fonts
|
|
|
|
|
if has("gui_running")
|
2013-10-27 16:25:27 +00:00
|
|
|
|
if has("gui_win32")
|
2013-08-08 02:54:11 +00:00
|
|
|
|
set guifont=Consolas:h10:b
|
|
|
|
|
elseif has("gui_macvim")
|
|
|
|
|
try
|
2013-08-08 03:13:27 +00:00
|
|
|
|
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
|
2013-08-08 02:54:11 +00:00
|
|
|
|
catch
|
|
|
|
|
" Failed to set font
|
|
|
|
|
endtry
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
" Set xterm title, and inform vim of screen/tmux's syntax for doing the same
|
|
|
|
|
set titlestring=vim\ %{expand(\"%t\")}
|
|
|
|
|
if &term =~ "^screen"
|
|
|
|
|
" pretend this is xterm. it probably is anyway, but if term is left as
|
|
|
|
|
" `screen`, vim doesn't understand ctrl-arrow.
|
|
|
|
|
if &term == "screen-256color"
|
|
|
|
|
set term=xterm-256color
|
|
|
|
|
else
|
|
|
|
|
set term=xterm
|
|
|
|
|
endif
|
2012-04-24 14:09:19 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" gotta set these *last*, since `set term` resets everything
|
|
|
|
|
set t_ts=k
|
|
|
|
|
set t_fs=\
|
2013-12-05 02:34:25 +00:00
|
|
|
|
set t_ut=
|
2013-03-18 02:19:44 +00:00
|
|
|
|
endif
|
2013-08-08 02:54:11 +00:00
|
|
|
|
set title
|
2013-03-18 02:19:44 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" ********************************
|
|
|
|
|
" SET HOTKEYS
|
|
|
|
|
" ********************************
|
2012-03-29 03:18:33 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Remap jk to esc
|
|
|
|
|
inoremap jk <esc>
|
2014-11-19 17:47:08 +00:00
|
|
|
|
inoremap `` <esc>
|
|
|
|
|
vnoremap `` <esc>
|
2013-08-08 02:54:11 +00:00
|
|
|
|
|
|
|
|
|
" Bind Make to F5 like other IDEs
|
2014-07-10 18:40:57 +00:00
|
|
|
|
nnoremap <F5> :Make!<CR>
|
2013-08-08 02:54:11 +00:00
|
|
|
|
|
|
|
|
|
" Remap Ctrl+Space for auto Complete
|
|
|
|
|
inoremap <C-Space> <C-n>
|
|
|
|
|
inoremap <Nul> <C-n>
|
|
|
|
|
|
|
|
|
|
" Toggle highlighting with \hr (highlight row)
|
|
|
|
|
nnoremap <leader>hr :set cursorline!<CR>
|
|
|
|
|
|
|
|
|
|
" Toggle Line numbers with Ctrl+N double tap
|
2012-04-24 14:09:19 +00:00
|
|
|
|
nmap <C-N><C-N> :set invnumber<CR>
|
2012-06-01 19:49:20 +00:00
|
|
|
|
nmap <leader>ln :set invnumber<CR>
|
2012-04-24 14:09:19 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Toggle line wrap with Ctrl+L double tap
|
2012-04-24 14:09:19 +00:00
|
|
|
|
nmap <C-L><C-L> :set wrap!<CR>
|
2012-06-01 19:49:20 +00:00
|
|
|
|
nmap <leader>lw :set wrap!<CR>
|
2012-03-29 03:18:33 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Toggle White Space
|
2013-07-30 19:40:43 +00:00
|
|
|
|
nmap <leader>ws :set list!<CR>
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Map Shift+U to redo
|
2013-10-27 16:25:27 +00:00
|
|
|
|
nnoremap <S-u> <C-r>
|
2012-06-01 19:49:20 +00:00
|
|
|
|
|
2012-04-24 14:09:19 +00:00
|
|
|
|
" Stupid shift key fixes
|
2012-07-02 17:25:36 +00:00
|
|
|
|
cmap WQ<CR> wq<CR>
|
|
|
|
|
cmap Wq<CR> wq<CR>
|
|
|
|
|
cmap W<CR> w<CR>
|
|
|
|
|
cmap Q<CR> q<CR>
|
2013-08-08 02:54:11 +00:00
|
|
|
|
cmap Q!<CR> q!<CR>
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" Stupid semicolon files
|
|
|
|
|
cnoremap w; w
|
|
|
|
|
cnoremap W; w
|
|
|
|
|
cnoremap q; q
|
|
|
|
|
cnoremap Q; q
|
2012-04-24 14:09:19 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Clearing highlighted search
|
2012-10-17 20:26:42 +00:00
|
|
|
|
nmap <silent> <leader>/ :set hlsearch! hlsearch?<CR>
|
|
|
|
|
noremap <C-h><C-s> :set hlsearch! hlsearch?<CR>
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" Clear search
|
2013-08-08 02:54:11 +00:00
|
|
|
|
nmap <silent> <leader>cs :nohlsearch<CR>
|
|
|
|
|
|
|
|
|
|
" Code fold
|
2013-12-03 23:06:19 +00:00
|
|
|
|
nmap <leader>cf va{<ESC>zf%<ESC>:nohlsearch<CR>
|
2012-04-24 14:09:19 +00:00
|
|
|
|
|
2014-03-04 18:53:29 +00:00
|
|
|
|
" Paste over
|
|
|
|
|
vnoremap pp p
|
|
|
|
|
vnoremap po "_dP
|
|
|
|
|
|
2014-11-04 18:18:12 +00:00
|
|
|
|
" Buffer nav
|
|
|
|
|
nmap gb :bn<CR>
|
|
|
|
|
nmap gB :bp<CR>
|
|
|
|
|
|
|
|
|
|
set notitle
|
|
|
|
|
|
|
|
|
|
command TagsUpdate Dispatch ctags -R .
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" ********************************
|
|
|
|
|
" PLUGIN SETTINGS
|
|
|
|
|
" ********************************
|
|
|
|
|
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" Airline config
|
|
|
|
|
" Use short-form mode text
|
|
|
|
|
let g:airline_mode_map = {
|
|
|
|
|
\ '__' : '-',
|
|
|
|
|
\ 'n' : 'N',
|
|
|
|
|
\ 'i' : 'I',
|
|
|
|
|
\ 'R' : 'R',
|
|
|
|
|
\ 'c' : 'C',
|
|
|
|
|
\ 'v' : 'V',
|
|
|
|
|
\ 'V' : 'V',
|
|
|
|
|
\ '' : 'V',
|
|
|
|
|
\ 's' : 'S',
|
|
|
|
|
\ 'S' : 'S',
|
|
|
|
|
\ '' : 'S',
|
|
|
|
|
\ }
|
|
|
|
|
let g:airline#extensions#whitespace#trailing_format = 'tw[%s]'
|
|
|
|
|
let g:airline#extensions#whitespace#mixed_indent_format = 'i[%s]'
|
|
|
|
|
let g:airline_left_sep=''
|
|
|
|
|
let g:airline_left_alt_sep=''
|
|
|
|
|
let g:airline_right_sep=''
|
|
|
|
|
let g:airline_right_alt_sep=''
|
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
2013-12-03 23:06:36 +00:00
|
|
|
|
let g:airline#extensions#tabline#left_sep = ' '
|
|
|
|
|
let g:airline#extensions#tabline#left_alt_sep = '|'
|
2013-10-27 16:25:27 +00:00
|
|
|
|
|
2013-12-05 22:32:02 +00:00
|
|
|
|
" AbuseTheForce
|
|
|
|
|
" Set foreground if using tmux, otherwise background
|
2014-11-19 18:09:12 +00:00
|
|
|
|
if ! exists('g:abusetheforce_dispatch_background') && (exists("$TMUX") || ( has("gui_running") && has("gui_macvim") ) )
|
2013-12-05 22:32:02 +00:00
|
|
|
|
let g:abusetheforce_dispatch_background = 0
|
|
|
|
|
else
|
|
|
|
|
let g:abusetheforce_dispatch_background = 1
|
2014-11-04 18:18:22 +00:00
|
|
|
|
endif
|
2013-12-05 22:32:02 +00:00
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" Buffet shortcut
|
|
|
|
|
nnoremap <silent> <F2> :Bufferlist<CR>
|
|
|
|
|
|
|
|
|
|
" NERDTree
|
2014-08-28 22:17:21 +00:00
|
|
|
|
" nnoremap <silent> <F4> :NERDTreeToggle<CR>
|
|
|
|
|
"nnoremap <leader>nn :NERDTreeToggle<CR>
|
|
|
|
|
"nnoremap <leader>nf :NERDTreeFind<CR>
|
2013-08-08 02:54:11 +00:00
|
|
|
|
|
2014-03-28 15:01:48 +00:00
|
|
|
|
" TComment
|
2013-08-08 02:54:11 +00:00
|
|
|
|
nnoremap // :TComment<CR>
|
|
|
|
|
vnoremap // :TCommentBlock<CR>
|
|
|
|
|
|
2014-01-22 01:51:04 +00:00
|
|
|
|
" PreserveNoEOL
|
|
|
|
|
let g:PreserveNoEOL = 1
|
|
|
|
|
|
2013-08-08 02:54:11 +00:00
|
|
|
|
" CTags List
|
|
|
|
|
nnoremap <silent> <F8> :TagbarToggle<CR>
|
|
|
|
|
" Autofocus tagbar
|
|
|
|
|
let g:tagbar_autofocus = 1
|
|
|
|
|
|
2014-11-04 18:15:54 +00:00
|
|
|
|
" CtrlP settings
|
|
|
|
|
" Ensure max height isn't too large. (for performance)
|
|
|
|
|
let g:ctrlp_max_height = 10
|
|
|
|
|
" Conditional Mappings
|
|
|
|
|
let g:ctrlp_map = '<C-t>'
|
|
|
|
|
" Allow ctrl p to open over the initial nerdtree window
|
|
|
|
|
let g:ctrlp_dont_split = 'netrw'
|
|
|
|
|
" Support tag jumping
|
|
|
|
|
let g:ctrlp_extensions = ['tag', 'buffertag']
|
|
|
|
|
" Support Apex language
|
|
|
|
|
let g:ctrlp_buftag_types = {
|
|
|
|
|
\ 'apex' : '--language-force=c#',
|
|
|
|
|
\ 'go' : {
|
|
|
|
|
\ 'bin' : 'gotags',
|
|
|
|
|
\ 'args' : '-sort -silent',
|
|
|
|
|
\}
|
|
|
|
|
\}
|
|
|
|
|
" Leader Commands
|
|
|
|
|
nnoremap <leader>b :CtrlPBuffer<CR>
|
|
|
|
|
nnoremap <leader>t :CtrlPBufTag<CR>
|
|
|
|
|
nnoremap <leader>r :CtrlPTag<CR>
|
|
|
|
|
nnoremap <leader>u :CtrlPCurFile<CR>
|
|
|
|
|
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
2014-11-04 18:17:21 +00:00
|
|
|
|
|
|
|
|
|
" Special stuff for The Silver Searcher
|
|
|
|
|
if executable('ag')
|
|
|
|
|
" use ag
|
|
|
|
|
set grepprg=ag\ --nogroup\ --nocolor
|
|
|
|
|
" use ag for CtrlP
|
|
|
|
|
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
|
|
|
|
" ag is fast enough we don't need cache
|
|
|
|
|
let g:ctrlp_use_caching = 0
|
2012-07-02 17:25:36 +00:00
|
|
|
|
endif
|
|
|
|
|
|
2013-10-27 16:25:27 +00:00
|
|
|
|
" fugitive
|
2012-10-31 13:41:30 +00:00
|
|
|
|
" Add some shortcuts for git commands
|
|
|
|
|
nnoremap <leader>gb :Gblame<CR>
|
2014-03-04 18:55:00 +00:00
|
|
|
|
nnoremap <leader>gc :Gcommit<CR>
|
|
|
|
|
nnoremap <leader>gd :Gdiff<CR>
|
|
|
|
|
nnoremap <leader>gs :Gstatus<CR>
|
|
|
|
|
nnoremap <leader>gw :Gwrite<CR>
|
2012-10-31 13:41:30 +00:00
|
|
|
|
|
2013-01-23 19:33:05 +00:00
|
|
|
|
" Toggle QuickFix window
|
|
|
|
|
nnoremap <silent> <F6> :QFix<CR>
|
|
|
|
|
|
2014-11-04 18:16:56 +00:00
|
|
|
|
" neocomplete / neocomplcache
|
|
|
|
|
if has('lua')
|
|
|
|
|
let g:acp_enableAtStartup = 0
|
|
|
|
|
let g:neocomplete#enable_at_startup = 1
|
|
|
|
|
"let g:neocomplete#enable_smart_case = 1
|
|
|
|
|
let g:neocomlete#max_list=10
|
|
|
|
|
else
|
|
|
|
|
" NeoComplCache
|
|
|
|
|
let g:neocomplcache_enable_at_startup = 1
|
|
|
|
|
"let g:neocomplcache_enable_smart_case = 1
|
|
|
|
|
let g:neocomplcache_max_list = 10
|
|
|
|
|
"let g:neocomplcache_enable_camel_case_completion = 1
|
|
|
|
|
let g:neocomplcache_enable_fuzzy_completion = 1
|
|
|
|
|
endif
|
2014-08-28 22:17:21 +00:00
|
|
|
|
|
2014-01-22 01:51:38 +00:00
|
|
|
|
nmap <leader>a :Ag<Space>
|
2014-03-04 18:55:35 +00:00
|
|
|
|
nmap <leader>i* :Ag<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
2014-01-22 01:51:38 +00:00
|
|
|
|
nmap <leader>* :Ag<Space>'\b<c-r><c-W>\b'<CR>
|
2013-01-23 19:33:05 +00:00
|
|
|
|
|
2013-08-08 16:19:27 +00:00
|
|
|
|
" Syntastic settings
|
|
|
|
|
let g:syntastic_html_tidy_ignore_errors = [
|
|
|
|
|
\ 'proprietary attribute "ng-show"',
|
|
|
|
|
\ 'proprietary attribute "ng-controller"',
|
|
|
|
|
\ 'proprietary attribute "ng-repeat"',
|
2013-12-03 23:06:58 +00:00
|
|
|
|
\ 'proprietary attribute "ng-app"',
|
|
|
|
|
\ 'proprietary attribute "ng-click"'
|
2013-08-08 16:19:27 +00:00
|
|
|
|
\ ]
|
2013-12-03 23:06:58 +00:00
|
|
|
|
|
2013-12-03 23:05:29 +00:00
|
|
|
|
" Command to display TODO tags in project
|
|
|
|
|
command Todo Ag! TODO
|
|
|
|
|
|