Skip to content

Instantly share code, notes, and snippets.

@mercxry
Created July 1, 2018 01:46
Show Gist options
  • Save mercxry/58d431b81e24a01e0930b264152ab972 to your computer and use it in GitHub Desktop.
Save mercxry/58d431b81e24a01e0930b264152ab972 to your computer and use it in GitHub Desktop.
Neovim Config - ~/.config/nvim/init.vim
syntax on
" Plugin
call plug#begin()
Plug 'airblade/vim-gitgutter'
Plug 'townk/vim-autoclose'
Plug 'tpope/vim-commentary'
"Plug 'morhetz/gruvbox'
"Plug 'marciomazza/vim-brogrammer-theme'
Plug 'junegunn/fzf'
Plug 'scrooloose/nerdtree'
Plug 'rust-lang/rust.vim'
Plug 'cespare/vim-toml'
Plug 'timonv/vim-cargo'
call plug#end()
" Theme
set background=dark
" colorscheme brogrammer
" Ignore various cache/vendor folders
set wildignore+=*/node_modules/*,*/dist/*,*/__pycache__/*
" Ignore C/C++ Object files
set wildignore+=*.o
" Ignore generated C/C++ Qt files
set wildignore+=moc_*.cpp,moc_*.h
" Ignore generated C/C++ Qt files
set wildignore+=moc_*.cpp,moc_*.h
set wildignore+=*/lib/*
" Ignore Unity asset meta-files
set wildignore+=*/Assets/*.meta
" Disable swap file. Some people say to keep swap file enabled but in a
" temporary folder instead. I dislike the dialog that pops up every now and
" then if a swapfile is left so I just leave it fully disabled
set noswapfile
" Enable line numbers
set number
" Don't wrap lines
set nowrap
nnoremap <C-e> :NERDTreeToggle<CR>
" Let backspace delete indentations, newlines, and don't make it stop after
" reaching the start of your insert mode
set backspace=indent,eol,start
" Other options that I just copied and haven't tried understanding yet
set incsearch
set showmode
set nocompatible
filetype on
set wildmenu
set ruler
set lz
set hid
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
set cindent
set ai
set si
set cin
set mouse=a
set numberwidth=6
set encoding=utf-8
" Provider Configuration
let g:python_host_prog = '/usr/local/bin/python2'
let g:python3_host_prog = '/usr/local/bin/python3'
" Enable relative line numbering
set rnu
" Store an undo buffer in a file in $HOME/.vimundo
set undofile
set undodir=$HOME/.vimundo
set undolevels=1000
set undoreload=10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment