Open pigfly321 opened 2 days ago
set nocompatible filetype on filetype plugin on filetype indent on syntax on set number set cursorline
set tabstop=2 set expandtab set nobackup set nowrap set incsearch set ignorecase set smartcase set scrolloff=10 set showmode set showmatch set wildmenu set wildmode=list:longest set wildignore=.docx,.jpg,.png,.gif,.pdf,.pyc,.exe,.flv,.img,.xlsx
" The Silver Searcher if executable('ag') set grepprg=ag\ --nogroup\ --nocolor let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' let g:ctrlp_use_caching = 0 endif
" Search word under the cursor with K key
nnoremap K :grep! "\b
" Ag command
command -nargs=+ -complete=file -bar Ag silent! grep!
" find files and populate the quickfix list
fun! FindFiles(filename)
let error_file = tempname()
silent exe '!find . -type f -name "'.a:filename.'" | xargs file | sed "s/:/:1:/" > '.error_file
set errorformat=%f:%l:%m
exe "cfile ". error_file
copen
call delete(error_file)
endfun
command! -nargs=1 FindFile call FindFiles(
colorscheme ron
https://thoughtbot.com/blog/faster-grepping-in-vim
pure config without Ag vim-plugin.