|
@@ -3,7 +3,6 @@ set ruler
|
|
|
set mouse=a
|
|
|
set nocompatible
|
|
|
set bs=2
|
|
|
-set hlsearch
|
|
|
set nowrap
|
|
|
|
|
|
" give me all of teh colors!!
|
|
@@ -12,6 +11,17 @@ set bg=dark
|
|
|
colorscheme elflord
|
|
|
syntax on
|
|
|
|
|
|
+" misc
|
|
|
+set path+=** " make :find tab-completion search subdirectories
|
|
|
+set wildmenu " show tab-complete menu for : commands
|
|
|
+
|
|
|
+" search
|
|
|
+set ignorecase " case insensitive search
|
|
|
+set smartcase " auto switch to case-sensitive if uppercase *is* used
|
|
|
+set incsearch " live incremental searching
|
|
|
+set showmatch " show matches live while typing
|
|
|
+set hlsearch " highlight matches
|
|
|
+
|
|
|
" tabs
|
|
|
set shiftwidth=4
|
|
|
set tabstop=4
|
|
@@ -43,8 +53,11 @@ autocmd BufNewFile,BufReadPost *.json set filetype=json syntax=javascript
|
|
|
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
|
|
|
autocmd BufNewFile,BufReadPost *.go set filetype=go
|
|
|
|
|
|
-" run prettier with the = key
|
|
|
-autocmd FileType * setlocal equalprg=npx\ -q\ prettier\ --stdin-filepath\ %
|
|
|
+" prefer ripgrep if available
|
|
|
+if executable('rg')
|
|
|
+ set grepprg=rg\ --vimgrep\ $*
|
|
|
+ set grepformat^=%f:%l:%c:%m
|
|
|
+endif
|
|
|
|
|
|
" VIM-PLUG PLUGINS (WITH FIRST-RUN AUTOINSTALL)
|
|
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
@@ -53,30 +66,25 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
|
|
endif
|
|
|
call plug#begin()
|
|
|
|
|
|
-Plug 'bling/vim-airline' " more helpful tab line and status lines with colors
|
|
|
+Plug 'tpope/vim-commentary' " comment stuff out
|
|
|
+
|
|
|
+Plug 'vim-airline/vim-airline' " more helpful tab line and status lines with colors
|
|
|
let g:airline#extensions#tabline#enabled = !has('gui_running')
|
|
|
let g:airline#extensions#tabline#show_buffers = 0
|
|
|
set laststatus=2
|
|
|
set ttimeoutlen=50
|
|
|
-"TODO: decide if I care enough for: https://github.com/Lokaltog/powerline-fonts
|
|
|
|
|
|
-Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " tree file browser
|
|
|
-map <C-n> :NERDTreeToggle<CR>
|
|
|
-map <C-\> :NERDTreeToggle<CR>
|
|
|
-"TODO: detect SHIFT?: map <Shift><C-\> :NERDTreeFind<CR>
|
|
|
-
|
|
|
-Plug 'terryma/vim-multiple-cursors' " multiple cursor support
|
|
|
+Plug 'mg979/vim-visual-multi' " multiple cursor support
|
|
|
|
|
|
Plug 'editorconfig/editorconfig-vim'
|
|
|
|
|
|
-Plug 'scrooloose/syntastic' " multi-language syntax checker
|
|
|
+Plug 'vim-syntastic/syntastic' " multi-language syntax checker
|
|
|
let g:syntastic_check_on_open=1
|
|
|
let g:syntastic_aggregate_errors=1
|
|
|
let g:syntastic_javascript_checkers = ['eslint']
|
|
|
|
|
|
Plug 'ntpeters/vim-better-whitespace' " whitespace!!
|
|
|
let g:strip_whitespace_on_save = 1
|
|
|
-let g:better_whitespace_filetypes_blacklist=['conque_term']
|
|
|
|
|
|
Plug 'nathanaelkane/vim-indent-guides' " pretty indent guides with softtabs
|
|
|
let g:indent_guides_guide_size = 1
|
|
@@ -87,21 +95,15 @@ autocmd VimEnter * :IndentGuidesEnable
|
|
|
|
|
|
Plug 'lilydjwg/colorizer' " colorize CSS inline
|
|
|
|
|
|
-Plug 'kien/ctrlp.vim' " fuzzy file matcher / opener
|
|
|
-let g:ctrlp_user_command="find '%s' ! -wholename '*/.git/*' ! -wholename '*/node_modules/*' ! -wholename '*/report/*' -type f"
|
|
|
-
|
|
|
-Plug 'fisadev/vim-ctrlp-cmdpalette' " fuzzy command matcher / runner
|
|
|
-"TODO: detect SHIFT?: map <Shift><C-p> :CtrlPCmdPalette<CR>
|
|
|
+Plug 'ctrlpvim/ctrlp.vim' " fuzzy file matcher / opener
|
|
|
+let ctrlp_user_cmd_fallback = 'find %s -type f'
|
|
|
+if executable('rg') | let ctrlp_user_cmd_fallback = 'rg --files %s' | endif
|
|
|
+let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', ctrlp_user_cmd_fallback]
|
|
|
|
|
|
Plug 'tpope/vim-fugitive' " git commands and statusline
|
|
|
|
|
|
Plug 'mhinz/vim-signify' " label VCS changes in gutter
|
|
|
|
|
|
-Plug 'oplatek/Conque-Shell' " a shell in a buffer
|
|
|
-let g:ConqueTerm_ReadUnfocused = 1
|
|
|
-let g:ConqueTerm_InsertOnEnter = 1
|
|
|
-let g:ConqueTerm_CloseOnEnd = 1
|
|
|
-
|
|
|
Plug 'pangloss/vim-javascript' " better JavaScript support
|
|
|
|
|
|
Plug 'moll/vim-node' " nodejs extras
|
|
@@ -110,4 +112,6 @@ Plug 'leafgarland/typescript-vim' " TypeScript support
|
|
|
autocmd QuickFixCmdPost [^l]* nested cwindow
|
|
|
autocmd QuickFixCmdPost l* nested lwindow
|
|
|
|
|
|
+Plug 'rust-lang/rust.vim'
|
|
|
+
|
|
|
call plug#end()
|