Created
December 17, 2021 14:51
-
-
Save neil-marcellini/4daf0e0b3833c71d042a4d2a67de57a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set autoread " make file update on external changes | |
set backspace=indent,eol,start | |
set noerrorbells | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smartindent | |
set nu " line numbers | |
set tw=80 | |
set colorcolumn=80 | |
set smartcase " case sensitive search first | |
set noswapfile | |
set nobackup | |
set undodir=~/.vim/undodir | |
set undofile | |
set incsearch | |
set hlsearch | |
call plug#begin('~/.vim/plugged') | |
Plug 'jremmen/vim-ripgrep' | |
Plug 'tpope/vim-fugitive' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'vim-utils/vim-man' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'mbbill/undotree' | |
Plug 'tomasiser/vim-code-dark' | |
Plug 'maksimr/vim-jsbeautify' | |
Plug 'maxmellon/vim-jsx-pretty' | |
Plug 'valloric/youcompleteme' | |
Plug 'jph00/swift-apple' | |
call plug#end() | |
"colorscheme codedark | |
if executable('rg') | |
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""' | |
endif | |
let g:rg_command = 'rg --vimgrep -S' | |
let mapleader = " " | |
let g:netrw_browse_split=2 | |
let g:netrw_banner = 0 | |
let g:netrw_winsize = 25 | |
let g:ctrlp_use_caching = 0 | |
let g:ycm_autoclose_preview_window_after_completion = 1 | |
inoremap ii <Esc> | |
nnoremap <leader>ps :Rg<SPACE> | |
" project search from visual selection | |
nnoremap <leader>psv :Rg<SPACE><C-r>" | |
" project replace from visual selection | |
nnoremap <leader>prv :cfdo %s/<C-r>"//gc<Left><Left><Left> | |
nnoremap <leader>ra :%s/\<<C-r><C-w>\>//g<Left><Left> | |
nnoremap <leader>rc :%s/\<<C-r><C-w>\>//gc<Left><Left><Left> | |
nnoremap <leader>rw :%s/ | |
" replace selection | |
nnoremap <leader>rs :%s/\%V | |
" search visual selection | |
nnoremap <leader>sv /<C-r>" | |
" replace from visual selection | |
nnoremap <leader>rv :%s/<C-r>"//gc<Left><Left><Left> | |
nnoremap <leader>rva :%s/<C-r>"//g<Left><Left> | |
set rtp+=/usr/local/opt/fzf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment