Skip to content

Instantly share code, notes, and snippets.

@ThisIsntMyId
Last active January 22, 2023 15:09
Show Gist options
  • Save ThisIsntMyId/126e9a2b2f2226b825e0c465b089a798 to your computer and use it in GitHub Desktop.
Save ThisIsntMyId/126e9a2b2f2226b825e0c465b089a798 to your computer and use it in GitHub Desktop.
set number
set relativenumber
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set hlsearch
hi Search ctermbg=LightBlue
hi Search ctermfg=DarkGreen
set incsearch
let mapleader=","
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" OTher Plugins
Plugin 'tpope/vim-surround'
Plugin 'junegunn/fzf'
Plugin 'mileszs/ack.vim'
" Themes
Plugin 'joshdick/onedark.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
syntax on
colorscheme onedark
nmap <C-P> :FZF<CR>
" Nerdtree alternative
inoremap <C-b> <Esc>:Lex<cr>:vertical resize 30<cr>
nnoremap <C-b> <Esc>:Lex<cr>:vertical resize 30<cr>
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netwr_browser_split = 4
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" Search Related
let g:ackprg = 'ag --vimgrep --smart-case'
cnoreabbrev ag Ack
cnoreabbrev aG Ack
cnoreabbrev Ag Ack
cnoreabbrev AG Ack
map <C-f> :Ag
" Quick Fix Toggle
function! ToggleQuickFix()
if empty(filter(getwininfo(), 'v:val.quickfix'))
copen
else
cclose
endif
endfunction
nnoremap <leader>q :call ToggleQuickFix()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment