Skip to content

Instantly share code, notes, and snippets.

@MatthewKosloski
Created April 12, 2020 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthewKosloski/e7abd75ac2e1584b3a5dd04c413f2172 to your computer and use it in GitHub Desktop.
Save MatthewKosloski/e7abd75ac2e1584b3a5dd04c413f2172 to your computer and use it in GitHub Desktop.
My Vim Configuration
" Automatically install vim-plug
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
" Install plugins
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'sheerun/vim-polyglot'
Plug 'joshdick/onedark.vim'
"Plug 'dracula/vim', {'as':'dracula'}
Plug 'vim-airline/vim-airline'
call plug#end()
" Colors
syntax on
colorscheme onedark
set background=dark
" UI Config
set number " show line numbers
set cursorline " highlight current line
set showmatch " hightlight matching [{()}]
set showcmd " show command in bottom bar
" Searching
set incsearch " search as characters are entered
set hlsearch " highlight matches
" Key maps
:let mapleader = "," " leader is comma
map <C-b> :NERDTreeToggle<CR> " Toggle Nerd Tree
nnoremap <leader><space> :nohlsearch<CR> " Turn off search highlight
" Change keys for navigating panes
nnoremap <leader>j <C-W><C-J>
nnoremap <leader>k <C-W><C-K>
nnoremap <leader>l <C-W><C-L>
nnoremap <leader>h <C-W><C-H>
" Plugin variables
let g:airline_symbols_ascii = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment