Skip to content

Instantly share code, notes, and snippets.

@josephcode773
Created March 22, 2019 21:20
Show Gist options
  • Save josephcode773/22dbf72524d25e8d815783f1cb0036c7 to your computer and use it in GitHub Desktop.
Save josephcode773/22dbf72524d25e8d815783f1cb0036c7 to your computer and use it in GitHub Desktop.
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
" Plug 'zeis/vim-kolor'
Plug 'morhetz/gruvbox'
" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Plug 'junegunn/fzf.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tpope/vim-obsession'
Plug 'scrooloose/nerdtree'
Plug 'mattn/emmet-vim'
Plug 'justinmk/vim-sneak'
call plug#end()
if executable('rg')
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'
endif
nnoremap <Leader>b :CtrlPBuffer<CR>
colorscheme gruvbox
map <C-n> :NERDTreeToggle<CR>
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let g:gruvbox_gruvbox_contrast_dark = 'medium'
:set bg=dark
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
set laststatus=2
set t_Co=256
set showtabline=2
set noshowmode
inoremap jk <ESC>
let mapleader = "\<Space>"
" December 10, 2015 Additions:
set nocompatible
" Colors {{{
syntax enable " enable syntax processing
" }}}
" Misc {{{
set ttyfast " faster redraw
set backspace=indent,eol,start
" }}}
" Spaces & Tabs {{{
set tabstop=2 " 4 space tab
set expandtab " use spaces for tabs
set softtabstop=2 " 4 space tab
set shiftwidth=2
set modelines=1
filetype indent on
filetype plugin on
set autoindent
" }}}
" UI Layout {{{
set number " show line numbers
set relativenumber
" set showcmd " show command in bottom bar
set nocursorline " highlight current line
set wildmenu
" set lazyredraw
set showmatch " higlight matching parenthesis
set wrap linebreak nolist
" }}}
" Searching {{{
nnoremap / /\v
vnoremap / /\v
set ignorecase " ignore case when searching
set incsearch " search as characters are entered
set hlsearch " highlight all matches
set showmatch
set smartcase
nnoremap <leader><space> :noh<cr>
" }}}
" Line Shortcuts {{{
nnoremap j gj
nnoremap k gk
nnoremap B ^
nnoremap E $
" nnoremap $ <nop>
" nnoremap ^ <nop>
nnoremap gV `[v`]
" }}}
nnoremap <leader>1 :set number!<CR>
nnoremap <leader>2 :set wrap linebreak nolist<CR>
nnoremap <leader>w :w<CR>
" nnoremap ; :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment